*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --gold: #d4a855;
  --gold-light: #f5cc7a;
  --gold-glow: rgba(212, 168, 85, 0.45);
  --gold-border: rgba(212, 168, 85, 0.22);
  --bg-dark: #020406;
  --panel-bg: rgba(14, 10, 7, 0.88);
  --panel-border: rgba(212, 168, 85, 0.28);
  --text-main: #f3ebd7;
  --text-muted: #9c8e78;
  --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Cinzel', serif;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-fa);
  color: var(--text-main);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* 3D WebGL Canvas */
#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* Atmospheric Vignette & Film Grain Overlay */
#atmosphere-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 35%, rgba(1, 3, 5, 0.65) 85%, rgba(0, 2, 4, 0.92) 100%);
  mix-blend-mode: multiply;
}

/* ─── LOADER & ANIMATED TOUR GUIDE (MATCHING GRAY THEME) ────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 500;
  background-color: #090a0d;
  background-image: linear-gradient(rgba(9, 10, 13, 0.45), rgba(9, 10, 13, 0.65)), url('../assets/images/loader_bg.svg?v=19');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), visibility 1.0s;
  overflow-y: auto;
  user-select: none;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Loader Header */
.loader-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2px;
}
.loader-flame {
  width: 24px;
  height: 38px;
  background: radial-gradient(ellipse at 50% 80%, #ffffff 0%, #cbd5e1 45%, #475569 80%, transparent 100%);
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  filter: blur(1px) drop-shadow(0 0 16px rgba(226, 232, 240, 0.65));
  animation: coldFlicker 1.8s ease-in-out infinite alternate;
}
@keyframes coldFlicker {
  0% { transform: scale(1) rotate(-2deg); opacity: 0.88; }
  50% { transform: scale(1.08, 0.96) rotate(3deg); opacity: 1; }
  100% { transform: scale(0.95, 1.05) rotate(-1deg); opacity: 0.82; }
}
.loader-brand-text {
  text-align: right;
}
.loader-title {
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: #f8fafc;
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(226, 232, 240, 0.4);
}
.loader-experience-tag {
  font-family: var(--font-en);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: #94a3b8;
  text-transform: uppercase;
}

/* ─── TOUR GUIDE CONTAINER (LIQUID GLASS MATERIAL) ────────── */
.tour-guide-wrap {
  width: min(580px, 94vw);
  max-width: 580px;
  background:
    radial-gradient(135% 100% at 50% 0%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.04) 30%, transparent 70%),
    linear-gradient(165deg, rgba(28, 34, 46, 0.72) 0%, rgba(14, 18, 25, 0.86) 55%, rgba(7, 9, 13, 0.94) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  padding: 24px 26px 20px;
  box-shadow:
    0 35px 85px -15px rgba(0, 0, 0, 0.92),
    0 0 50px -10px rgba(180, 205, 240, 0.14),
    inset 0 1.5px 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1.5px 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 35px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(36px) saturate(210%) contrast(106%);
  -webkit-backdrop-filter: blur(36px) saturate(210%) contrast(106%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

/* Liquid Glass Specular Top Curve */
.tour-guide-wrap::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
  border-radius: 27px 27px 100px 100px / 27px 27px 25px 25px;
  pointer-events: none;
  z-index: 2;
}

.tour-badge {
  align-self: center;
  font-size: 0.74rem;
  font-weight: 600;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 16px;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  position: relative;
  z-index: 3;
}

/* Slides Track */
.tour-slides {
  width: 100%;
  position: relative;
  min-height: 350px;
  z-index: 3;
  touch-action: pan-y;
}

.tour-slide {
  display: none;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}
.tour-slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: slideFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Tour Screenshot Card */
.tour-screenshot-card {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #090b0e;
  box-shadow:
    0 16px 45px rgba(0, 0, 0, 0.75),
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 0 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 16px;
  position: relative;
}
.tour-img-container {
  position: relative;
  width: 100%;
  height: clamp(210px, 32vh, 280px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090b0e;
}
.tour-screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.95) contrast(1.06);
}
.tour-slide:hover .tour-screenshot-img {
  transform: scale(1.03);
}
.tour-img-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(9, 11, 14, 0.35) 75%, rgba(7, 9, 12, 0.85) 100%),
              linear-gradient(180deg, transparent 65%, rgba(7, 9, 12, 0.82) 100%);
  pointer-events: none;
}

