body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.app-layout {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 200vw;         /* Scales beyond screen */
  height: 120vh;

  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 10%, var(--bg-dark) 80%),
    url("/static/media/app_index_background.webp") center center / contain no-repeat;
  background-blend-mode: overlay;

  pointer-events: none;  /* Optional: disable interaction */
}

.app-main {
  flex: 1;
}

/* === Centered Hero Text Block === */
.hero-content {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  text-align: center;
  color: var(--text-light);
  padding: 0 1rem;
  max-width: 90vw;
}

/* === Ensure All Hero Content Renders Above Overlay === */
.app-layout > * {
  position: relative;
  z-index: 1;
}

.app-nav-center {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3rem;
}

.app-nav-right {
  display: flex;
  gap: 0.5rem;
}

.app-nav-right button {
  background-color: var(--accent-blue);         /* Primary button in navbar */
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: var(--text-on-accent);                 /* Ensures high contrast text */
  font-weight: bold;
  cursor: pointer;
}

.app-nav-right .nav-link {
  color: var(--text-light);                     /* Main nav links */
  font-weight: 500;
  text-decoration: none;
  padding: 1rem 1rem;
  transition: color 0.2s ease;
} 

.app-nav-center .nav-link {
  color: var(--text-light);                     /* Center nav links */
  font-weight: 500;
  text-decoration: none;
  padding: 1rem 1rem;
  transition: color 0.2s ease;
}

.app-nav-left {
  font-size: 1.5rem;
  font-weight: bold;
}

.session-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3;
  transition: opacity 0.3s ease;
}



/* UI content below overlay by default, above when overlay is hidden */
.ui-content {
  position: relative;
  height: 100%;
  z-index: 2;
}

.center-container {
  position: fixed;
  display: flex;
  justify-content: center;
  top: 50%;
  left: 50%;
  transform: translate(-49%, -25%);
  text-align: center;
  z-index: 6; /* Bump up */
  pointer-events: auto;
}

.bottom-center-container {
  position: absolute;
  bottom: 9.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.7);
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1.5rem; /* spacing between title and controls */
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  z-index: 1;
  pointer-events: auto; /* Allow interaction */
}

.music-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0; /* remove top spacing */
}

.pause-btn,
.skip-btn,
.action-btn {
  background: none;
  border: none;
  padding: 6px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  stroke: white;

}

.session-btn-container {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center; /* Vertically center */
  z-index: 9;
  pointer-events: auto;
  overflow: auto;
}

.session-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  width: 100%;
  max-width: 90vw;
  min-height: 60vh; 
  justify-content: center; 
  margin-bottom: 3rem;
}

