/* ============================================
   UTM NAROD — Liquid Glass Design System
   Single-page site, 2025-2026 aesthetic
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-deep: #181838;
  --bg-mid: #252550;
  --bg-top: #1e1e45;
  --glass-bg: rgba(255, 255, 255, 0.10);
  --glass-bg-hover: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.20);
  --glass-border-hover: rgba(255, 255, 255, 0.30);
  --glass-blur: blur(40px) saturate(180%);
  --glass-radius: 24px;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --accent-gradient: linear-gradient(135deg, #7b93ff, #9b5de5, #f472b6);
  --accent-1: #7b93ff;
  --accent-2: #9b5de5;
  --accent-3: #f472b6;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 60px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

body {
  font-family: var(--font-main);
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 50%, var(--bg-top) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-main); cursor: pointer; }

/* --- Animated Background Blobs --- */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
}

.blob-1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.65), transparent 70%);
  opacity: 0.60;
  top: -10%; left: -5%;
  animation: blob-drift-1 25s ease-in-out infinite;
}

.blob-2 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.60), transparent 70%);
  opacity: 0.58;
  top: 30%; right: -10%;
  animation: blob-drift-2 30s ease-in-out infinite;
}

.blob-3 {
  width: 650px; height: 650px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.55), transparent 70%);
  opacity: 0.55;
  bottom: 10%; left: 20%;
  animation: blob-drift-3 22s ease-in-out infinite;
}

.blob-4 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55), transparent 70%);
  opacity: 0.55;
  top: 60%; left: 60%;
  animation: blob-drift-4 28s ease-in-out infinite;
}

.blob-5 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.55), transparent 70%);
  opacity: 0.55;
  top: 10%; left: 40%;
  animation: blob-drift-5 26s ease-in-out infinite;
}

@keyframes blob-drift-5 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, 70px) scale(1.1); }
  66% { transform: translate(60px, -40px) scale(0.93); }
}

@keyframes blob-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, 60px) scale(1.1); }
  66% { transform: translate(-40px, 100px) scale(0.95); }
}

@keyframes blob-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-70px, 80px) scale(1.05); }
  66% { transform: translate(50px, -60px) scale(0.9); }
}

@keyframes blob-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.08); }
  66% { transform: translate(-80px, 30px) scale(0.92); }
}

@keyframes blob-drift-4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -50px) scale(1.15); }
}

/* --- Glass Panel (reusable) --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.30), transparent);
  pointer-events: none;
}

.glass-hover:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 16px;
  left: calc(50% + var(--sidebar-width) / 2);
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  width: calc(100% - 64px - var(--sidebar-width));
  max-width: 1200px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(24, 24, 56, 0.85);
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-primary);
}

.nav-logo .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent-gradient);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: middle;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* --- Sections Common --- */
.section {
  padding: 120px 48px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  display: inline-block;
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(102,126,234,0.5);
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 48px 80px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 72px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -3px;
  margin-bottom: 24px;
  max-width: 800px;
  text-shadow: 0 0 50px rgba(102,126,234,0.5);
}

.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 48px;
}

/* Glass Orb */
.glass-orb {
  width: 200px; height: 200px;
  border-radius: 50%;
  margin-bottom: 48px;
  position: relative;
  background: conic-gradient(from 0deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2), rgba(240,147,251,0.2), rgba(102,126,234,0.2));
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 80px rgba(102,126,234,0.3), inset 0 0 60px rgba(255,255,255,0.05);
  animation: orb-rotate 12s linear infinite;
}

.glass-orb::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(240,147,251,0.15), rgba(102,126,234,0.15), rgba(118,75,162,0.15), rgba(240,147,251,0.15));
  animation: orb-rotate 8s linear infinite reverse;
}

.glass-orb::after {
  content: '';
  position: absolute;
  top: 15%; left: 20%;
  width: 35%; height: 25%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.25), transparent);
  border-radius: 50%;
  filter: blur(6px);
  transform: rotate(-30deg);
}

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

