/* ==========================================================================
   NEXVIQA — LIQUID CHRONOS & ATMOSPHERE STYLESHEET
   Aesthetics: Deep Obsidian Glass, Chromatic Fluid Dynamics, Liquid Glow
   ========================================================================== */

:root {
  /* Default Theme: Ocean Cyan */
  --accent-primary: #00d2ff;
  --accent-secondary: #0066ff;
  --accent-tertiary: #00f0ff;
  --accent-glow: rgba(0, 210, 255, 0.45);
  --accent-glow-subtle: rgba(0, 210, 255, 0.15);
  --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
  --liquid-wave-color: rgba(0, 180, 255, 0.18);
  --liquid-wave-color-2: rgba(0, 110, 255, 0.25);

  /* Deep Dark Palette */
  --bg-deep: #030712;
  --bg-surface: rgba(11, 19, 38, 0.65);
  --bg-surface-elevated: rgba(18, 29, 58, 0.85);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glass-bright: rgba(255, 255, 255, 0.22);
  --border-accent: rgba(0, 210, 255, 0.35);

  /* Text & Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  /* Shadows & Glass Refraction */
  --shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --blur-glass: blur(24px);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   18 COMPLETE LIQUID THEMES
   ========================================================================== */

/* 1. Neon Violet */
[data-theme="neon"] {
  --accent-primary: #d946ef;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #f43f5e;
  --accent-glow: rgba(217, 70, 239, 0.45);
  --accent-glow-subtle: rgba(217, 70, 239, 0.15);
  --accent-gradient: linear-gradient(135deg, #d946ef 0%, #8b5cf6 100%);
  --liquid-wave-color: rgba(217, 70, 239, 0.18);
  --liquid-wave-color-2: rgba(139, 92, 246, 0.25);
  --border-accent: rgba(217, 70, 239, 0.35);
}

/* 2. Bioluminescent Emerald */
[data-theme="emerald"] {
  --accent-primary: #10b981;
  --accent-secondary: #06b6d4;
  --accent-tertiary: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.45);
  --accent-glow-subtle: rgba(16, 185, 129, 0.15);
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --liquid-wave-color: rgba(16, 185, 129, 0.18);
  --liquid-wave-color-2: rgba(6, 182, 212, 0.25);
  --border-accent: rgba(16, 185, 129, 0.35);
}

/* 3. Solar Amber */
[data-theme="solar"] {
  --accent-primary: #f59e0b;
  --accent-secondary: #ef4444;
  --accent-tertiary: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.45);
  --accent-glow-subtle: rgba(245, 158, 11, 0.15);
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --liquid-wave-color: rgba(245, 158, 11, 0.18);
  --liquid-wave-color-2: rgba(239, 68, 68, 0.25);
  --border-accent: rgba(245, 158, 11, 0.35);
}

/* 4. Liquid Mercury / Silver */
[data-theme="mercury"] {
  --accent-primary: #cbd5e1;
  --accent-secondary: #64748b;
  --accent-tertiary: #f1f5f9;
  --accent-glow: rgba(203, 213, 225, 0.45);
  --accent-glow-subtle: rgba(203, 213, 225, 0.15);
  --accent-gradient: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  --liquid-wave-color: rgba(203, 213, 225, 0.18);
  --liquid-wave-color-2: rgba(100, 116, 139, 0.25);
  --border-accent: rgba(203, 213, 225, 0.35);
}

/* 5. Midnight Nebula */
[data-theme="nebula"] {
  --accent-primary: #6366f1;
  --accent-secondary: #3b82f6;
  --accent-tertiary: #a855f7;
  --accent-glow: rgba(99, 102, 241, 0.45);
  --accent-glow-subtle: rgba(99, 102, 241, 0.15);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --liquid-wave-color: rgba(99, 102, 241, 0.18);
  --liquid-wave-color-2: rgba(59, 130, 246, 0.25);
  --border-accent: rgba(99, 102, 241, 0.35);
}

/* 6. Sakura Blossom */
[data-theme="sakura"] {
  --accent-primary: #fb7185;
  --accent-secondary: #f43f5e;
  --accent-tertiary: #fda4af;
  --accent-glow: rgba(251, 113, 133, 0.45);
  --accent-glow-subtle: rgba(251, 113, 133, 0.15);
  --accent-gradient: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  --liquid-wave-color: rgba(251, 113, 133, 0.18);
  --liquid-wave-color-2: rgba(244, 63, 94, 0.25);
  --border-accent: rgba(251, 113, 133, 0.35);
}