/* Pointer overlays, arrows, hints */
.tour-pointer-overlay {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.tour-pointer-overlay.pointer-center {
  inset: 0;
  justify-content: center;
}
.tour-pointer-overlay.pointer-dish {
  inset: 0;
  justify-content: flex-end;
  padding-bottom: 12px;
}

/* Slide 1 Guides: Drag Arrows */
.drag-indicator-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 6px 14px;
  background: rgba(18, 20, 25, 0.82);
  border: 1px solid rgba(160, 170, 185, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  animation: horizontalSweep 2.2s ease-in-out infinite alternate;
}
@keyframes horizontalSweep {
  0% { transform: translateX(-18px); }
  100% { transform: translateX(18px); }
}
.flash-arrow {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(226, 232, 240, 0.6));
  animation: flashPulse 1.2s ease-in-out infinite alternate;
}
@keyframes flashPulse {
  0% { opacity: 0.45; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 10px #ffffff); }
}
.flash-core-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 0 10px rgba(226, 232, 240, 0.7);
}

/* Slide 2 Guides: Dish Target Ripple & Down Arrow directly on plate */
.dish-pointer-arrow {
  position: absolute;
  top: 36%;
  left: 36%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceDown 1.5s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate;
}
@keyframes bounceDown {
  0% { transform: translate(-50%, -50%) translateY(-5px); }
  100% { transform: translate(-50%, -50%) translateY(5px); }
}
.dish-pointer-arrow .arrow-down {
  font-size: 1.15rem;
  color: #e2e8f0;
  filter: drop-shadow(0 0 8px rgba(226, 232, 240, 0.75));
}
.dish-target-ripple {
  position: absolute;
  top: 54%;
  left: 36%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(226, 232, 240, 0.7);
  animation: rippleCold 2s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
  pointer-events: none;
}
@keyframes rippleCold {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

/* Floating Tour Hint Pill */
.tour-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #f1f5f9;
  background: rgba(18, 20, 26, 0.9);
  border: 1px solid rgba(160, 170, 185, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 16px rgba(160, 170, 185, 0.2);
}

/* Slide Titles & Descriptions */
.tour-slide-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.tour-slide-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0;
  padding: 0 10px;
}

/* Tour Controls (Dots & Arrows) */
.tour-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  width: 100%;
  position: relative;
  z-index: 3;
}
.tour-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.tour-nav-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 14px rgba(255, 255, 255, 0.35);
}
.tour-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}
.tour-dot.active {
  width: 26px;
  background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 12px rgba(226, 232, 240, 0.6);
}

/* Status Bar & Action Row */
.loader-status-wrap {
  width: min(580px, 94vw);
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.loader-status-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}
.loader-spinner-icon {
  font-size: 0.85rem;
  color: #cbd5e1;
  animation: spinSlow 3s linear infinite;
}
.loader-bar-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.loader-bar {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ea580c, #f97316, #fb923c);
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.8), 0 0 6px rgba(251, 146, 60, 0.9);
  transition: width 0.35s ease-out;
}

.loader-action-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.loader-enter-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.35), rgba(71, 85, 105, 0.5));
  border: 1px solid rgba(203, 213, 225, 0.45);
  border-radius: 999px;
  color: #f8fafc;
  font-family: var(--font-fa);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5), 0 4px 15px rgba(0,0,0,0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: enterPulseGray 2s infinite alternate;
}
.loader-enter-btn.ready {
  display: inline-flex !important;
  animation: enterPulseGray 1.8s infinite alternate, slideFadeIn 0.5s ease-out forwards;
}
.loader-enter-btn:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(135deg, rgba(160, 175, 200, 0.45), rgba(90, 105, 125, 0.6));
  box-shadow: 0 0 30px rgba(203, 213, 225, 0.4);
}
@keyframes enterPulseGray {
  0% { box-shadow: 0 0 18px rgba(148, 163, 184, 0.25); }
  100% { box-shadow: 0 0 30px rgba(203, 213, 225, 0.5); }
}

