@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f172a;
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-glow: rgba(139, 92, 246, 0.2);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.35);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  height: 100%;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  inset: 0;
}

/* Base Layout Wrapper */
.app-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: clamp(8px, 1.5vh, 12px) clamp(12px, 3.5vw, 16px);
  padding-top: max(clamp(8px, 1.5vh, 12px), env(safe-area-inset-top));
  padding-bottom: max(clamp(8px, 1.5vh, 12px), env(safe-area-inset-bottom));
  padding-left: max(clamp(12px, 3.5vw, 16px), env(safe-area-inset-left));
  padding-right: max(clamp(12px, 3.5vw, 16px), env(safe-area-inset-right));
  overflow: hidden;
}

@media (min-width: 480px) {
  body {
    position: static;
    height: auto;
    min-height: 100vh;
    align-items: center;
    overflow: auto;
  }
  .app-container {
    height: 850px;
    max-height: 900px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    background: rgba(8, 12, 20, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    padding: 16px 20px;
  }
}

/* Screen Transitions */
.screen {
  display: none !important;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
}

/* Glassmorphic Card Styles */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.35);
}

/* Premium Typography & Titles */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet) 50%, var(--accent-pink));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 6s ease infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-pink));
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 16px 28px;
  font-family: var(--font-family);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin-left: auto;
  margin-right: auto;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5), var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.6;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--glass-border);
  border-radius: 16px;
  padding: 14px 24px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin-left: auto;
  margin-right: auto;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:disabled,
.btn-secondary.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
}

/* HEADER COMPONENT */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.app-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 0.2px;
}

/* START SCREEN SPECIFICS */
#start-screen {
  height: 100%;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 3vh, 26px);
  padding-top: clamp(8px, 2.5vh, 22px);
  padding-bottom: clamp(6px, 1.5vh, 16px);
  overflow: hidden;
}

.logo-container {
  position: relative;
  margin-bottom: clamp(4px, 1vh, 10px);
  flex-shrink: 0;
}

.logo-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ec4899, #8b5cf6 50%, #06b6d4 100%);
  margin: 0 auto 6px auto;
  filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.6));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(180deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

/* Recent Game Rank Banner (Start Screen) */
.recent-rank-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: clamp(6px, 1.2vh, 10px) 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 12px rgba(139, 92, 246, 0.15);
  flex-shrink: 0;
  margin-bottom: clamp(2px, 0.8vh, 6px);
  animation: fadeInDown 0.4s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.recent-rank-badge-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
}

.recent-rank-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.recent-rank-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.recent-rank-name {
  font-size: clamp(0.85rem, 1.8vh, 0.96rem);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.recent-rank-stat {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.game-intro {
  margin-bottom: 0;
  padding: 16px 18px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.game-intro h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.game-intro p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.rules-list {
  text-align: left;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.rule-icon {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: bold;
}

/* GAME SCREEN SPECIFICS */
#game-screen {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 0;
}

@media (max-height: 520px) {
  #game-screen {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

.game-top-bar {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 12px);
  margin-bottom: clamp(6px, 1.2vh, 12px);
  flex-shrink: 0;
}

/* Instagram Story style Progress Bars */
.progress-container {
  display: flex;
  gap: 6px;
  width: 100%;
}

.progress-segment {
  height: 5px;
  flex: 1;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-segment-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.1s linear;
}

.progress-segment.active .progress-segment-fill {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
}

.progress-segment.success {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.progress-segment.fail {
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.round-counter {
  font-weight: 600;
  font-size: clamp(0.82rem, 1.6vh, 0.95rem);
  color: var(--text-secondary);
}

.sudden-death-pill {
  font-size: clamp(0.6rem, 1.2vh, 0.65rem);
  font-weight: 800;
  color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.35);
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: modeBadgePulse 2s infinite alternate;
}

/* Timer Badge and Pulsing Animations */
.timer-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: clamp(4px, 0.8vh, 6px) clamp(8px, 2vw, 12px);
  border-radius: 99px;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.8vh, 0.95rem);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  min-width: 72px;
  flex-shrink: 0;
}

#timer-text {
  font-variant-numeric: tabular-nums;
}

.timer-badge.warning {
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--warning);
}

.timer-badge.danger {
  border-color: rgba(239, 68, 68, 0.5);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  animation: timerPulse 0.5s infinite alternate;
}

@keyframes timerPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); box-shadow: 0 0 12px rgba(239, 68, 68, 0.4); }
}