/* 7. Imperial Gold */
[data-theme="gold"] {
  --accent-primary: #eab308;
  --accent-secondary: #d97706;
  --accent-tertiary: #fef08a;
  --accent-glow: rgba(234, 179, 8, 0.45);
  --accent-glow-subtle: rgba(234, 179, 8, 0.15);
  --accent-gradient: linear-gradient(135deg, #eab308 0%, #d97706 100%);
  --liquid-wave-color: rgba(234, 179, 8, 0.18);
  --liquid-wave-color-2: rgba(217, 119, 6, 0.25);
  --border-accent: rgba(234, 179, 8, 0.35);
}

/* 8. Crimson Eclipse */
[data-theme="crimson"] {
  --accent-primary: #ef4444;
  --accent-secondary: #b91c1c;
  --accent-tertiary: #f87171;
  --accent-glow: rgba(239, 68, 68, 0.45);
  --accent-glow-subtle: rgba(239, 68, 68, 0.15);
  --accent-gradient: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  --liquid-wave-color: rgba(239, 68, 68, 0.18);
  --liquid-wave-color-2: rgba(185, 28, 28, 0.25);
  --border-accent: rgba(239, 68, 68, 0.35);
}

/* 9. Aurora Borealis */
[data-theme="aurora"] {
  --accent-primary: #2dd4bf;
  --accent-secondary: #818cf8;
  --accent-tertiary: #34d399;
  --accent-glow: rgba(45, 212, 191, 0.45);
  --accent-glow-subtle: rgba(45, 212, 191, 0.15);
  --accent-gradient: linear-gradient(135deg, #2dd4bf 0%, #818cf8 100%);
  --liquid-wave-color: rgba(45, 212, 191, 0.18);
  --liquid-wave-color-2: rgba(129, 140, 248, 0.25);
  --border-accent: rgba(45, 212, 191, 0.35);
}

/* 10. Synthwave 80s */
[data-theme="synthwave"] {
  --accent-primary: #ec4899;
  --accent-secondary: #06b6d4;
  --accent-tertiary: #facc15;
  --accent-glow: rgba(236, 72, 153, 0.45);
  --accent-glow-subtle: rgba(236, 72, 153, 0.15);
  --accent-gradient: linear-gradient(135deg, #ec4899 0%, #06b6d4 100%);
  --liquid-wave-color: rgba(236, 72, 153, 0.18);
  --liquid-wave-color-2: rgba(6, 182, 212, 0.25);
  --border-accent: rgba(236, 72, 153, 0.35);
}

/* 11. Deep Rainforest / Jade */
[data-theme="forest"] {
  --accent-primary: #22c55e;
  --accent-secondary: #15803d;
  --accent-tertiary: #84cc16;
  --accent-glow: rgba(34, 197, 94, 0.45);
  --accent-glow-subtle: rgba(34, 197, 94, 0.15);
  --accent-gradient: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  --liquid-wave-color: rgba(34, 197, 94, 0.18);
  --liquid-wave-color-2: rgba(21, 128, 61, 0.25);
  --border-accent: rgba(34, 197, 94, 0.35);
}

/* 12. Glacial Frost */
[data-theme="frost"] {
  --accent-primary: #38bdf8;
  --accent-secondary: #1d4ed8;
  --accent-tertiary: #e0f2fe;
  --accent-glow: rgba(56, 189, 248, 0.45);
  --accent-glow-subtle: rgba(56, 189, 248, 0.15);
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #1d4ed8 100%);
  --liquid-wave-color: rgba(56, 189, 248, 0.18);
  --liquid-wave-color-2: rgba(29, 78, 216, 0.25);
  --border-accent: rgba(56, 189, 248, 0.35);
}

/* 13. Twilight Amethyst */
[data-theme="amethyst"] {
  --accent-primary: #a855f7;
  --accent-secondary: #581c87;
  --accent-tertiary: #c084fc;
  --accent-glow: rgba(168, 85, 247, 0.45);
  --accent-glow-subtle: rgba(168, 85, 247, 0.15);
  --accent-gradient: linear-gradient(135deg, #a855f7 0%, #581c87 100%);
  --liquid-wave-color: rgba(168, 85, 247, 0.18);
  --liquid-wave-color-2: rgba(88, 28, 135, 0.25);
  --border-accent: rgba(168, 85, 247, 0.35);
}

/* 14. Volcanic Magma */
[data-theme="magma"] {
  --accent-primary: #ff4500;
  --accent-secondary: #ff8c00;
  --accent-tertiary: #b91c1c;
  --accent-glow: rgba(255, 69, 0, 0.45);
  --accent-glow-subtle: rgba(255, 69, 0, 0.15);
  --accent-gradient: linear-gradient(135deg, #ff4500 0%, #ff8c00 100%);
  --liquid-wave-color: rgba(255, 69, 0, 0.18);
  --liquid-wave-color-2: rgba(255, 140, 0, 0.25);
  --border-accent: rgba(255, 69, 0, 0.35);
}

/* 15. Electric Matrix */
[data-theme="matrix"] {
  --accent-primary: #10e052;
  --accent-secondary: #059669;
  --accent-tertiary: #4ade80;
  --accent-glow: rgba(16, 224, 82, 0.45);
  --accent-glow-subtle: rgba(16, 224, 82, 0.15);
  --accent-gradient: linear-gradient(135deg, #10e052 0%, #059669 100%);
  --liquid-wave-color: rgba(16, 224, 82, 0.18);
  --liquid-wave-color-2: rgba(5, 150, 105, 0.25);
  --border-accent: rgba(16, 224, 82, 0.35);
}

/* 16. Cyber Coral */
[data-theme="coral"] {
  --accent-primary: #fb923c;
  --accent-secondary: #14b8a6;
  --accent-tertiary: #fdba74;
  --accent-glow: rgba(251, 146, 60, 0.45);
  --accent-glow-subtle: rgba(251, 146, 60, 0.15);
  --accent-gradient: linear-gradient(135deg, #fb923c 0%, #14b8a6 100%);
  --liquid-wave-color: rgba(251, 146, 60, 0.18);
  --liquid-wave-color-2: rgba(20, 184, 166, 0.25);
  --border-accent: rgba(251, 146, 60, 0.35);
}

/* 17. Phantom Stealth */
[data-theme="stealth"] {
  --accent-primary: #f8fafc;
  --accent-secondary: #475569;
  --accent-tertiary: #cbd5e1;
  --accent-glow: rgba(248, 250, 252, 0.35);
  --accent-glow-subtle: rgba(248, 250, 252, 0.12);
  --accent-gradient: linear-gradient(135deg, #f8fafc 0%, #475569 100%);
  --liquid-wave-color: rgba(248, 250, 252, 0.12);
  --liquid-wave-color-2: rgba(71, 85, 105, 0.25);
  --border-accent: rgba(248, 250, 252, 0.3);
}

/* 18. Default Ocean Cyan */
[data-theme="ocean"] {
  --accent-primary: #00d2ff;
  --accent-secondary: #0066ff;
  --accent-tertiary: #00f0ff;
  --accent-glow: rgba(0, 210, 255, 0.45);
  --accent-glow-subtle: rgba(0, 210, 255, 0.15);
  --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
  --liquid-wave-color: rgba(0, 180, 255, 0.18);
  --liquid-wave-color-2: rgba(0, 110, 255, 0.25);
  --border-accent: rgba(0, 210, 255, 0.35);
}

/* Alternate Font Classes */
body.font-space {
  --font-main: 'Space Grotesk', monospace;
}

body.font-syne {
  --font-main: 'Syne', sans-serif;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Interactive Fluid Canvas in Background */
#liquid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Floating Ambient Orbs */
.fluid-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  opacity: 0.35;
  pointer-events: none;
  animation: floatOrb 22s infinite ease-in-out alternate;
}

.orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: -7s;
}

.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  animation-delay: -14s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.15); }
  100% { transform: translate(-50px, 80px) scale(0.9); }
}

/* Hex / Micro Noise Overlay */
.liquid-mesh-overlay {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   APP LAYOUT & GLASS CONTAINER
   ========================================================================== */
.app-layout {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.5rem;
}

/* Glass Card Component */
.glass-card {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-glass-bright);
}

/* Specular Curved Highlight on Glass */
.card-specular-highlight {
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  pointer-events: none;
  z-index: 10;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.glass-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-primary);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-icon-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #030712;
  box-shadow: 0 4px 18px var(--accent-glow);
  flex-shrink: 0;
}

.liquid-drop-svg {
  width: 24px;
  height: 24px;
  stroke: #030712;
}

.inner-pulse-dot {
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { r: 2; opacity: 0.8; }
  50% { r: 4; opacity: 1; }
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  display: block;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  letter-spacing: 0.22em;
  color: var(--text-secondary);
  margin-top: -2px;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 2px 14px var(--accent-glow);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.icon-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-action-btn:hover, .icon-action-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.icon-action-btn.active {
  box-shadow: 0 0 16px var(--accent-glow-subtle);
}

.badge-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-primary);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-accent);
}

.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-glow);
}