.loader-skip-btn {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.45);
  color: #fb923c;
  font-family: var(--font-fa);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 999px;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 12px rgba(249, 115, 22, 0.2);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.loader-skip-btn:hover {
  background: rgba(249, 115, 22, 0.28);
  border-color: #fb923c;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.55);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ─── TOP NAVIGATION BAR ──────────────────────────────────────────── */
#top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(3, 5, 8, 0.65);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--gold-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.nav-interactive {
  pointer-events: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-link-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-fa);
  font-size: 0.82rem;
  font-weight: 400;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.35s var(--spring);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link-btn:hover {
  color: var(--gold-light);
  border-color: var(--gold-border);
  background: rgba(212, 168, 85, 0.08);
  box-shadow: 0 0 16px rgba(212, 168, 85, 0.25);
  transform: translateY(-1px);
}
.nav-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  direction: ltr; /* Keeps logo icon to the left of the USPHPROD text */
}
.brand-logo-img {
  height: 42px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(212, 168, 85, 0.4));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.nav-brand:hover .brand-logo-img {
  transform: scale(1.08) rotate(-1deg);
  filter: drop-shadow(0 0 16px rgba(212, 168, 85, 0.8));
}
.brand-text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.brand-name {
  font-family: var(--font-en);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-main);
  text-shadow: 0 0 16px rgba(245, 204, 122, 0.4);
  transition: color 0.3s;
  line-height: 1.2;
}
.nav-brand:hover .brand-name {
  color: var(--gold-light);
}
.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-top: 1px;
  line-height: 1.2;
}

/* Nav Actions (Buy Button & Sound) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-buy-btn {
  background: linear-gradient(135deg, rgba(212, 168, 85, 0.22), rgba(180, 130, 45, 0.35));
  border: 1px solid var(--gold);
  color: #fff2d1;
  font-family: var(--font-fa);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(212, 168, 85, 0.3);
  transition: all 0.3s var(--spring);
}
.nav-buy-btn:hover {
  background: linear-gradient(135deg, rgba(212, 168, 85, 0.4), rgba(212, 168, 85, 0.2));
  box-shadow: 0 0 30px rgba(212, 168, 85, 0.6);
  transform: translateY(-2px) scale(1.02);
}
.nav-buy-icon {
  font-size: 0.95rem;
  color: var(--gold-light);
}

.nav-sound-btn {
  background: rgba(212, 168, 85, 0.08);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}
.nav-sound-btn:hover {
  background: rgba(212, 168, 85, 0.18);
  box-shadow: 0 0 14px var(--gold-glow);
}
.sound-wave-icon {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 12px;
}
.sound-wave-icon span {
  width: 2px;
  height: 100%;
  background: var(--gold-light);
  border-radius: 1px;
  animation: eq 1s ease-in-out infinite alternate;
}
.sound-wave-icon span:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.sound-wave-icon span:nth-child(3) { animation-delay: 0.4s; height: 80%; }
.sound-wave-icon.paused span {
  animation: none;
  height: 3px;
}
@keyframes eq {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* ─── SCENE HUD / PROMPTS ─────────────────────────────────────────── */
#scene-hint {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(8, 6, 4, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gold-border);
  padding: 8px 22px;
  border-radius: 30px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: floatHint 3.5s ease-in-out infinite;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#scene-hint.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
}
@keyframes floatHint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}
.hint-sparkle {
  color: var(--gold-light);
  font-size: 0.9rem;
}

/* ─── TRACK PASSPORT (SLIDE-OVER CARD) ────────────────────────────── */
#track-passport {
  position: fixed;
  top: 84px;
  right: 32px;
  width: min(460px, calc(100vw - 40px));
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  z-index: 80;
  background: linear-gradient(160deg, rgba(22, 25, 30, 0.97), rgba(11, 13, 16, 0.98));
  border: 1px solid rgba(160, 170, 185, 0.22);
  border-radius: 24px;
  padding: 28px 26px 26px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(220, 225, 235, 0.2);
  transform: translateX(calc(100% + 50px));
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  transition: transform 0.65s var(--spring), opacity 0.5s ease, visibility 0.5s;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 170, 185, 0.35) transparent;
}
#track-passport.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}
#track-passport::-webkit-scrollbar {
  width: 4px;
}
#track-passport::-webkit-scrollbar-thumb {
  background: rgba(160, 170, 185, 0.4);
  border-radius: 2px;
}

