* {
  box-sizing: border-box;
}

:root {
  --yp-bg: #070707;
  --yp-card: #111111;
  --yp-card-soft: #171717;
  --yp-border: rgba(255, 255, 255, 0.12);
  --yp-text: #ffffff;
  --yp-muted: #a3a3a3;
  --yp-depth: 8px;
  --yp-projection: 45;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--yp-bg);
  color: var(--yp-text);
  font-family: Arial, Helvetica, sans-serif;
}

.yp-player-app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.yp-shell {
  width: 100%;
  max-width: 1180px;
  background: #0f0f0f;
  border: 1px solid var(--yp-border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.yp-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--yp-border);
}

.yp-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.04em;
}

.yp-header p {
  margin: 8px 0 0;
  color: var(--yp-muted);
  font-size: 0.95rem;
}

.yp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.yp-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: #262626;
  padding: 11px 15px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.yp-btn:hover {
  background: #333333;
  transform: translateY(-1px);
}

.yp-btn-primary {
  background: #ffffff;
  color: #050505;
}

.yp-btn-primary:hover {
  background: #dcdcdc;
}

.yp-wide {
  width: 100%;
  margin-top: 16px;
}

.yp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.yp-main {
  padding: 18px;
}

.yp-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000000;
  border: 1px solid var(--yp-border);
  border-radius: 24px;
  overflow: hidden;
}

.yp-media,
.yp-webframe {
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000000;
  position: relative;
  z-index: 1;
}

.yp-webframe {
  background: #ffffff;
}

.yp-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  color: var(--yp-muted);
}

.yp-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--yp-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: #ffffff;
}

.yp-empty h2 {
  color: #ffffff;
  margin: 0 0 8px;
}

.yp-empty p {
  margin: 0;
  max-width: 420px;
  line-height: 1.5;
}

.yp-anaglyph::before,
.yp-anaglyph::after,
.yp-projector::before,
.yp-projector::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 3;
}

.yp-anaglyph::before {
  background: rgba(255, 0, 0, 0.28);
  transform: translateX(calc(var(--yp-depth) * -1));
}

.yp-anaglyph::after {
  background: rgba(0, 220, 255, 0.26);
  transform: translateX(var(--yp-depth));
}

.yp-projector {
  filter: contrast(1.18) saturate(1.22) brightness(1.08);
}

.yp-projector::before {
  background: radial-gradient(circle at center, rgba(255, 0, 0, 0.38), transparent 58%);
  transform: translateX(calc(var(--yp-projection) * -0.12px));
}

.yp-projector::after {
  background: radial-gradient(circle at center, rgba(0, 220, 255, 0.36), transparent 62%);
  transform: translateX(calc(var(--yp-projection) * 0.12px));
}

.yp-projector .yp-media,
.yp-projector .yp-webframe {
  filter: drop-shadow(0 0 calc(var(--yp-projection) * 0.18px) rgba(255, 255, 255, 0.26));
}

.yp-controls {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
}

.yp-round,
.yp-play {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease;
}

.yp-round {
  width: 54px;
  height: 54px;
  background: #262626;
  color: #ffffff;
  font-size: 1.45rem;
}

.yp-play {
  width: 68px;
  height: 68px;
  background: #ffffff;
  color: #050505;
  font-size: 1.35rem;
}

.yp-round:hover,
.yp-play:hover {
  transform: scale(1.05);
}

.yp-panel {
  border-left: 1px solid var(--yp-border);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.yp-card {
  background: var(--yp-card-soft);
  border: 1px solid var(--yp-border);
  border-radius: 24px;
  padding: 16px;
}

.yp-card h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.yp-card label {
  display: block;
  color: #d4d4d4;
  font-size: 0.92rem;
  margin: 12px 0 8px;
}

input[type="range"] {
  width: 100%;
}

.yp-projector-settings {
  display: none;
  margin-top: 14px;
}

.yp-projector-settings p,
.yp-note {
  margin: 12px 0 0;
  color: var(--yp-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.yp-url-row {
  display: flex;
  gap: 8px;
}

.yp-url-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--yp-border);
  border-radius: 15px;
  background: #262626;
  color: #ffffff;
  padding: 11px 12px;
  outline: none;
}

.yp-url-row input:focus {
  border-color: rgba(0, 220, 255, 0.8);
}

.yp-format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.yp-format-grid span {
  background: #262626;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.9rem;
}

body.yp-embedded {
  min-height: auto;
  background: transparent;
}

body.yp-embedded .yp-player-app {
  min-height: auto;
  padding: 0;
}

body.yp-embedded .yp-shell {
  border-radius: 22px;
}

@media (max-width: 900px) {
  .yp-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .yp-actions {
    justify-content: flex-start;
  }

  .yp-layout {
    grid-template-columns: 1fr;
  }

  .yp-panel {
    border-left: 0;
    border-top: 1px solid var(--yp-border);
  }
}

@media (max-width: 560px) {
  .yp-player-app {
    padding: 10px;
  }

  .yp-shell {
    border-radius: 20px;
  }

  .yp-header,
  .yp-main,
  .yp-panel {
    padding: 12px;
  }

  .yp-actions,
  .yp-btn,
  .yp-url-row {
    width: 100%;
  }

  .yp-url-row {
    flex-direction: column;
  }

  .yp-screen {
    border-radius: 18px;
  }

  .yp-format-grid {
    grid-template-columns: 1fr;
  }
}