.session-header {
  color: var(--text-muted, #ccc);
  font-size: clamp(1.5rem, 5vw, 2.5rem);  /* Scales between 1.5rem and 2.5rem */
  margin-bottom: 0rem;
  text-align: center;
}

.session-subheader {
  color: var(--text-muted, #ccc);
  font-size: clamp(1rem, 3vw, 1.3rem);  /* Scales between 1rem and 1.5rem */
  font-weight: 100;
  max-width: 60ch;
  margin-bottom: 1.5rem;
  text-align: center;
}

.session-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.song-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
  padding-top: 0.3rem;

  flex-direction: column;
  align-items: flex-start;
}

.song-artist-wrapper {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.song-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tip-icon {
  width: 18px;
  height: 18px;
  fill: white;
  transform: translateY(3px)
}

.tag-bar {
  position: absolute;
  visibility: hidden;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #111;
  color: #ccc;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid #333;
  z-index: 2;

  height: 2rem; /* 🔒 lock the height */
  line-height: 1rem; /* ensures vertical alignment */
  overflow: hidden;

  display: flex;
  align-items: center;
}

.tag-bar-left {
  flex-shrink: 0;
  visibility: visible;
  font-size: 2rem;
}

.tag-bar-center {
  visibility: hidden;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2.5rem;
}

.tag-label {
  white-space: nowrap;
  font-family: 'Lora', serif;
}

.recording-status-btn {
  background: transparent;
  border: none;
  color: #ccc;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 400;
  cursor: default;
  pointer-events: none;
  padding: 4px 8px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Animate when content is shown (i.e. during recording) */
.recording-status-btn:not(:empty) {
  animation: slowFadePulse 10s ease-in-out infinite;
}



@keyframes slowFadePulse {
  0%   { opacity: 0.3; }
  50%  { opacity: 1; }
  100% { opacity: 0.3; }
}





.volume-toggle-wrapper {
  position: fixed;
  bottom: 50px; /* Just above the help button */
  left: 20px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  z-index: 1;
}

.volume-btn {
  background-color: rgba(20, 20, 20, 0.7);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 1.2rem;
}

.volume-slider {
  appearance: none;
  -webkit-appearance: none;
  writing-mode: vertical-lr;
  transform: rotate(180deg) translateX(3px); /* Shift left */

  height: 100px;
  width: 30px;
  background: transparent;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-bottom: 12px;
}

.volume-toggle-wrapper.open .volume-slider {
  opacity: 1;
  pointer-events: auto;
}

/* WebKit Track */
.volume-slider::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.5);
  width: 6px;
  height: 100%;
  border-radius: 3px;
  margin: auto;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* WebKit Thumb */
.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  border: 2px solid black;
  cursor: pointer;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}
















/* ---------- Core visibility ---------- */
.hidden { display: none !important; }

/* Optional body lock when using centered modal (not used for docked) */
body.tut-open { overflow: hidden; }

/* Right-aligned, relative (in normal flow) */
.tutorial-window {
  position: relative;                  /* ← relative, not fixed */
  width: min(35vw);
  max-width: 640px;


  /* push to the right edge of its container */
  margin-left: auto;                   /* key line */
  margin-right: 0;

  /* your existing look */
  background: rgba(18,18,22,0.96);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  box-shadow: -10px 0 30px rgba(0,0,0,0.45);
  color: #f2f2f2;
  padding: 16px 18px 14px;
  z-index: 1000; /* only affects stacking, not layout */
}

/* optional: simple 'collapsed' state for relative layout */
.tutorial-window.is-collapsed { display: none; }

/* ---------- Optional: centered modal variant ----------
   Add the class .is-modal (and remove .is-collapsed) to use this mode. */
.tutorial-window.is-modal {
  inset: 0;
  left: 0; right: 0; top: 0; bottom: 0;
  margin: auto;
  width: min(760px, 92vw);
  max-height: 85vh;
  border-radius: 16px;
  border-left: 1px solid rgba(255,255,255,0.10); /* keeps visual parity */
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ---------- Header & text ---------- */
#tut-title {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
  margin: 4px 28px 8px 6px; /* leave room for collapse button */
}

.tut-lead {
  margin: 0 6px 12px;
  opacity: 0.92;
  line-height: 1.45;
}

.tut-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 6px 8px;
}

#tut-title {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
  margin: 0;
}

/* send the button to the far right */
.tut__collapse {
  margin-left: auto;          /* 👈 key line */
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  font: 700 18px/1 inherit;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}

.tut__collapse:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.tut__collapse:active { transform: translateY(0); }
.tut__collapse:focus-visible { outline: 2px solid #b5a9ff; outline-offset: 2px; }

/* ---------- Content panels ---------- */
.tut-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 12px;
  margin: 12px 6px;
}

.tut-sub {
  margin: 4px 0 8px;
  font-weight: 600;
}

/* Examples grid */
.tut-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tut-examples blockquote {
  margin: 6px 0;
  padding-left: 10px;
  border-left: 3px solid rgba(255,255,255,0.18);
  opacity: 0.92;
}
.tut-bad, .tut-good {
  border-radius: 10px;
  padding: 8px;
}
.tut-bad  { background: rgba(255, 96, 96, 0.08); }
.tut-good { background: rgba(96, 255, 170, 0.08); }

/* Tips list */
.tut-tips {
  margin: 12px 6px 6px;
  padding-left: 20px;
  opacity: 0.95;
}
.tut-tips li { margin: 6px 0; }

/* Actions row */
.tut-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 6px 4px;
}

/* Primary button */
.tut-primary {
  border: none;
  background: var(--accent-blue);
  color: var(--text-on-accent);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 160ms ease, transform 120ms ease;
}
.tut-primary:hover { filter: brightness(1.05); }
.tut-primary:active { transform: translateY(1px); }
.tut-primary:focus-visible { outline: 2px solid #d6cdff; outline-offset: 2px; }

/* ---------- Scrollbar polish (WebKit) ---------- */
.tutorial-window::-webkit-scrollbar { width: 10px; }
.tutorial-window::-webkit-scrollbar-track { background: transparent; }
.tutorial-window::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
}
.tutorial-window::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .tut-examples { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .tutorial-window {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    border-left: 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.4);
  }
  #tut-title { margin-right: 8px; }
  .tut-primary { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .tutorial-window { transition: none; }
  .tut__collapse { transition: none; }
}