/* Word Prompt Card */
.prompt-card {
  position: relative;
  overflow: hidden;
  height: clamp(56px, 8.5vh, 76px); /* Adaptive height locked per viewport to prevent shift */
  padding: 0;   /* Remove padding so children can fill the inset */
  border-radius: 14px;
  flex-shrink: 0;
}

.prompt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet), var(--accent-pink));
  z-index: 5; /* Keep the top gradient line above sliding layers */
}

/* Front Clue Layer (Slides up to reveal back) */
.prompt-clue-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.45); /* translucent glass cover matching theme */
  z-index: 3;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.prompt-clue-layer.revealed {
  transform: translateY(-100%);
}

.prompt-label {
  font-size: clamp(0.62rem, 1.1vh, 0.72rem);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.prompt-word {
  font-size: clamp(1.15rem, 2.4vh, 1.55rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

/* Back Results Layer (Always behind front) */
.prompt-results-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.6); /* slightly darker glass back */
  z-index: 1;
}

.prompt-results-score {
  font-size: clamp(1.15rem, 2.4vh, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.3px;
}

.prompt-results-commentary {
  font-size: clamp(0.72rem, 1.3vh, 0.82rem);
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* Interactive Color Picker Layout */
.picker-container {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 12px);
  flex: 1;
  min-height: 0;
  justify-content: space-between;
}

.canvas-wrapper {
  position: relative;
  width: min(82vw, 320px, calc(100dvh - 330px));
  height: min(82vw, 320px, calc(100dvh - 330px));
  aspect-ratio: 1 / 1;
  min-width: 150px;
  min-height: 150px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  touch-action: none;
  margin: 0 auto;
  flex-shrink: 0;
}

#picker-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.picker-cursor {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.8), inset 0 0 4px rgba(0,0,0,0.5);
  transition: transform 0.05s ease-out;
}

.true-color-cursor {
  position: absolute;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}

.true-color-ring-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 6px var(--accent-pink)) drop-shadow(0 0 2px var(--accent-cyan));
  animation: rotateTrueColor 2.5s linear infinite;
}

.true-color-circle-ring {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 3.5;
}

@keyframes rotateTrueColor {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cursor-label {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: top 0.2s ease;
}

.cursor-label.label-below {
  top: 38px !important;
}

.cursor-label.label-left-edge {
  left: 0 !important;
  transform: translateX(0) !important;
}

.cursor-label.label-right-edge {
  left: auto !important;
  right: 0 !important;
  transform: translateX(0) !important;
}

.true-color-cursor .cursor-label {
  border-color: var(--accent-cyan);
}

.user-guess-label {
  border-color: #fff;
}

.user-guess-hue-marker {
  position: absolute;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 3px dashed #fff;
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  z-index: 4;
}

/* Rainbow Hue Slider */
.hue-slider-wrapper {
  width: 100%;
  height: clamp(18px, 2.3vh, 22px);
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  overflow: visible;
  touch-action: none;
  flex-shrink: 0;
}

.hue-bg {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: linear-gradient(to right, 
    #ff0000 0%, #ffff00 17%, #00ff00 33%, 
    #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
}

.hue-thumb {
  position: absolute;
  width: clamp(22px, 3vh, 26px);
  height: clamp(22px, 3vh, 26px);
  background: #fff;
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  transition: transform 0.05s ease-out;
}

/* Compare Colors Section */
.compare-area {
  display: flex;
  gap: clamp(8px, 1.5vw, 14px);
  margin-top: 0;
  margin-bottom: 0;
  flex-shrink: 0;
}

.color-preview-box {
  flex: 1;
  height: clamp(44px, 6vh, 62px);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.color-preview-label {
  font-size: clamp(0.6rem, 1.1vh, 0.7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 2;
}

.color-preview-hex {
  font-size: clamp(0.72rem, 1.2vh, 0.8rem);
  font-family: monospace;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 2;
}

.color-preview-cover {
  position: absolute;
  inset: 0;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-muted);
  z-index: 3;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.color-preview-cover.revealed {
  transform: translateY(-100%);
}

/* Gameplay Action Buttons */
#btn-submit-guess,
#btn-next-round {
  margin-top: auto;
  margin-bottom: clamp(16px, 4vh, 32px);
  flex-shrink: 0;
  padding: clamp(12px, 1.8vh, 16px) 24px;
  min-height: clamp(48px, 6vh, 54px);
  font-size: clamp(1rem, 1.9vh, 1.12rem);
  font-weight: 700;
  border-radius: 16px;
  width: 100%;
}

@media (min-height: 680px) {
  #btn-submit-guess,
  #btn-next-round {
    margin-bottom: clamp(36px, 9vh, 92px);
    padding: clamp(15px, 2.2vh, 18px) 24px;
    min-height: clamp(52px, 6.8vh, 60px);
    font-size: clamp(1.05rem, 2vh, 1.16rem);
  }
}

/* Grade Feedback Popup Overlay */
.feedback-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  padding: 20px;
  border: none;
}

.feedback-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.feedback-score {
  font-size: 2.2rem;
  font-weight: 800;
}

.feedback-score.perfect { color: var(--success); text-shadow: 0 0 10px rgba(16,185,129,0.3); }
.feedback-score.good { color: var(--warning); text-shadow: 0 0 10px rgba(245,158,11,0.3); }
.feedback-score.poor { color: var(--danger); text-shadow: 0 0 10px rgba(239,68,68,0.3); }

.feedback-commentary {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* RESULTS SCREEN */
#results-screen {
  gap: 20px;
  overflow-y: auto;
  padding-bottom: 24px;
  position: relative;
}

#crown-rain-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#results-screen > *:not(#crown-rain-canvas) {
  position: relative;
  z-index: 1;
}

