/* ========== DESIGN TOKENS ========== */
:root {
  --bg: #1a1510;
  --surface: rgba(255, 240, 200, 0.07);
  --surface-hover: rgba(255, 240, 200, 0.12);
  --border: rgba(255, 240, 200, 0.12);
  --text-primary: #f5e6c8;
  --text-muted: #a89070;
  --accent: #e8b86d;
  --accent-glow: rgba(232, 184, 109, 0.3);
  --accent-2: #d4a05a;
  --accent-3: #f0c97e;
  --danger: #e07060;
  --radius: 16px;
  --radius-sm: 10px;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
}

/* ========== GRAIN OVERLAY ========== */
.grain-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  will-change: auto;
  transform: translateZ(0);
}

/* ========== REALISTIC BACKGROUND SCENES ========== */
.scene-bg {
  position: fixed; inset: -10%;
  width: 120%; height: 120%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: pan-zoom 40s linear infinite alternate;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.scene-bg.active { opacity: 1; }

@keyframes pan-zoom {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, -2%) scale(1.05); }
}

/* Dark overlay on scenes so UI panels are readable */
.scene-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(15, 12, 10, 0.5); /* darker for better contrast */
  pointer-events: none;
}

#scene-rain { background-image: url('https://h2oglobalnews.com/wp-content/uploads/2023/08/rain-facts.webp'); }
#scene-cafe { background-image: url('https://images.unsplash.com/photo-1497935586351-b67a49e012bf?q=80&w=1920&auto=format&fit=crop'); }
#scene-forest { background-image: url('https://images.unsplash.com/photo-1511497584788-876760111969?q=80&w=1920&auto=format&fit=crop'); }
#scene-tree { background-image: url('https://images.unsplash.com/photo-1502082553048-f009c37129b9?q=80&w=1920&auto=format&fit=crop'); }
#scene-city { background-image: url('https://images.unsplash.com/photo-1519501025264-65ba15a82390?q=80&w=1920&auto=format&fit=crop'); }

.global-rain {
  position: fixed; inset: 0;
  z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ========== TOP BAR ========== */
.top-bar {
  position: fixed;
  top: 20px; left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(26, 21, 16, 0.65);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 240, 200, 0.15);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.scene-tabs {
  display: flex;
  gap: 4px;
}

.scene-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.scene-tab::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(232,184,109,0.08) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.scene-tab:hover::before { transform: translateX(100%); }
.scene-tab:hover {
  background: var(--surface);
  color: var(--text-primary);
}
.scene-tab.active {
  background: linear-gradient(135deg, rgba(232,184,109,0.12), rgba(232,184,109,0.06));
  border-color: rgba(232,184,109,0.25);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(232,184,109,0.1), inset 0 1px 0 rgba(255,255,255,0.08);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(232, 184, 109, 0.22);
  border-radius: 20px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(232, 184, 109, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}
.clock:hover {
  color: var(--text-primary);
  border-color: rgba(232, 184, 109, 0.45);
  box-shadow: 0 0 15px rgba(232, 184, 109, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: scale(1.03);
}

.settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 240, 200, 0.04);
  border: 1px solid rgba(255, 240, 200, 0.1);
  color: var(--text-muted);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.settings-btn:hover {
  color: var(--accent);
  background: rgba(232, 184, 109, 0.1);
  border-color: rgba(232, 184, 109, 0.35);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(232, 184, 109, 0.2);
}
#btn-settings:hover {
  transform: rotate(45deg) scale(1.08);
}
.settings-btn:active {
  transform: scale(0.95);
}

/* ========== MAIN CONTENT ========== */
.main-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  height: 100vh;
  padding: 80px 40px 80px;
}

/* ========== GLASS PANEL ========== */
.glass-panel {
  background: linear-gradient(160deg, rgba(30, 25, 18, 0.6) 0%, rgba(22, 18, 12, 0.45) 100%);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255, 240, 200, 0.15);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 40px rgba(232,184,109,0.03), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: border-color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  contain: layout style;
  will-change: transform, box-shadow, border-color;
  transform: translate3d(0, 0, 0);
}
.glass-panel::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(232,184,109,0.04) 25%, transparent 50%);
  animation: panel-shimmer 8s linear infinite;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