/* Passport Header */
.passport-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.passport-seq {
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.passport-title {
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}
.passport-en-title {
  font-family: var(--font-en);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-top: 2px;
}
.passport-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.25s var(--spring);
  flex-shrink: 0;
}
.passport-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #cbd5e1;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 0 14px rgba(226, 232, 240, 0.35);
}

.passport-course {
  font-size: 0.82rem;
  color: #d1d5db;
  margin-bottom: 16px;
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Content Tabs: Lyrics vs Story */
.passport-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.passport-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-fa);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.passport-tab-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-panel.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.passport-lyrics-wrap {
  position: relative;
  margin-bottom: 8px;
  padding-right: 14px;
  border-right: 2px solid #94a3b8;
  max-height: 140px;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.passport-lyrics-wrap.expanded {
  max-height: 1800px;
}
.passport-lyrics {
  font-size: 0.96rem;
  line-height: 2.1;
  color: #e2e8f0;
  font-weight: 300;
  white-space: pre-line;
  margin: 0;
  padding-bottom: 8px;
}
.passport-lyrics-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(14, 16, 20, 0) 0%, rgba(14, 16, 20, 0.95) 90%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.passport-lyrics-wrap.expanded .passport-lyrics-fade {
  opacity: 0;
}
.lyrics-action-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 16px;
  padding-right: 14px;
}
.lyrics-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  color: #e2e8f0;
  font-family: var(--font-fa);
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: all 0.25s var(--spring);
}
.lyrics-expand-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #94a3b8;
  box-shadow: 0 0 16px rgba(226, 232, 240, 0.3);
  transform: translateY(-1px);
}
.lyrics-expand-btn:active {
  transform: scale(0.96);
}
.lyrics-expand-btn .expand-icon {
  font-size: 0.82rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}