/* Hide scrollbars for results layout */
#results-screen::-webkit-scrollbar {
  display: none;
}

.results-summary {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Circular Progress gauge */
.score-circle-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.score-circle-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 8;
}

.score-circle-fill {
  fill: none;
  stroke: url(#scoreGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-text-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.score-pct {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.score-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  max-width: 80px;
  line-height: 1.1;
  margin-top: 2px;
}

.summary-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.stat-item-label {
  color: var(--text-secondary);
}

.stat-item-val {
  font-weight: 600;
}

/* Leaderboard Distribution Graph Card */
.leaderboard-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leaderboard-title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.distribution-graph-container {
  width: 100%;
  height: 140px;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

#distribution-svg {
  width: 100%;
  height: 100%;
}

.distribution-line {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-dasharray: 4 4;
  opacity: 0.3;
}

.distribution-curve {
  fill: url(#curveGradient);
  stroke: var(--accent-violet);
  stroke-width: 3;
}

.user-marker-line {
  stroke: var(--accent-pink);
  stroke-width: 2;
  stroke-dasharray: 2 2;
}

.user-marker-dot {
  fill: var(--accent-pink);
  stroke: #fff;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px var(--accent-pink));
  animation: pulseMarker 1.5s infinite;
}

@keyframes pulseMarker {
  0% { r: 5; }
  50% { r: 7; }
  100% { r: 5; }
}

.graph-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* History Details list */
.history-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.history-index {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 16px;
}

.history-label {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.history-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.history-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-colors {
  display: flex;
  gap: 4px;
  align-items: center;
}

.history-color-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.history-score {
  font-size: 1rem;
  font-weight: 700;
  width: 50px;
  text-align: right;
}

.history-score.perfect { color: var(--success); }
.history-score.good { color: var(--warning); }
.history-score.poor { color: var(--danger); }

.history-item.locked {
  opacity: 0.4;
  background: rgba(255, 255, 255, 0.01);
  border-style: dashed;
}

.history-item.locked .history-name {
  color: var(--text-muted);
}

/* POST-GAUNTLET CONTINUATION CARD */
.continuation-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: continuationFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 6px;
  margin-bottom: 6px;
}

@keyframes continuationFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.continuation-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.continuation-icon {
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.06);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.continuation-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.continuation-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.continuation-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.btn-continuation {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-continuation:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

.btn-continuation:active {
  transform: translateY(1px);
}

/* LIFETIME STATS SECTION & ROUNDS SURVIVED BAR CHART */
.lifetime-stats-card {
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
}

.lifetime-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lifetime-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.lifetime-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.lifetime-metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.2s ease;
}

.lifetime-metric-box.crown-box {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.15);
}

.lifetime-crown-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.lifetime-metric-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.lifetime-metric-box.crown-box .lifetime-metric-val {
  color: #fbbf24;
}

.lifetime-metric-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  white-space: nowrap;
}

.lifetime-chart-section {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
}

.lifetime-chart-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.lifetime-barchart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100px;
  padding: 12px 2px 0 2px;
  gap: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lifetime-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  min-width: 0;
}