@keyframes panel-shimmer {
  0% { transform: rotate(0deg) translateZ(0); }
  100% { transform: rotate(360deg) translateZ(0); }
}
.glass-panel:hover {
  border-color: rgba(232, 184, 109, 0.35);
  box-shadow: 0 32px 80px rgba(0,0,0,0.65), 0 0 30px rgba(232,184,109,0.12), inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translate3d(0, -4px, 0);
}

/* ========== POMODORO ========== */
.pomodoro-panel {
  width: 300px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.pomodoro-panel h2 {
  background: linear-gradient(135deg, var(--accent-3), var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.timer-ring-container {
  position: relative;
  width: 180px; height: 180px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(232, 184, 109, 0.12), 0 0 45px rgba(232, 184, 109, 0.05), inset 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.timer-ring-container::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 184, 109, 0.08) 0%, transparent 70%);
  animation: timer-aura 6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes timer-aura {
  0% { opacity: 0.4; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1.03); }
}

.timer-ring {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: rgba(255,240,200,0.06);
  stroke-width: 6;
}

.timer-ring-progress {
  fill: none;
  stroke: url(#timer-gradient);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-ring-progress.break-mode {
  stroke: #7ec8a0;
}

.timer-display {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-time {
  font-family: 'Space Mono', monospace;
  font-size: 36px;
  color: var(--text-primary);
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(232,184,109,0.2);
  animation: timer-breathe 4s ease-in-out infinite;
}
@keyframes timer-breathe {
  0%, 100% { text-shadow: 0 0 20px rgba(232,184,109,0.15); }
  50% { text-shadow: 0 0 30px rgba(232,184,109,0.3), 0 0 60px rgba(232,184,109,0.1); }
}

.timer-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.timer-finish-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  opacity: 0.7;
}

.session-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.session-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,240,200,0.15);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.session-dot.filled {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); transform: scale(1); }
  50% { box-shadow: 0 0 14px var(--accent-glow); transform: scale(1.2); }
}

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

.timer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.timer-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.timer-btn:hover::after { transform: translateX(100%); }
.timer-btn:hover {
  background: var(--surface-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.timer-btn:active { transform: translateY(0) scale(0.97); }
.timer-btn.primary {
  background: linear-gradient(135deg, rgba(232,184,109,0.2), rgba(232,184,109,0.1));
  border-color: rgba(232,184,109,0.3);
  color: var(--accent);
}
.timer-btn.primary:hover {
  background: linear-gradient(135deg, rgba(232,184,109,0.3), rgba(232,184,109,0.15));
  box-shadow: 0 4px 24px rgba(232,184,109,0.25);
}

.timer-shortcut-hint {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ========== PRODUCTIVITY PANEL (Tasks & Notes) ========== */
.prod-panel {
  width: 360px;
  height: 420px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.prod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.prod-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 240, 200, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
.prod-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: 0.5px;
}
.prod-tab:hover {
  color: var(--text-primary);
}
.prod-tab.active {
  background: linear-gradient(135deg, rgba(232, 184, 109, 0.18) 0%, rgba(232, 184, 109, 0.08) 100%);
  border: 1px solid rgba(232, 184, 109, 0.25);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-shadow: 0 0 8px rgba(232, 184, 109, 0.2);
}
.prod-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s ease;
}
.prod-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}
.prod-view {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0; /* Fix flexbox container stretching overflow bug */
}
.prod-view.active {
  display: flex;
  animation: fadeIn 0.4s ease;
}

/* Tasks specific */
.task-input-container {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.task-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 240, 200, 0.08);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.task-input:focus {
  border-color: rgba(232, 184, 109, 0.4);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 0 12px rgba(232, 184, 109, 0.1);
}
.add-task-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(232, 184, 109, 0.18), rgba(232, 184, 109, 0.06));
  border: 1px solid rgba(232, 184, 109, 0.25);
  color: var(--accent);
  width: 40px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.add-task-btn:hover {
  background: linear-gradient(135deg, rgba(232, 184, 109, 0.28), rgba(232, 184, 109, 0.12));
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(232, 184, 109, 0.2);
  transform: scale(1.03);
}
.add-task-btn:active {
  transform: scale(0.97);
}
.task-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}
.task-list::-webkit-scrollbar { width: 4px; }
.task-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 240, 200, 0.02);
  border: 1px solid rgba(255, 240, 200, 0.06);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.task-item:hover {
  border-color: rgba(255, 240, 200, 0.12);
  background: rgba(255, 240, 200, 0.06);
  transform: translate3d(2px, 0, 0);
}
.task-item.completed .task-text {
  text-decoration: line-through;
  opacity: 0.45;
}
.task-text {
  flex: 1;
  font-size: 14px;
  cursor: pointer;
}
.task-delete {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 4px;
}
.task-item:hover .task-delete { opacity: 0.7; }
.task-delete:hover { opacity: 1; transform: scale(1.1); }