.format-toggle-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.format-toggle-btn:hover {
  box-shadow: 0 0 14px var(--accent-glow);
  border-color: var(--accent-primary);
}

/* ==========================================================================
   MAIN CONTENT & TAB PANES
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.35s ease;
}

.tab-pane.active {
  display: block;
}

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

/* ==========================================================================
   TAB 1: CLOCK & WEATHER GRID
   ========================================================================== */
.clock-weather-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Hero Clock Card */
.hero-clock-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  position: relative;
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 5;
}

.clock-mode-switches {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
}

.mode-pill {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-pill:hover {
  color: var(--text-primary);
}

.mode-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid var(--border-glass-bright);
}

.time-precision-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: blinkLive 1.5s infinite;
}

@keyframes blinkLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* DIGITAL LIQUID CLOCK CONTAINER */
.digital-clock-container {
  position: relative;
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.03) 0%, transparent 75%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* Water Level Wave Tank Behind Digits */
.liquid-wave-tank {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  opacity: 0.65;
}

.liquid-wave {
  position: absolute;
  left: -50%;
  width: 200%;
  height: 120%;
  bottom: -40%;
  background: var(--liquid-wave-color);
  border-radius: 40%;
  animation: waveRotate 14s infinite linear;
}

.liquid-wave.wave-2 {
  background: var(--liquid-wave-color-2);
  bottom: -45%;
  border-radius: 38%;
  animation: waveRotate 20s infinite linear reverse;
  opacity: 0.8;
}

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