.lifetime-bar-count {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.lifetime-bar-fill {
  width: 100%;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--accent-violet), rgba(139, 92, 246, 0.25));
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.lifetime-bar-col.crown-col .lifetime-bar-fill,
.lifetime-bar-col.crown-col.active-round .lifetime-bar-fill {
  background: linear-gradient(180deg, #f59e0b, rgba(245, 158, 11, 0.3));
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.lifetime-bar-col.active-round:not(.crown-col) .lifetime-bar-fill {
  background: linear-gradient(180deg, var(--accent-pink), var(--accent-violet));
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.7);
}

.lifetime-bar-col.active-round .lifetime-bar-count {
  color: #fff;
  font-weight: 800;
}

/* Lifetime Bar Chart X-Axis Labels (0 to 10 👑) */
.lifetime-x-axis {
  display: flex;
  justify-content: space-between;
  padding: 6px 2px 0 2px;
  gap: 3px;
}

.lifetime-x-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}

.lifetime-x-label.crown-label {
  color: #fbbf24;
  font-weight: 700;
  white-space: nowrap;
}

.lifetime-x-label.active-label {
  color: #fff;
  font-weight: 800;
}

/* TOAST MESSAGE (Clipboard copy alert) */
.toast {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 50%) scale(0.9);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-violet);
  padding: 12px 24px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.2);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

.toast-icon {
  color: var(--success);
  font-size: 1.1rem;
}