.notepad-textarea {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 240, 200, 0.08);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.notepad-textarea::placeholder { color: var(--text-muted); opacity: 0.5; }
.notepad-textarea:focus {
  border-color: rgba(232, 184, 109, 0.4);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 0 12px rgba(232, 184, 109, 0.1);
}

.notepad-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.save-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.save-indicator.visible { opacity: 1; }

/* ========== BOTTOM MUSIC BAR ========== */
.bottom-section {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.yt-hidden-player {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: calc(100% - 40px);
  max-width: 1200px;
  height: 0;
  border: 1px solid rgba(255, 240, 200, 0.12);
  border-radius: 16px;
  transition: height 0.4s ease, opacity 0.4s ease;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.yt-hidden-player.visible {
  height: 200px;
  opacity: 1;
  pointer-events: auto;
}

.music-bar {
  position: relative;
  z-index: 100;
  background: rgba(26, 21, 16, 0.7);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(232, 184, 109, 0.15);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Music equalizer bars animation */
.yt-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.eq-bar {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent);
  animation: eq-bounce 1.2s ease-in-out infinite;
}
.eq-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.eq-bar:nth-child(2) { height: 14px; animation-delay: 0.2s; }
.eq-bar:nth-child(3) { height: 6px; animation-delay: 0.4s; }
.eq-bar:nth-child(4) { height: 11px; animation-delay: 0.1s; }
@keyframes eq-bounce {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

.youtube-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.youtube-info span.yt-icon { font-size: 18px; }

.youtube-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-yt-container {
  display: flex;
  gap: 8px;
  margin-right: 8px;
}
.yt-custom-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  outline: none;
  width: 160px;
}
.yt-custom-input:focus { border-color: var(--accent); }
.yt-load-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s;
}
.yt-load-btn:hover {
  background: rgba(232,184,109,0.15);
  border-color: var(--accent);
}

.yt-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.yt-select option { background: #1a1510; }

.yt-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s ease;
}
.yt-toggle-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* ========== SETTINGS MODAL ========== */
.settings-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.4s ease;
}
.settings-overlay.open {
  background: rgba(0,0,0,0.5);
  pointer-events: all;
}

.settings-panel {
  width: 380px;
  padding: 28px;
  background: rgba(30, 25, 18, 0.65);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255, 240, 200, 0.15);
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: scale3d(0.95, 0.95, 1) translate3d(0, 12px, 0);
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform, opacity;
}
.settings-overlay.open .settings-panel {
  opacity: 1;
  transform: scale3d(1, 1, 1) translate3d(0, 0, 0);
}

.settings-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--accent);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 240, 200, 0.06);
}
.setting-row:last-child { border-bottom: none; }