.lyrics-expand-btn.expanded .expand-icon {
  transform: rotate(180deg);
}
.passport-story-wrap {
  position: relative;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.passport-story {
  font-size: 0.92rem;
  line-height: 1.95;
  color: #cbd5e1;
  font-weight: 300;
}

/* Audio Player Module */
.audio-player-box {
  background: rgba(10, 12, 16, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 18px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 16px;
}
.audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.audio-status {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.preview-badge {
  font-size: 0.68rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Waveform Visualizer */
.waveform-container {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  margin-bottom: 12px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
}
.waveform-bar {
  flex: 1;
  height: 36px;
  transform: scaleY(0.12);
  transform-origin: bottom;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  will-change: transform;
}
.waveform-bar.active {
  background: linear-gradient(180deg, #f1f5f9, #94a3b8);
  box-shadow: 0 0 6px rgba(203, 213, 225, 0.5);
}

/* Timeline Scrubber (18 Seconds) */
.timeline-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.time-label {
  font-family: var(--font-fa);
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 32px;
}
.scrubber-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}
.scrubber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #f8fafc, #94a3b8);
  box-shadow: 0 0 10px rgba(203, 213, 225, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.scrubber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* Controls */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.play-btn-large {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid #94a3b8;
  background: radial-gradient(circle at 35% 30%, rgba(241, 245, 249, 0.35), rgba(148, 163, 184, 0.12));
  color: #f8fafc;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(148, 163, 184, 0.3);
  transition: all 0.25s var(--spring);
}
.play-btn-large:hover {
  transform: scale(1.1);
  border-color: #cbd5e1;
  box-shadow: 0 0 30px rgba(226, 232, 240, 0.55);
}
.play-btn-large:active {
  transform: scale(0.95);
}

/* Passport Action Buttons (Buy & Return) */
.passport-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.passport-buy-album-btn {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.32), rgba(71, 85, 105, 0.45));
  border: 1px solid rgba(203, 213, 225, 0.45);
  color: #f8fafc;
  font-family: var(--font-fa);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(148, 163, 184, 0.2);
  transition: all 0.3s var(--spring);
}
.passport-buy-album-btn:hover {
  background: linear-gradient(135deg, rgba(160, 175, 200, 0.45), rgba(90, 105, 125, 0.6));
  box-shadow: 0 6px 28px rgba(148, 163, 184, 0.45);
  transform: translateY(-2px);
}
.passport-return-btn {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  font-family: var(--font-fa);
  font-size: 0.84rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
}
.passport-return-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ─── ZARINPAL CHECKOUT MODAL ─────────────────────────────────────── */
#zarinpal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(1, 3, 5, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
#zarinpal-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.zarinpal-modal {
  width: min(540px, 94vw);
  background: linear-gradient(160deg, rgba(24, 16, 9, 0.96), rgba(9, 6, 3, 0.98));
  border: 1px solid var(--gold);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 35px rgba(212, 168, 85, 0.2);
  transform: scale(0.94) translateY(20px);
  transition: transform 0.4s var(--spring);
  position: relative;
}
#zarinpal-modal-backdrop.open .zarinpal-modal {
  transform: scale(1) translateY(0);
}
.modal-close-icon {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: rgba(212, 168, 85, 0.08);
  color: var(--gold-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close-icon:hover {
  background: rgba(212, 168, 85, 0.22);
  transform: scale(1.1);
}
.zarinpal-header {
  text-align: center;
  margin-bottom: 22px;
}
.zarinpal-badge {
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
}
.zarinpal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 4px 0;
}
.zarinpal-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffe08a;
  text-shadow: 0 0 16px rgba(212, 168, 85, 0.5);
  margin-top: 6px;
}
.zarinpal-features {
  list-style: none;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 168, 85, 0.15);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.zarinpal-features li {
  font-size: 0.88rem;
  color: #e5dcc7;
  display: flex;
  align-items: center;
  gap: 10px;
}
.zarinpal-features li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
}
.zarinpal-checkout-btn {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e5b657, #b88628);
  border: none;
  color: #120902;
  font-family: var(--font-fa);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 28px rgba(212, 168, 85, 0.45);
  transition: all 0.3s var(--spring);
  text-decoration: none;
}
.zarinpal-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(212, 168, 85, 0.7);
  background: linear-gradient(135deg, #f0c56e, #c9932b);
}
.zarinpal-secure-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ─── GENERAL PROJECT MODAL ───────────────────────────────────────── */
#project-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 4, 6, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
#project-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.project-modal {
  width: min(520px, 94vw);
  background: linear-gradient(150deg, rgba(22, 15, 8, 0.95), rgba(8, 5, 2, 0.98));
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(212, 168, 85, 0.25);
  transform: scale(0.94) translateY(20px);
  transition: transform 0.4s var(--spring);
  position: relative;
}
#project-modal-backdrop.open .project-modal {
  transform: scale(1) translateY(0);
}
.modal-title {
  font-size: 1.6rem;
  color: var(--text-main);
  margin-bottom: 8px;
}
.modal-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ─── COLLABORATION POPOVER (همکاری) ────────────────────────── */
.collab-wrapper {
  position: relative;
  display: inline-block;
}
.nav-collab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(212, 168, 85, 0.08);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-family: var(--font-fa);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s;
}
.nav-collab-btn:hover, .nav-collab-btn.active {
  background: rgba(212, 168, 85, 0.2);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 20px rgba(212, 168, 85, 0.25);
  transform: translateY(-1px);
}
.collab-popover {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: auto;
  width: 320px;
  background: linear-gradient(160deg, rgba(26, 17, 9, 0.98), rgba(12, 8, 4, 0.99));
  border: 1px solid var(--gold);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 168, 85, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
  text-align: right;
  direction: rtl;
}
.collab-popover.open {
  display: block !important;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.collab-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 168, 85, 0.15);
}
.collab-popover-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-light);
}
.collab-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.collab-close-btn:hover { color: #fff; }
.collab-form-group {
  margin-bottom: 12px;
}
.collab-form-group label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.collab-input, .collab-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-main);
  font-family: var(--font-fa);
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.collab-input:focus, .collab-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 168, 85, 0.25);
}
.collab-textarea { resize: vertical; min-height: 75px; }
.collab-submit-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e5b657, #b88628);
  border: none;
  color: #120902;
  font-family: var(--font-fa);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
}
.collab-submit-btn:hover {
  background: linear-gradient(135deg, #f0c56e, #c9932b);
  transform: translateY(-1px);
}

/* ─── ALBUM COVER CARD (OFFICIAL MASTER ARTWORK) ─────────────── */
.album-cover-slot {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.album-cover-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.album-cover-frame {
  position: relative;
  width: 175px;
  height: 175px;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(212, 168, 85, 0.45);
  box-shadow:
    0 16px 45px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(220, 120, 40, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  background: #000;
  transition: transform 0.4s var(--spring), box-shadow 0.4s ease;
}
.album-cover-card:hover .album-cover-frame {
  transform: scale(1.03) translateY(-2px);
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.92),
    0 0 45px rgba(220, 120, 40, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
}
.album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.album-cover-glass-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.03) 45%, transparent 60%);
  pointer-events: none;
}
.album-cover-meta-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 168, 85, 0.25);
  border-radius: 999px;
  padding: 4px 14px;
}
.album-cover-artist {
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold-light);
}
.album-cover-sep {
  color: rgba(212, 168, 85, 0.5);
  font-size: 0.7rem;
}
.album-cover-desc {
  font-size: 0.75rem;
  color: #cbd5e1;
  font-weight: 500;
}