.toast-text {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* DEVELOPER SANDBOX CONTROL PANEL */
.dev-sandbox-card {
  margin-top: auto;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.03);
  border: 1.5px dashed rgba(239, 68, 68, 0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-sandbox-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dev-controls {
  display: flex;
  gap: 10px;
}

.btn-dev {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s ease;
}

.btn-dev:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-dev.active {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* Confetti container */
#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 98;
}

/* ================= INSTRUCTIONS CAROUSEL SYSTEM ================= */
.carousel-container {
  position: relative;
  width: 100%;
  height: 200px; /* Lock height to completely eliminate vertical page resizing on swipe */
  overflow: hidden;
  margin-bottom: 6px;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.carousel-container:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.carousel-slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.carousel-visual-box {
  width: 100%;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.carousel-content {
  padding: 0 6px;
}

.carousel-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.carousel-step-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* CAROUSEL ILLUSTRATION ANIMATIONS */

/* Slide 1 - Custom Picker Visual */
.mini-picker-demo {
  width: 120px;
  height: 60px;
  position: relative;
}

.mini-picker-gradient {
  width: 100%;
  height: 48px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #06b6d4);
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.mini-picker-cursor {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  top: 30%;
  left: 20%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px rgba(0,0,0,0.8);
  animation: driftCursor 4s ease-in-out infinite alternate;
}

@keyframes driftCursor {
  0% { left: 20%; top: 30%; }
  50% { left: 80%; top: 70%; }
  100% { left: 50%; top: 45%; }
}

.mini-hue-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  margin-top: 6px;
  background: linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  border: 1.5px solid rgba(0,0,0,0.5);
}

/* Slide 2 - Sudden Death 70% Cutoff Animation */
.mini-suddendeath-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 220px;
}

.sd-track-wrap {
  width: 100%;
  position: relative;
  padding-top: 10px;
}

.sd-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sd-fill {
  height: 100%;
  border-radius: 99px;
  animation: suddenDeathFillCycle 4s ease-in-out infinite;
}

.sd-cutoff-line {
  position: absolute;
  left: 70%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #f8fafc;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  z-index: 5;
}

.sd-cutoff-tag {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.sd-badge-wrap {
  position: relative;
  height: 26px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sd-badge-pass,
.sd-badge-fail {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.sd-badge-pass {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
  animation: badgePassCycle 4s ease-in-out infinite;
}

.sd-badge-fail {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
  animation: badgeFailCycle 4s ease-in-out infinite;
}

@keyframes suddenDeathFillCycle {
  0%, 40% {
    width: 84%;
    background: linear-gradient(90deg, #10b981, #22c55e);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  }
  48%, 90% {
    width: 58%;
    background: linear-gradient(90deg, #ef4444, #f43f5e);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  }
  98%, 100% {
    width: 84%;
    background: linear-gradient(90deg, #10b981, #22c55e);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  }
}

@keyframes badgePassCycle {
  0%, 40% {
    opacity: 1;
    transform: scale(1);
  }
  45%, 95% {
    opacity: 0;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes badgeFailCycle {
  0%, 42% {
    opacity: 0;
    transform: scale(0.85);
  }
  48%, 90% {
    opacity: 1;
    transform: scale(1);
  }
  96%, 100% {
    opacity: 0;
    transform: scale(0.85);
  }
}

/* Slide 3 - Popping Emoji Blocks Visual */
.mini-share-demo {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  height: 40px;
}

.mini-block {
  font-size: 1.6rem;
  animation: emojiBlockPop 3s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
  opacity: 0;
}

.mini-block.animate-pop-1 { animation-delay: 0.1s; }
.mini-block.animate-pop-2 { animation-delay: 0.3s; }
.mini-block.animate-pop-3 { animation-delay: 0.5s; }
.mini-block.animate-pop-4 { animation-delay: 0.7s; }
.mini-block.animate-pop-5 { animation-delay: 0.9s; }

@keyframes emojiBlockPop {
  0% { opacity: 0; transform: scale(0.5) translateY(10px); }
  15% { opacity: 1; transform: scale(1) translateY(0); }
  80% { opacity: 1; transform: scale(1) translateY(0); }
  90% { opacity: 0; transform: scale(0.6) translateY(-5px); }
  100% { opacity: 0; transform: scale(0.5) translateY(10px); }
}

/* Carousel dots navigation */
.carousel-nav {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-dot.active {
  background: var(--accent-violet);
  box-shadow: 0 0 6px var(--accent-violet);
  transform: scale(1.2);
}

/* ================= SPECIAL BIRTHDAY CHALLENGE BANNER ================= */
.birthday-banner-container {
  text-align: center;
  margin-bottom: 24px;
  animation: birthdayScaleIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.birthday-title-glowing {
  font-family: var(--font-family);
  font-size: 2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ff007f, #ff00ff, #00ffff, #00ff00, #ffff00);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: birthdayRainbow 6s linear infinite, birthdayGlow 2.5s ease-in-out infinite alternate;
  text-shadow: 0 0 20px rgba(255, 0, 127, 0.4);
}

.birthday-sub-glow {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  opacity: 0.9;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  margin-top: 8px;
}

@keyframes birthdayScaleIn {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes birthdayRainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes birthdayGlow {
  0% {
    filter: drop-shadow(0 0 5px rgba(255, 0, 127, 0.5)) drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
  }
  100% {
    filter: drop-shadow(0 0 15px rgba(255, 0, 127, 0.8)) drop-shadow(0 0 25px rgba(0, 255, 255, 0.6)) drop-shadow(0 0 35px rgba(245, 158, 11, 0.5));
  }
}

/* ================= JENNA MODE STYLES ================= */
.jenna-header-container {
  width: 100%;
  text-align: center;
  margin-top: 10px;
  animation: jennaFadeIn 0.5s ease-in-out;
}

.jenna-mode-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
  letter-spacing: 0.5px;
}

.jenna-date-selector-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 20px 0;
  width: 100%;
}

.btn-date-nav {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-date-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.date-picker-wrapper {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 6px 16px;
  min-width: 180px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-picker-wrapper:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
}

#display-simulated-date {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

#jenna-date-picker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.btn-feedback {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-feedback:hover {
  transform: scale(1.25);
}

.btn-feedback:active {
  transform: scale(0.9);
}

@keyframes jennaFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= FEEDBACK MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  max-width: 400px;
  width: 100%;
  position: relative;
  padding: 28px 24px 24px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #0d1322;
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(139, 92, 246, 0.2);
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  padding-top: 4px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.feedback-rating-container {
  display: flex;
  gap: 14px;
  width: 100%;
}

.btn-rating-option {
  flex: 1;
  padding: 14px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--glass-border);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-rating-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-rating-option.selected[data-rating="positive"] {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
  transform: scale(1.03);
}

.btn-rating-option.selected[data-rating="negative"] {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.18);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
  transform: scale(1.03);
}

.rating-emoji {
  font-size: 1.75rem;
  line-height: 1;
}

.rating-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-rating-option.selected .rating-label {
  color: #fff;
}

.feedback-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-input-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feedback-textarea {
  width: 100%;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid var(--glass-border);
  color: #fff;
  padding: 12px 14px;
  font-family: var(--font-family);
  font-size: 0.92rem;
  line-height: 1.4;
  resize: none;
  outline: none;
  transition: all 0.2s ease;
}

.feedback-textarea::placeholder {
  color: var(--text-muted);
}

.feedback-textarea:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.25);
}