.setting-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.setting-input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 240, 200, 0.08);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 10px;
  width: 70px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.setting-input:focus {
  border-color: rgba(232, 184, 109, 0.45);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 12px rgba(232, 184, 109, 0.15);
}

.setting-toggle {
  position: relative;
  width: 46px; height: 24px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 240, 200, 0.08);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.setting-toggle.on {
  background: rgba(232, 184, 109, 0.18);
  border-color: rgba(232, 184, 109, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 12px rgba(232, 184, 109, 0.12);
}
.setting-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.setting-toggle.on::after {
  left: 24px;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(232, 184, 109, 0.4);
}

.settings-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.btn-danger {
  background: rgba(224,112,96,0.1);
  border: 1px solid rgba(224,112,96,0.25);
  color: var(--danger);
  padding: 8px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.btn-danger:hover {
  background: rgba(224,112,96,0.2);
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(224,112,96,0.15);
  transform: scale(1.02);
}
.btn-danger:active {
  transform: scale(0.97);
}

.btn-close-settings {
  background: linear-gradient(135deg, rgba(232, 184, 109, 0.18), rgba(232, 184, 109, 0.06));
  border: 1px solid rgba(232, 184, 109, 0.25);
  color: var(--accent);
  padding: 8px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-left: auto;
}
.btn-close-settings:hover {
  background: linear-gradient(135deg, rgba(232, 184, 109, 0.28), rgba(232, 184, 109, 0.12));
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(232, 184, 109, 0.2);
  transform: scale(1.02);
}
.btn-close-settings:active {
  transform: scale(0.97);
}

/* ========== UTILITIES ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px) translateZ(0); }
  to { opacity: 1; transform: translateY(0) translateZ(0); }
}

.fade-in { animation: fadeIn 0.6s ease-out; }
.prod-panel.fade-in { animation-delay: 0.12s; animation-fill-mode: both; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {

  /* --- Mobile Rendering Stabilization --- */
  .grain-overlay { display: none !important; }

  /* Stabilize compositing: isolate layers to prevent bleed/flicker */
  .main-content { isolation: isolate; }
  .top-bar { isolation: isolate; contain: layout style; }
  .music-bar { isolation: isolate; contain: layout style; }

  /* Reduce blur slightly for GPU headroom (still looks frosted glass) */
  .top-bar {
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
  }
  .glass-panel {
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    contain: layout style paint;
  }
  .music-bar {
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
  }

  /* Slow down heavy decorative animations to reduce GPU frame pressure */
  .glass-panel::before {
    animation-duration: 20s !important; /* slower shimmer = fewer repaints */
  }
  .scene-bg {
    animation-duration: 80s !important; /* slower pan = fewer repaints */
  }

  /* --- Layout --- */
  .main-content {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 72px 12px 140px;
    gap: 16px;
    height: 100vh;
    height: 100dvh; /* dynamic viewport height – avoids iOS address bar issues */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- Top Bar: single compact row --- */
  .top-bar {
    top: 10px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: calc(100% - 16px);
    border-radius: 12px;
    padding: 6px 12px;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .scene-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: calc(100% - 96px); /* Guard spacing for clock & settings */
    padding-bottom: 3px;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(232, 184, 109, 0.3) rgba(26, 21, 16, 0.1);
    
    /* Premium right-edge fade mask so users intuitively know there is more content */
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent 100%);
    mask-image: linear-gradient(to right, #000 82%, transparent 100%);
  }
  .scene-tabs::-webkit-scrollbar {
    display: block;
    height: 3px;
  }
  .scene-tabs::-webkit-scrollbar-track {
    background: rgba(26, 21, 16, 0.15);
    border-radius: 2px;
  }
  .scene-tabs::-webkit-scrollbar-thumb {
    background: rgba(232, 184, 109, 0.3);
    border-radius: 2px;
  }
  .scene-tab {
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .top-right {
    gap: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: auto;
  }
  .clock { font-size: 13px; font-weight: 600; }
  .settings-btn { font-size: 14px; padding: 4px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }

  /* --- Pomodoro Panel (compact) --- */
  .pomodoro-panel {
    width: 100%;
    max-width: 100%;
    padding: 16px 20px;
    gap: 10px;
  }
  .pomodoro-title { font-size: 16px; margin-bottom: 0; }
  .timer-ring-container { width: 130px; height: 130px; }
  .timer-time { font-size: 28px; }
  .timer-label { font-size: 11px; margin-top: 2px; }
  .timer-finish-time { font-size: 10px; margin-top: 3px; }
  .session-dots { gap: 6px; }
  .session-dot { width: 6px; height: 6px; }
  .timer-controls { gap: 8px; }
  .timer-btn { padding: 6px 16px; font-size: 13px; }
  .timer-shortcut-hint { display: none; }

  /* --- Productivity Panel (fits below timer) --- */
  .prod-panel {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 260px;
    padding: 14px 16px;
    overflow: hidden;
  }
  .prod-header { margin-bottom: 10px; padding-bottom: 8px; }
  .prod-tab { font-size: 14px; }
  .prod-btn { font-size: 11px; padding: 3px 8px; }
  .task-input { padding: 8px 10px; font-size: 13px; }
  .add-task-btn { width: 36px; font-size: 16px; }
  .task-list { max-height: 140px; overflow-y: auto; }
  .task-item { padding: 8px; margin-bottom: 6px; }
  .task-text { font-size: 13px; }
  .task-delete { opacity: 0.6; } /* Always visible on mobile (no hover) */
  .notepad-textarea { font-size: 13px; padding: 10px; max-height: 140px; }

  /* --- Bottom Music Bar (slim) --- */
  .bottom-section {
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: calc(100% - 24px);
    max-width: 480px;
    z-index: 100;
  }
  .yt-hidden-player {
    bottom: calc(68px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: calc(100% - 24px);
    border-radius: 12px;
  }
  .music-bar {
    border-radius: 14px;
    flex-direction: column;
    padding: 10px 14px;
    gap: 8px;
    justify-content: center;
    background: rgba(26, 21, 16, 0.85);
    border: 1px solid rgba(232, 184, 109, 0.2);
  }
  .youtube-info {
    width: 100%;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    margin-bottom: 2px;
  }
  .youtube-info span.yt-icon { font-size: 12px; }
  .youtube-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }
  .custom-yt-container {
    margin-right: 0;
    width: 100%;
    display: flex;
    gap: 6px;
    justify-content: space-between;
  }
  .yt-custom-input {
    flex: 1;
    min-width: 0;
    max-width: none;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 8px;
    height: 32px;
  }
  .yt-load-btn {
    padding: 6px 14px;
    font-size: 11px;
    border-radius: 8px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .yt-select {
    width: 100%;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 8px;
    height: 32px;
  }
  .yt-toggle-btn {
    width: 100%;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 8px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* --- Ambient blobs (disable on mobile for perf) --- */
  .ambient-blobs { display: none; }

  /* --- Settings modal --- */
  .settings-panel { width: 92vw; padding: 20px; }

  /* --- Glass panel: softer shadow on mobile --- */
  .glass-panel {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    transform: none !important;
  }
  .glass-panel:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    transform: none !important;
  }
}

/* ========== ENTER OVERLAY ========== */
.enter-overlay {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
}
.enter-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(30, 24, 18, 0.55) 0%, rgba(15, 12, 10, 0.85) 100%);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  z-index: 1;
  pointer-events: none;
}
.enter-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}
.enter-overlay.hidden .enter-content {
  transform: translate3d(0, -10px, 0) scale(0.95);
  opacity: 0;
}
.enter-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 480px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: enterReveal 1.2s cubic-bezier(0.25, 1, 0.5, 1) both;
  will-change: transform, opacity;
}

