:root {
  --bg-dark: #07090e;
  --bg-surface: #0f1420;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.6);
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --cyan-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(236, 72, 153, 0.06) 0%, transparent 40%);
}

h1, h2, h3, h4, .brand-title {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 14, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-center {
  flex: 1;
  max-width: 440px;
  margin: 0 1.5rem;
}

.station-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0 0.85rem;
  transition: all 0.25s ease;
}

.station-select-wrapper:hover,
.station-select-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-active);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.select-pin-icon {
  color: var(--accent-light);
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.select-arrow-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 0.4rem;
  pointer-events: none;
}

.station-dropdown {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.55rem 0;
  cursor: pointer;
  appearance: none;
  outline: none;
}

.station-dropdown option {
  background: #0f1420;
  color: #f8fafc;
  padding: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-count {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   FEATURED 360° STAGE
   ========================================================================== */
.featured-stage {
  padding: 1.5rem 1.5rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

.stage-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.stage-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #fff;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.stage-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.35rem;
}

.stage-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
}

/* VIEWER WRAPPER */
.viewer-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
}

.psv-main-container {
  width: 100%;
  height: 72vh;
  min-height: 520px;
  max-height: 820px;
  position: relative;
  background: #000;
}

.viewer-initial-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 1rem;
  z-index: 10;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* FLOATING HUD OVERLAY */
.viewer-hud {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(11, 16, 26, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 30;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.hud-info {
  flex: 1;
  min-width: 0;
}

.hud-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.25);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.4);
  margin-bottom: 0.35rem;
}

.hud-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.hud-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.2rem;
}

.hud-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hud-btn:hover {
  background: rgba(99, 102, 241, 0.35);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.hud-btn.is-active {
  background: var(--accent);
  border-color: var(--accent-light);
  color: #fff;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.6);
}

.hud-btn .icon-play { display: none; }
.hud-btn .icon-pause { display: block; }
.hud-btn:not(.is-active) .icon-play { display: block; }
.hud-btn:not(.is-active) .icon-pause { display: none; }

/* QUICK THUMBNAIL STRIP */
.thumb-strip-wrapper {
  margin-top: 1.25rem;
}

.thumb-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  padding: 0 0.25rem;
}

.thumb-counter {
  font-weight: 600;
  color: var(--accent-light);
}

.thumb-strip {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.4rem 0.25rem 0.75rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.thumb-strip::-webkit-scrollbar {
  height: 6px;
}
.thumb-strip::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 10px;
}

.thumb-chip {
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem 0.5rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.thumb-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.thumb-chip.is-active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--accent-light);
  color: #fff;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

.chip-number {
  font-size: 0.72rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-chip.is-active .chip-number {
  background: var(--accent);
  color: #fff;
}

/* ==========================================================================
   APP FOOTER
   ========================================================================== */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 9, 14, 0.95);
  padding: 1.5rem 1.5rem 2rem;
  text-align: center;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-copy a {
  color: var(--accent-light);
  text-decoration: none;
}

.footer-copy a:hover {
  text-decoration: underline;
}

.footer-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 900px) {
  .stage-title { font-size: 1.8rem; }
  .psv-main-container { height: 60vh; min-height: 420px; }
  .header-center { margin: 0 0.75rem; }
  .viewer-hud {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    padding: 0.9rem;
  }
  .hud-controls {
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .header-center {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  .featured-stage { padding: 1rem 0.75rem; }
  .stage-title { font-size: 1.5rem; }
  .stage-subtitle { font-size: 0.9rem; }
  .psv-main-container { height: 55vh; min-height: 360px; }
  .hud-title { font-size: 1.15rem; }
}