/* Digits */
.digits-wrapper {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.digit-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-num {
  font-family: var(--font-mono);
  font-size: clamp(3.8rem, 7.5vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 40px var(--accent-glow-subtle);
  transition: color 0.3s;
}

.accent-text {
  color: var(--accent-primary);
  text-shadow: 0 0 25px var(--accent-glow);
}

.digit-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.5rem;
}

.fluid-separator {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--accent-primary);
  font-weight: 300;
  animation: colonBlink 1s infinite steps(1);
  margin: 0 0.2rem;
  line-height: 1;
  text-shadow: 0 0 15px var(--accent-glow);
}

@keyframes colonBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.period-box {
  display: flex;
  flex-direction: column;
  margin-left: 0.5rem;
  gap: 0.25rem;
}

.ampm-text {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
}

.msec-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Fluid Progress Bar */
.fluid-progress-wrap {
  width: 100%;
  max-width: 500px;
  margin-top: 2rem;
  z-index: 5;
}

.fluid-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.fluid-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  position: relative;
  transition: width 0.15s linear;
  box-shadow: 0 0 12px var(--accent-primary);
}

.fluid-droplet-glow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff, 0 0 20px var(--accent-primary);
}

.progress-details {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ANALOG LIQUID CLOCK */
.analog-clock-container {
  position: relative;
  margin: 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 320px;
  height: 320px;
  z-index: 5;
}

.analog-face {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 27, 54, 0.75) 0%, rgba(5, 10, 24, 0.95) 100%);
  border: 2px solid var(--border-glass-bright);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(0, 210, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.analog-liquid-depth {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.dial-center-orb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-gradient);
  position: absolute;
  z-index: 20;
  box-shadow: 0 0 12px var(--accent-primary);
  border: 2px solid #ffffff;
}

/* Hands */
.hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  z-index: 10;
  transition: transform 0.05s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

.hour-hand {
  width: 6px;
  height: 75px;
  margin-left: -3px;
}

.hour-hand .hand-line {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.minute-hand {
  width: 4px;
  height: 105px;
  margin-left: -2px;
}

.minute-hand .hand-line {
  width: 100%;
  height: 100%;
  background: var(--text-primary);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.second-hand {
  width: 2px;
  height: 125px;
  margin-left: -1px;
  z-index: 15;
}

.second-hand .hand-line {
  width: 100%;
  height: 100%;
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary);
}

.second-hand .hand-tail {
  position: absolute;
  top: 100%;
  left: 0;
  width: 2px;
  height: 25px;
  background: var(--accent-primary);
}

.dial-tick {
  position: absolute;
  width: 2px;
  height: 10px;
  background: rgba(255, 255, 255, 0.25);
  top: 8px;
  left: 50%;
  margin-left: -1px;
  transform-origin: 50% 152px;
}

.dial-tick.major {
  height: 16px;
  width: 3px;
  margin-left: -1.5px;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
}

/* Card Bottom Meta Tags */
.clock-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.25rem;
  z-index: 5;
}