.supporter-email-wrap {
  margin-bottom: 18px;
  text-align: right;
}
.supporter-email-wrap label {
  display: block;
  font-size: 0.82rem;
  color: var(--gold-light);
  margin-bottom: 6px;
  font-weight: 500;
}
.supporter-email-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-en, monospace);
  font-size: 16px; /* Prevents iOS Safari unwanted zoom on focus */
  direction: ltr;
  text-align: left;
  outline: none;
  box-sizing: border-box;
  transition: all 0.25s;
}
.supporter-email-input:focus {
  border-color: #ffd978;
  box-shadow: 0 0 15px rgba(212, 168, 85, 0.35);
}

/* ─── HAMBURGER BUTTON (MOBILE / TABLET) ─────────────────────────── */
.nav-hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  padding: 0;
}
.nav-hamburger-btn:hover, .nav-hamburger-btn:active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}
.hamburger-line {
  width: 18px;
  height: 2px;
  background: #f1f5f9;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── MOBILE SLIDE-OUT SIDEBAR DRAWER ────────────────────────────── */
.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 7, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.mobile-sidebar-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: linear-gradient(165deg, rgba(16, 20, 27, 0.98), rgba(9, 11, 15, 0.99));
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.9), inset 1px 0 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  z-index: 950;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(212, 168, 85, 0.5));
}
.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  text-align: right;
}
.sidebar-brand-name {
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.12em;
}
.sidebar-brand-sub {
  font-family: var(--font-fa);
  font-size: 0.72rem;
  color: #94a3b8;
}
.sidebar-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.25s;
}
.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.1);
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  margin-bottom: 20px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-right: 4px;
  text-align: right;
}
.sidebar-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
  color: #f1f5f9;
  cursor: pointer;
  text-align: right;
  transition: all 0.25s ease;
  font-family: inherit;
}
.sidebar-link-item:hover, .sidebar-link-item:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-3px);
}
.sidebar-highlight-item {
  background: linear-gradient(135deg, rgba(212, 168, 85, 0.15), rgba(212, 168, 85, 0.05));
  border-color: rgba(212, 168, 85, 0.35);
}
.sidebar-highlight-item:hover {
  background: linear-gradient(135deg, rgba(212, 168, 85, 0.25), rgba(212, 168, 85, 0.1));
  border-color: var(--gold);
}
.sidebar-link-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.sidebar-link-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.sidebar-link-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
}
.sidebar-highlight-item .sidebar-link-title {
  color: var(--gold-light);
}
.sidebar-link-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}
.sidebar-link-arrow {
  font-size: 0.85rem;
  color: #64748b;
  transition: transform 0.2s;
}
.sidebar-link-item:hover .sidebar-link-arrow {
  color: #f8fafc;
  transform: translateX(-3px);
}