@keyframes enterReveal {
  0% { opacity: 0; transform: translate3d(0, 20px, 0) scale(0.98); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* Floating badge for icon */
.enter-icon-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  background: radial-gradient(135deg, rgba(232, 184, 109, 0.15) 0%, rgba(232, 184, 109, 0.03) 100%);
  border: 1px solid rgba(232, 184, 109, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(232, 184, 109, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: floatIcon 6s ease-in-out infinite alternate;
  will-change: transform;
}

.enter-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  filter: drop-shadow(0 4px 12px var(--accent-glow));
}

/* Pulsing outer ring */
.pulse-ring {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(232, 184, 109, 0.1);
  border-radius: 50%;
  animation: enterPulse 3s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes floatIcon {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, -8px, 0); }
}

@keyframes enterPulse {
  0% { transform: scale(0.9); opacity: 0; }
  50% { opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 0; }
}

.enter-title {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--accent) 70%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  text-shadow: 0 4px 20px rgba(232, 184, 109, 0.15);
}

.enter-subtitle {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 380px;
}

.enter-btn-wrapper {
  position: relative;
}

.enter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(232, 184, 109, 0.18) 0%, rgba(232, 184, 109, 0.08) 100%);
  border: 1px solid rgba(232, 184, 109, 0.3);
  color: var(--text-primary);
  padding: 16px 42px;
  border-radius: 40px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  isolation: isolate; /* Clip border-radius boundary perfectly */
  transform: translate3d(0, 0, 0); /* Force subpixel/hardware accelerated clip */
  will-change: transform;
}