.date-full-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.sub-meta-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.meta-tag {
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

/* ==========================================================================
   WEATHER STATION CARD
   ========================================================================== */
.weather-station-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 520px;
}

.weather-top-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.weather-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

.location-name {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}

.location-country {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.locate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.locate-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 14px var(--accent-glow-subtle);
}

/* City Search Box */
.search-form-wrap {
  position: relative;
  width: 100%;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.4rem 0.25rem 0.9rem;
  transition: all var(--transition-fast);
}

.search-input-box:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-glow-subtle);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.search-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.86rem;
}

.search-input-box input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  background: var(--accent-gradient);
  border: none;
  color: #030712;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px var(--accent-glow);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
}

.search-suggestion-item {
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-suggestion-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Main Temperature & Weather Glyph */
.weather-hero-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.weather-glyph-wrapper {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.weather-svg-animated {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 16px var(--accent-glow));
}

.weather-glyph-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

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

.temp-display-wrap {
  flex: 1;
}

.temp-digits {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.temp-value {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
}

.unit-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-muted);
}

.unit-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.unit-btn.active {
  color: var(--accent-primary);
  text-shadow: 0 0 10px var(--accent-glow);
}

.unit-divider {
  color: var(--border-glass-bright);
}

.weather-condition-desc {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

.feels-like-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Weather Metrics Quad-Grid */
.weather-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.metric-glass-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.metric-glass-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass-bright);
  transform: translateY(-2px);
}

.metric-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  flex-shrink: 0;
}

.blue-glow { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.cyan-glow { color: #22d3ee; background: rgba(34, 211, 238, 0.12); }
.purple-glow { color: #c084fc; background: rgba(192, 132, 252, 0.12); }
.emerald-glow { color: #34d399; background: rgba(52, 211, 153, 0.12); }

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

/* Forecast Section */
.forecast-section {
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
}

.forecast-section-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.forecast-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.forecast-day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 0.3rem;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: all var(--transition-fast);
}

.forecast-day-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glass-bright);
}

.fc-day-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.fc-icon {
  width: 28px;
  height: 28px;
  margin: 0.3rem 0;
}

.fc-temps {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
}

.fc-low {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.forecast-placeholder {
  grid-column: span 5;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.8rem 0;
}

/* ==========================================================================
   TAB 2: WORLD CLOCK OBSERVATORY
   ========================================================================== */
.full-pane-card {
  padding: 2.25rem;
  min-height: 520px;
}

.pane-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pane-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.pane-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.quick-add-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: blinkLive 1.5s infinite;
}

.mono-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.mono-text strong {
  color: #fff;
}

.world-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.world-city-card {
  background: rgba(11, 19, 38, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.world-city-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow-subtle);
}

.wcity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.wcity-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.wcity-region {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.wcity-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
}

.wcity-time {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.wcity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
}

/* ==========================================================================
   TAB 3: STOPWATCH VIEW
   ========================================================================== */
.centered-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stopwatch-shell {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stopwatch-display-ring {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 2.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.ring-liquid {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 816.8;
  stroke-dashoffset: 816.8;
  filter: drop-shadow(0 0 10px var(--accent-primary));
  transition: stroke-dashoffset 0.05s linear;
}

.stopwatch-center-text {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sw-time-digits {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.sw-ms {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.sw-status-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stopwatch-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.primary-glass-btn {
  background: var(--accent-gradient);
  border: none;
  color: #030712;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.primary-glass-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

.glass-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
}

.glass-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-glass-bright);
}

.glass-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.danger-hover:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.lap-times-container {
  width: 100%;
  margin-top: 2rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.lap-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  margin-bottom: 0.75rem;
}

.lap-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lap-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

/* ==========================================================================
   TAB 4: TIMER VIEW
   ========================================================================== */
.timer-shell {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-preset-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: var(--accent-primary);
}

.timer-chamber {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 27, 54, 0.8) 0%, rgba(5, 10, 24, 0.95) 100%);
  border: 2px solid var(--border-glass-bright);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 210, 255, 0.1);
  overflow: hidden;
  margin: 2.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-liquid-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--liquid-wave-color-2);
  transition: height 0.5s ease;
  pointer-events: none;
}