.sidebar-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sidebar-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 0.8rem;
}
.sidebar-social-link {
  color: #cbd5e1;
  text-decoration: none;
  font-family: var(--font-en);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.sidebar-social-link:hover {
  color: var(--gold-light);
}
.sidebar-copy {
  font-size: 0.65rem;
  color: #64748b;
  font-family: var(--font-en);
}

/* ─── RESPONSIVE & MOBILE / TABLET OPTIMIZATIONS ────────────── */

/* Tablets & Small Desktops */
@media (max-width: 1024px) {
  #top-nav {
    padding: 0 20px;
  }
  #track-passport {
    top: 76px;
    right: 18px;
    width: min(420px, calc(100vw - 36px));
    max-height: calc(100vh - 96px);
  }
}

/* Mobile Devices & Small Tablets */
@media (max-width: 768px) {
  #top-nav {
    padding: 0 14px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Show hamburger button on mobile */
  .nav-hamburger-btn {
    display: flex;
  }

  /* Hide project links from top bar on mobile (they are now in the sidebar drawer) */
  .nav-links {
    display: none !important;
  }

  /* Center brand logo perfectly without crowding */
  .nav-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
  }
  .brand-logo-img {
    height: 30px;
  }
  .brand-name {
    font-size: 0.88rem;
    letter-spacing: 0.08em;
  }
  .brand-sub {
    display: none;
  }

  /* Action buttons: hide collab from bar (in sidebar), keep buy button compact */
  .nav-actions {
    display: flex;
    align-items: center;
  }
  .collab-wrapper {
    display: none !important;
  }
  .nav-buy-btn {
    padding: 6px 12px;
    font-size: 0.74rem;
    gap: 5px;
    border-radius: 999px;
  }
  .nav-buy-icon {
    font-size: 0.75rem;
  }

  /* Collaboration popover when triggered from sidebar */
  .collab-popover {
    position: fixed;
    top: 70px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: 380px;
    margin: 0 auto;
    z-index: 1000;
  }

  /* Track Passport Bottom Sheet */
  #track-passport {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 82vh;
    border-radius: 26px 26px 0 0;
    transform: translateY(100%);
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 12px));
    -webkit-overflow-scrolling: touch;
  }
  #track-passport::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
  }
  #track-passport.active {
    transform: translateY(0);
  }

  /* Modals: Zarinpal & Project */
  .zarinpal-modal {
    width: min(520px, 94vw);
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 28px 20px 22px;
    border-radius: 22px;
  }
  .zarinpal-title {
    font-size: 1.45rem;
  }
  .project-modal {
    width: min(500px, 94vw);
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 28px 20px;
    border-radius: 22px;
  }
}

/* Compact Mobile (iPhone SE, Galaxy, 480px and below) */
@media (max-width: 480px) {
  #top-nav {
    padding: 0 10px;
    height: 54px;
  }
  .nav-hamburger-btn {
    width: 34px;
    height: 34px;
  }
  .hamburger-line {
    width: 16px;
  }
  .brand-logo-img {
    height: 26px;
  }
  .brand-name {
    font-size: 0.82rem;
  }
  .nav-buy-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
  }

  /* Tour guide adjustments for small screens */
  .tour-guide-wrap {
    padding: 16px 14px 14px;
    border-radius: 22px;
  }
  .tour-img-container {
    height: 200px;
  }
  .tour-slide-title {
    font-size: 1.02rem;
  }
  .tour-slide-desc {
    font-size: 0.8rem;
    line-height: 1.6;
    padding: 0 4px;
  }
  .tour-badge {
    font-size: 0.68rem;
    padding: 3px 12px;
    margin-bottom: 12px;
  }

  /* Album cover card on small mobile */
  .album-cover-frame {
    width: 145px;
    height: 145px;
  }
  .album-cover-meta-info {
    padding: 3px 10px;
    font-size: 0.7rem;
  }

  /* Scene Hint Pill */
  #scene-hint {
    font-size: 0.72rem;
    padding: 6px 14px;
    bottom: 14px;
    width: 90%;
    max-width: 320px;
  }
}