.enter-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: translate3d(-101%, 0, 0);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}

.enter-arrow {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.enter-btn:hover {
  background: linear-gradient(135deg, rgba(232, 184, 109, 0.28) 0%, rgba(232, 184, 109, 0.15) 100%);
  border-color: rgba(232, 184, 109, 0.5);
  box-shadow: 0 12px 35px rgba(232, 184, 109, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translate3d(0, -2px, 0);
}

.enter-btn:hover::before {
  transform: translate3d(101%, 0, 0);
}

.enter-btn:hover .enter-arrow {
  transform: translate3d(4px, 0, 0);
}

.enter-btn:active {
  transform: translate3d(0, 0, 0);
}

/* ========== AMBIENT BLOBS ========== */
.ambient-blobs {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  filter: blur(80px);
  opacity: 0.3;
  will-change: transform;
  transform: translateZ(0);
}
.blob {
  position: absolute;
  border-radius: 50%;
  animation: moveBlob 20s infinite alternate ease-in-out;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.blob-1 {
  width: 400px; height: 400px;
  background: rgba(232, 184, 109, 0.4);
  top: 10%; left: 20%;
  animation-delay: 0s;
}
.blob-2 {
  width: 500px; height: 500px;
  background: rgba(126, 200, 160, 0.3);
  bottom: 10%; right: 10%;
  animation-delay: -5s;
}
.blob-3 {
  width: 300px; height: 300px;
  background: rgba(224, 112, 96, 0.3);
  top: 40%; left: 60%;
  animation-delay: -10s;
}
@keyframes moveBlob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 50px) scale(1.1); }
  100% { transform: translate(-50px, 100px) scale(0.9); }
}

/* ========== DYNAMIC SCENE EFFECTS ========== */

/* 1. Lightning for Rain */
.lightning {
  position: absolute; inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  animation: lightning-flash 20s infinite;
}
@keyframes lightning-flash {
  0%, 95%, 98%, 100% { opacity: 0; }
  96% { opacity: 0.15; }
  97% { opacity: 0; }
  97.5% { opacity: 0.3; }
}

/* 2. Steam for Cafe */
.steam-container {
  position: absolute;
  bottom: 10%;
  right: 12%;
  width: 150px;
  height: 40vh;
  pointer-events: none;
  z-index: 2;
}
.steam-particle {
  position: absolute;
  bottom: 0;
  width: 90px; height: 90px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0;
  animation: steam-rise 8s infinite ease-in;
}
@keyframes steam-rise {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  25% { opacity: 0.5; transform: translate(15px, -8vh) scale(1.2); }
  50% { opacity: 0.4; transform: translate(-10px, -16vh) scale(1.6); }
  75% { opacity: 0.2; transform: translate(10px, -24vh) scale(2.0); }
  100% { transform: translate(-15px, -35vh) scale(2.5); opacity: 0; }
}