/* Shimmer Button */
.btn-shimmer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, #7b93ff, #a855f7, #f472b6);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: 0 4px 30px rgba(123,147,255,0.5), 0 0 15px rgba(168,85,247,0.3);
}

.btn-shimmer:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 60px rgba(123,147,255,0.7), 0 0 25px rgba(168,85,247,0.4);
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* --- Platform Cards --- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.platform-card {
  padding: 36px;
  transition: all var(--transition);
}

.platform-card .card-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 24px;
  background: rgba(102,126,234,0.15);
  border: 1px solid rgba(102,126,234,0.3);
  color: var(--accent-1);
}

.platform-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.platform-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Design Lab --- */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.lab-card {
  padding: 32px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.lab-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.lab-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.lab-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.lab-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 3D Tilt */
.tilt-box {
  width: 200px; height: 130px;
  background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(240,147,251,0.15));
  border: 1px solid rgba(102,126,234,0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-1);
  letter-spacing: 2px;
  transition: box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.tilt-box:hover {
  box-shadow: 0 20px 60px rgba(102,126,234,0.3);
}

/* Magnetic button */
.magnetic-btn {
  padding: 16px 40px;
  background: linear-gradient(135deg, #7b93ff, #a855f7, #f472b6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: box-shadow 0.3s ease;
}

.magnetic-btn:hover {
  box-shadow: 0 0 60px rgba(102,126,234,0.5);
}

/* Morphing shape */
.morph-container {
  width: 160px; height: 160px;
}

.morph-container svg {
  width: 100%; height: 100%;
}

/* Particle canvas */
.particle-canvas {
  width: 100%; height: 100%;
  border-radius: 12px;
}

/* --- Games Section --- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.game-card {
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.game-card:hover {
  border-color: var(--accent-1);
  background: rgba(102,126,234,0.1);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(102,126,234,0.2);
}

.game-icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(102,126,234,0.12);
  border-radius: 14px;
}

.game-card h4 {
  font-size: 15px;
  font-weight: 600;
}

.game-card .game-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
}

/* Game Modal */
.game-modal {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 56, 0.88);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.game-modal.active { display: flex; }

.game-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 640px;
  padding: 0 0 16px;
}

.game-modal-title {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 2px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-modal-close {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all var(--transition);
}

.game-modal-close:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.game-modal canvas {
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  background: rgba(24,24,56,0.92);
}

.game-score {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  letter-spacing: 1px;
}

.game-instructions {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* Memory game */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 400px;
  margin: 0 auto;
}

.memory-cell {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.memory-cell.flipped {
  background: rgba(102,126,234,0.2);
  border-color: rgba(102,126,234,0.5);
}

.memory-cell.matched {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.4);
}

/* --- Weather Section --- */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.weather-card {
  padding: 24px;
  transition: all var(--transition);
}

.weather-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.w-city {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.w-temp {
  font-size: 44px;
  font-weight: 700;
  margin: 8px 0;
}

.w-desc {
  font-size: 13px;
  margin-bottom: 4px;
}

.w-details {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 2;
}

.w-icon-lg {
  font-size: 36px;
  margin-bottom: 8px;
}

/* Tokyo - blue accent */
.weather-tokyo .w-city { color: rgba(102,126,234,0.8); }
.weather-tokyo .w-temp { color: #667eea; }
.weather-tokyo .w-details { color: rgba(102,126,234,0.5); }
.weather-tokyo { border-color: rgba(102,126,234,0.2); }

/* Reykjavik - ice blue */
.weather-reykjavik {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-color: rgba(147,197,253,0.2);
}
.weather-reykjavik .w-city { color: rgba(147,197,253,0.8); }
.weather-reykjavik .w-temp { color: #93c5fd; }

/* Nairobi - warm orange */
.weather-nairobi { border-color: rgba(251,191,36,0.2); }
.weather-nairobi .w-city { color: rgba(251,191,36,0.8); }
.weather-nairobi .w-temp { color: #fbbf24; }
.weather-nairobi .w-desc { color: rgba(251,191,36,0.6); }
.weather-nairobi .w-details { color: rgba(251,191,36,0.45); }

/* Buenos Aires - purple */
.weather-buenos {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-color: rgba(118,75,162,0.25);
}
.weather-buenos .w-city { color: rgba(192,132,252,0.8); }

.w-circle {
  width: 100px; height: 100px;
  position: relative;
  margin: 8px 0;
}

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

.w-circle-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #c084fc;
}

/* Sydney - teal */
.weather-sydney { border-color: rgba(45,212,191,0.2); }
.weather-sydney .w-city { color: rgba(45,212,191,0.8); }
.weather-sydney .w-temp { color: #2dd4bf; }
.weather-sydney .w-desc { color: rgba(45,212,191,0.6); }
.weather-sydney .w-details { color: rgba(45,212,191,0.45); }

/* Weather mini graph */
.w-graph {
  margin-top: 12px;
  height: 40px;
}

.w-graph svg {
  width: 100%; height: 100%;
}

/* --- Radio Section --- */
.radio-container {
  margin-top: 48px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.radio-visual {
  width: 180px; height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-ring {
  position: absolute;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  animation: radio-pulse 3s ease-in-out infinite;
}

.radio-ring:nth-child(1) { width: 180px; height: 180px; animation-delay: 0s; }
.radio-ring:nth-child(2) { width: 130px; height: 130px; animation-delay: 0.5s; }
.radio-ring:nth-child(3) { width: 80px; height: 80px; animation-delay: 1s; }

@keyframes radio-pulse {
  0%, 100% { border-color: var(--glass-border); transform: scale(1); }
  50% { border-color: rgba(102,126,234,0.4); transform: scale(1.05); }
}

.radio-dot {
  width: 12px; height: 12px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(239,68,68,0.5);
  animation: pulse-dot 1.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.radio-dot.playing {
  background: #4ade80;
  box-shadow: 0 0 20px rgba(74,222,128,0.5);
}

.radio-info { text-align: center; }

.radio-station {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.radio-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
}

.radio-equalizer {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 32px;
  margin-top: 16px;
  justify-content: center;
}

.eq-bar {
  width: 5px;
  border-radius: 3px;
  transition: height 0.15s ease;
}

.radio-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.radio-btn {
  padding: 12px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.radio-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.radio-btn.primary {
  background: linear-gradient(135deg, #7b93ff, #a855f7, #f472b6);
  border-color: transparent;
  color: #fff;
}

.radio-btn.primary:hover {
  box-shadow: 0 0 40px rgba(102,126,234,0.5);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px; height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--accent-1);
  border-radius: 50%;
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--accent-1);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* --- Ambient Visualizer --- */
.visualizer-wrapper {
  margin-top: 48px;
  position: relative;
  overflow: hidden;
  height: 600px;
}

.visualizer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.visualizer-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  z-index: 2;
}

.viz-btn {
  padding: 8px 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.viz-btn:hover {
  background: rgba(102,126,234,0.2);
  border-color: rgba(102,126,234,0.5);
}

.viz-btn.active {
  background: rgba(102,126,234,0.25);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* ============================================
   NEW SECTIONS
   ============================================ */

/* --- Unit Converter --- */
.converter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.converter-tab {
  padding: 8px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.converter-tab:hover {
  background: rgba(102,126,234,0.15);
  border-color: rgba(102,126,234,0.4);
}

.converter-tab.active {
  background: rgba(102,126,234,0.25);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.converter-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.converter-field {
  flex: 1;
  min-width: 200px;
}

.converter-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.converter-field input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 18px;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 8px;
}

.converter-field input:focus {
  border-color: var(--accent-1);
}

.converter-field select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.converter-field select option {
  background: #252550;
  color: #fff;
}

.converter-swap {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102,126,234,0.15);
  border: 1px solid rgba(102,126,234,0.3);
  border-radius: 50%;
  color: var(--accent-1);
  font-size: 20px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.converter-swap:hover {
  background: rgba(102,126,234,0.3);
  transform: rotate(180deg);
}

.converter-panel {
  padding: 36px;
  margin-top: 48px;
}

/* --- Pomodoro Timer --- */
.pomodoro-panel {
  padding: 48px;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.pomodoro-modes {
  display: flex;
  gap: 8px;
}

.pomodoro-mode-btn {
  padding: 8px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.pomodoro-mode-btn:hover {
  background: rgba(102,126,234,0.15);
}

.pomodoro-mode-btn.active {
  background: rgba(102,126,234,0.25);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.pomodoro-circle-wrap {
  position: relative;
  width: 220px; height: 220px;
}

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

.pomodoro-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  color: #fff;
}

.pomodoro-controls {
  display: flex;
  gap: 12px;
}

.pomodoro-btn {
  padding: 12px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.pomodoro-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.pomodoro-btn.primary {
  background: linear-gradient(135deg, #7b93ff, #a855f7, #f472b6);
  border-color: transparent;
  color: #fff;
}

.pomodoro-btn.primary:hover {
  box-shadow: 0 0 40px rgba(102,126,234,0.5);
}

.pomodoro-sessions {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
}

@keyframes pomodoro-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- Scientific Calculator --- */
.calc-panel {
  padding: 32px;
  margin-top: 48px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.calc-display {
  padding: 20px 24px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  margin-bottom: 16px;
  text-align: right;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.calc-expression {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
  min-height: 18px;
  word-break: break-all;
}

.calc-result {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  word-break: break-all;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.calc-btn {
  padding: 16px 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.calc-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}

.calc-btn:active {
  transform: scale(0.95);
}

.calc-btn.op {
  color: var(--accent-1);
}

.calc-btn.equals {
  background: linear-gradient(135deg, #7b93ff, #a855f7, #f472b6);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}

.calc-btn.equals:hover {
  box-shadow: 0 0 30px rgba(102,126,234,0.5);
}

.calc-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: ripple-anim 0.5s ease-out;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* --- Color Palette --- */
.color-panel {
  padding: 36px;
  margin-top: 48px;
}

.color-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.color-picker-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.color-sv-canvas {
  width: 250px; height: 250px;
  border-radius: 12px;
  cursor: crosshair;
  border: 1px solid rgba(255,255,255,0.1);
}

.color-hue-bar {
  width: 250px; height: 20px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
}

.color-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.color-preview-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
}

.color-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-input-row label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  width: 35px;
  flex-shrink: 0;
}

.color-input-row input {
  flex: 1;
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}

.color-input-row input:focus {
  border-color: var(--accent-1);
}

.color-copy-btn {
  padding: 8px 16px;
  background: rgba(102,126,234,0.15);
  border: 1px solid rgba(102,126,234,0.3);
  border-radius: 8px;
  color: var(--accent-1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.color-copy-btn:hover {
  background: rgba(102,126,234,0.3);
}

.palette-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.palette-type-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.palette-type-btn {
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.palette-type-btn:hover {
  background: rgba(102,126,234,0.15);
  border-color: rgba(102,126,234,0.3);
}

.palette-type-btn.active {
  background: rgba(102,126,234,0.2);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.palette-colors {
  display: flex;
  gap: 8px;
}

.palette-swatch {
  flex: 1;
  height: 60px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  position: relative;
}

.palette-swatch:hover {
  transform: translateY(-4px);
}

.palette-swatch span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(0,0,0,0.7);
  text-shadow: 0 0 4px rgba(255,255,255,0.5);
}

/* --- World Clocks --- */
.clocks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.clock-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all var(--transition);
}

.clock-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.clock-svg {
  width: 120px; height: 120px;
}

.clock-city {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 600;
}

.clock-digital {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.clock-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
}

/* --- Markdown Editor --- */
.markdown-panel {
  padding: 0;
  margin-top: 48px;
  overflow: hidden;
}

.md-toolbar {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

.md-tool-btn {
  padding: 6px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all var(--transition);
}

.md-tool-btn:hover {
  background: rgba(102,126,234,0.15);
  border-color: rgba(102,126,234,0.3);
  color: var(--accent-1);
}

.md-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.md-editor {
  width: 100%;
  height: 100%;
  min-height: 400px;
  padding: 20px;
  background: rgba(0,0,0,0.25);
  border: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  resize: none;
  outline: none;
}

.md-preview {
  padding: 20px;
  font-size: 14px;
  line-height: 1.7;
  overflow-y: auto;
  max-height: 500px;
}

.md-preview h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.md-preview h2 { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.md-preview h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.md-preview p { margin-bottom: 10px; color: var(--text-secondary); }
.md-preview strong { color: #fff; font-weight: 600; }
.md-preview em { font-style: italic; }
.md-preview code {
  background: rgba(102,126,234,0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-1);
}
.md-preview pre {
  background: rgba(0,0,0,0.3);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow-x: auto;
}
.md-preview pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  color: #4ade80;
}
.md-preview blockquote {
  border-left: 3px solid var(--accent-1);
  padding-left: 16px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-style: italic;
}
.md-preview ul {
  margin-left: 20px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}
.md-preview li { margin-bottom: 4px; }
.md-preview a { color: var(--accent-1); text-decoration: underline; }
.md-preview hr {
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 16px 0;
}
.md-preview img {
  max-width: 100%;
  border-radius: 8px;
}

.md-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* --- ASCII Art Generator --- */
.ascii-panel {
  padding: 36px;
  margin-top: 48px;
}

.ascii-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.ascii-controls input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 16px;
  outline: none;
}

.ascii-controls input:focus {
  border-color: var(--accent-1);
}

.ascii-controls select {
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.ascii-controls select option {
  background: #252550;
}

.ascii-output {
  padding: 20px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.1;
  white-space: pre;
  overflow-x: auto;
  color: var(--accent-1);
  min-height: 100px;
}

/* --- Quote of the Day --- */
.quote-panel {
  padding: 48px;
  margin-top: 48px;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.quote-text {
  font-size: 22px;
  font-style: italic;
  line-height: 1.6;
  color: #fff;
  margin-bottom: 16px;
}

.quote-author {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  margin-bottom: 28px;
}

/* --- Ambient Sounds --- */
.sounds-panel {
  padding: 36px;
  margin-top: 48px;
}

.sounds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.sound-card {
  padding: 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all var(--transition);
}

.sound-card.active {
  border-color: rgba(102,126,234,0.5);
  background: rgba(102,126,234,0.1);
}

.sound-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.sound-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.sound-play-btn {
  padding: 8px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all var(--transition);
}

.sound-play-btn:hover {
  background: rgba(102,126,234,0.15);
  border-color: rgba(102,126,234,0.3);
}

.sound-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 100%; height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.sound-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  background: var(--accent-1);
  border-radius: 50%;
  cursor: pointer;
}

.sound-volume::-moz-range-thumb {
  width: 12px; height: 12px;
  background: var(--accent-1);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.sounds-stop-all {
  display: block;
  margin: 0 auto;
  padding: 10px 24px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px;
  color: #f87171;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.sounds-stop-all:hover {
  background: rgba(239,68,68,0.25);
}

/* --- Footer --- */
.footer {
  padding: 48px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-secondary); }

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  z-index: 10001;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  gap: 8px;
}

.sidebar-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  position: relative;
}

.sidebar-icon:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
  color: var(--text-primary);
  transform: scale(1.1);
}

.sidebar-icon.active {
  background: rgba(123, 147, 255, 0.20);
  border-color: rgba(123, 147, 255, 0.40);
  color: var(--accent-1);
}

.sidebar-icon .sidebar-tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(24, 24, 56, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-primary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar-icon:hover .sidebar-tooltip {
  opacity: 1;
}

/* Body content shift for sidebar */
body.has-sidebar {
  padding-left: var(--sidebar-width);
}