.timer-inner-content {
  position: relative;
  z-index: 10;
}

.timer-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.timer-input-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-input-col input {
  width: 58px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  padding: 0.3rem 0;
  outline: none;
  transition: border-color var(--transition-fast);
}

.timer-input-col input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timer-input-col span {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}

.timer-colon {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--accent-primary);
  font-weight: 300;
}

.timer-active-readout {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px var(--accent-glow);
}

.timer-controls {
  display: flex;
  gap: 1rem;
}

/* ==========================================================================
   MODALS ARCHITECTURE (THEMES, SOUNDS & SETTINGS)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card {
  width: 100%;
  max-width: 880px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px var(--accent-glow-subtle);
  border: 1px solid var(--border-glass-bright);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #030712;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
}

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

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 1.6rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* 18 Themes Gallery Grid */
.theme-filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover, .filter-pill.active {
  background: var(--accent-gradient);
  color: #030712;
  border-color: transparent;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.themes-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  overflow-y: auto;
  padding-right: 0.5rem;
  max-height: 58vh;
}

.theme-gallery-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.theme-gallery-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glass-bright);
  transform: translateY(-2px);
}

.theme-gallery-card.active {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px var(--accent-glow-subtle);
}

.theme-card-swatches {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.swatch-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.theme-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

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

.theme-card-category {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   SOUND STUDIO & AUDIO VISUALIZER
   ========================================================================== */
.sound-modal-card {
  max-width: 920px;
}

.audio-master-deck {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.deck-visualizer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

#audio-visualizer-canvas {
  flex: 1;
  height: 48px;
}

.visualizer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.sound-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s;
}

.sound-indicator-dot.active {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: blinkLive 1s infinite;
}

.deck-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.volume-slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.styled-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
}

.sound-preferences-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

.sound-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.sound-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
}

.sounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.sound-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.sound-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glass-bright);
}

.sound-card.playing {
  border-color: var(--accent-primary);
  background: rgba(0, 210, 255, 0.08);
  box-shadow: 0 0 16px var(--accent-glow-subtle);
}

.sound-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sound-emoji {
  font-size: 1.4rem;
}

.sound-card-info {
  display: flex;
  flex-direction: column;
}

.sound-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.sound-card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sound-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.sound-play-btn:hover {
  background: var(--accent-gradient);
  color: #030712;
  border-color: transparent;
  box-shadow: 0 0 12px var(--accent-glow);
}

.sound-card.playing .sound-play-btn {
  background: var(--accent-gradient);
  color: #030712;
}

/* ==========================================================================
   SETTINGS MODAL & TOGGLES
   ========================================================================== */
.settings-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-sec-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.5rem;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.setting-row-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.setting-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  display: block;
}

.setting-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

/* Switch Toggle Component */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-toggle {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s;
  border-radius: 24px;
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

input:checked + .slider-toggle {
  background: var(--accent-gradient);
}

input:checked + .slider-toggle:before {
  transform: translateX(20px);
}

.options-pill-selector {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.opt-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.opt-pill:hover, .opt-pill.active {
  background: var(--accent-gradient);
  color: #030712;
  border-color: transparent;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ==========================================================================
   FOOTER STATUS BAR
   ========================================================================== */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-left, .footer-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #fed7aa;
  font-weight: 600;
}

.footer-divider {
  color: var(--border-glass-bright);
}

.fps-counter {
  font-family: var(--font-mono);
  color: var(--accent-primary);
}

.credit-text strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .clock-weather-grid {
    grid-template-columns: 1fr;
  }

  .settings-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-layout {
    padding: 1rem 0.75rem;
    gap: 1rem;
  }

  .app-header {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: space-around;
  }

  .nav-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .header-actions {
    justify-content: space-between;
  }

  .hero-clock-card {
    padding: 1.5rem 1rem;
  }

  .digits-wrapper {
    gap: 0.2rem;
  }

  .time-num {
    font-size: 3.2rem;
  }

  .fluid-separator {
    font-size: 2.8rem;
  }

  .weather-station-card {
    padding: 1.5rem 1rem;
  }

  .weather-hero-row {
    flex-direction: column;
    text-align: center;
  }

  .temp-digits {
    justify-content: center;
  }

  .modal-card {
    padding: 1.25rem 1rem;
    max-height: 94vh;
  }

  .app-footer {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}