/* Cafe Floating Dust */
.dust-particle {
  position: absolute;
  width: 4px; height: 4px;
  background: #ffebb5;
  border-radius: 50%;
  box-shadow: 0 0 10px 2px #ffc15e;
  opacity: 0;
  animation: float-dust 10s infinite linear;
  z-index: 2;
}
@keyframes float-dust {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translate(100px, -150px) scale(1.5); opacity: 0; }
}

/* 3. Forest Fireflies */
.fireflies-container {
  position: fixed; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.firefly {
  position: absolute;
  width: 5px; height: 5px;
  background: #d4ffb8;
  border-radius: 50%;
  box-shadow: 0 0 15px 3px #9dff47;
  animation: fly 15s infinite linear, flicker 2.5s infinite alternate;
}
@keyframes fly {
  0% { transform: translate(0, 0); }
  50% { transform: translate(50px, -50px); }
  100% { transform: translate(-50px, -100px); }
}
@keyframes flicker {
  0%, 100% { opacity: 0.1; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* 4. City Lights */
.city-lights-container {
  position: absolute;
  bottom: 20%;
  width: 100%;
  height: 150px;
  pointer-events: none;
  perspective: 800px;
  z-index: 2;
}
.car-light {
  position: absolute;
  width: 120px; height: 3px;
  background: #ff2a6d;
  border-radius: 3px;
  box-shadow: 0 0 20px 5px rgba(255, 42, 109, 0.6);
  opacity: 0;
  transform: translateZ(-200px);
  animation: car-pass 10s infinite cubic-bezier(0.25, 1, 0.5, 1);
}
.car-light.blue {
  background: #05d9e8;
  box-shadow: 0 0 20px 5px rgba(5, 217, 232, 0.6);
}
@keyframes car-pass {
  0% { left: -20%; opacity: 0; transform: scaleX(1) translateZ(-200px); }
  10% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { left: 120%; opacity: 0; transform: scaleX(3) translateZ(100px); }
}

/* ========== DYNAMIC SCENE EFFECTS CONTINUED ========== */

/* 5. Rain Mist */
.rain-mist {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.mist-cloud {
  position: absolute;
  width: 500px; height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  animation: drift-mist 40s infinite linear alternate;
  pointer-events: none;
  will-change: transform;
}
@keyframes drift-mist {
  0% { transform: translate3d(-10%, 10%, 0) scale(1); }
  100% { transform: translate3d(20%, -10%, 0) scale(1.3); }
}

/* 6. Forest Falling Leaves */
.leaves-container {
  position: fixed; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.leaf {
  position: absolute;
  background: rgba(212, 118, 59, 0.5); /* beautiful amber leaf */
  border-radius: 0 100% 0 100%;
  width: 14px; height: 8px;
  animation: fall-leaf 12s infinite linear;
  opacity: 0;
  will-change: transform, opacity;
}
@keyframes fall-leaf {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translate3d(150px, 105vh, 0) rotate(540deg); opacity: 0; }
}

/* 7. City Sky Lanterns */
.lanterns-container {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.lantern {
  position: absolute;
  width: 8px; height: 12px;
  background: radial-gradient(circle at bottom, #ff9b54 0%, #ff4b1f 100%);
  border-radius: 4px 4px 2px 2px;
  box-shadow: 0 0 15px 4px rgba(255, 155, 84, 0.35);
  animation: float-lantern 22s infinite linear;
  opacity: 0;
  will-change: transform, opacity;
}
@keyframes float-lantern {
  0% { transform: translate3d(0, 105vh, 0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translate3d(-100px, -50px, 0); opacity: 0; }
}
