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

:root {
  --primary: #00e5ff;
  --primary-glow: rgba(0, 229, 255, 0.35);
  --secondary: #10b981;
  --secondary-glow: rgba(16, 185, 129, 0.35);
  --accent: #8b5cf6;
  --bg-dark: #07090e;
  --bg-card: rgba(15, 23, 42, 0.65);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #07090e;
  color: #f8fafc;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Glassmorphism */
.glass-panel {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-panel-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 12px 30px -10px rgba(0, 229, 255, 0.18);
}

.glass-card-glow {
  position: relative;
}
.glass-card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.4), transparent 60%, rgba(139, 92, 246, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Gradient text */
.text-gradient-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #00e5ff 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #c084fc 0%, #818cf8 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glowing buttons */
.btn-glow-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 40%, #00e5ff 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
  transition: all 0.25s ease;
}
.btn-glow-primary:hover {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
  transform: scale(1.02);
}

.btn-glow-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
  transition: all 0.25s ease;
}
.btn-glow-success:hover {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
  transform: scale(1.02);
}

/* Animations */
@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 35s linear infinite;
}
.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.06); }
}

.glow-ambient-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, rgba(0, 229, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite;
}

.glow-ambient-2 {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(139, 92, 246, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: pulseGlow 10s ease-in-out infinite reverse;
}

/* Custom range slider */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  background: #1e293b;
  border-radius: 8px;
  height: 8px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00e5ff;
  cursor: pointer;
  box-shadow: 0 0 12px #00e5ff;
  border: 2px solid #ffffff;
  transition: transform 0.1s ease;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Modal styles */
.modal-overlay {
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
}


/* ================= COMPLETE LIGHT & DARK THEME SYSTEM ================= */
html.light {
  color-scheme: light;
}

html.light body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light .glow-ambient-1,
html.light .glow-ambient-2 {
  opacity: 0.15 !important;
  filter: blur(140px) !important;
}

html.light header {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #e2e8f0 !important;
}

html.light footer {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html.light .glass-panel {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03) !important;
}

html.light .glass-card-glow {
  box-shadow: 0 20px 35px -5px rgba(6, 182, 212, 0.08), 0 0 20px rgba(6, 182, 212, 0.05) !important;
}

html.light .terminal-panel {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
}

html.light .text-white {
  color: #0f172a !important;
}

html.light .text-slate-100, 
html.light .text-slate-200, 
html.light .text-slate-300 {
  color: #1e293b !important;
}

html.light .text-slate-400,
html.light .text-slate-500 {
  color: #64748b !important;
}

html.light .bg-slate-950,
html.light .bg-slate-900,
html.light .bg-slate-800 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html.light .bg-slate-950\/90,
html.light .bg-slate-950\/80,
html.light .bg-slate-950\/60,
html.light .bg-slate-900\/95,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/60,
html.light .bg-slate-900\/50,
html.light .bg-slate-900\/40,
html.light .bg-slate-800\/80,
html.light .bg-slate-800\/90 {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #e2e8f0 !important;
}

html.light .border-white\/10,
html.light .border-white\/5,
html.light .border-white\/15,
html.light .border-white\/20 {
  border-color: #e2e8f0 !important;
}

html.light .bg-white\/5,
html.light .bg-white\/10,
html.light .bg-white\/15 {
  background-color: #f1f5f9 !important;
}

html.light input[type="text"],
html.light input[type="number"] {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light .modal-overlay {
  background-color: rgba(15, 23, 42, 0.45) !important;
}

/* ================= ULTRA-PERFECT MOBILE OPTIMIZATIONS ================= */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 640px) {
  .modal-container > div.glass-panel {
    width: 94vw !important;
    max-width: 94vw !important;
    margin: 12px auto !important;
    padding: 16px !important;
    max-height: 88vh !important;
  }

  .text-4xl, .text-5xl, .text-6xl {
    font-size: 1.85rem !important;
    line-height: 2.25rem !important;
  }

  .text-3xl {
    font-size: 1.5rem !important;
    line-height: 1.9rem !important;
  }

  .text-2xl {
    font-size: 1.25rem !important;
    line-height: 1.6rem !important;
  }

  header nav {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .ticker-track div {
    font-size: 10px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}
