/* Modern Styles & Light/Dark Theme Support */
*, ::before, ::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* DARK MODE DEFAULT */
html.dark body {
  background-color: #020617;
  color: #f8fafc;
}

/* LIGHT MODE STYLING */
html:not(.dark) body {
  background-color: #f8fafc;
  color: #0f172a;
}

html:not(.dark) header {
  background-color: rgba(255, 255, 255, 0.85) !important;
  border-bottom-color: rgba(226, 232, 240, 0.9) !important;
}

html:not(.dark) header nav a {
  color: #475569 !important;
}

html:not(.dark) header nav a:hover {
  color: #0f52ba !important;
}

html:not(.dark) .glass-panel {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(203, 213, 225, 0.7) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

html:not(.dark) .grid-overlay {
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px) !important;
}

html:not(.dark) h1, html:not(.dark) h2, html:not(.dark) h3, html:not(.dark) h4 {
  color: #0f172a !important;
}

html:not(.dark) p {
  color: #475569 !important;
}

html:not(.dark) .bg-slate-900,
html:not(.dark) .bg-slate-900\/80,
html:not(.dark) .bg-slate-900\/90,
html:not(.dark) .bg-slate-950,
html:not(.dark) .bg-slate-950\/75,
html:not(.dark) .bg-slate-950\/90,
html:not(.dark) .bg-slate-950\/95 {
  background-color: #ffffff !important;
}

html:not(.dark) .bg-slate-900\/50,
html:not(.dark) .bg-slate-800,
html:not(.dark) .bg-slate-800\/80 {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
}

html:not(.dark) .border-slate-800,
html:not(.dark) .border-slate-800\/80,
html:not(.dark) .border-slate-700,
html:not(.dark) .border-slate-700\/80 {
  border-color: #e2e8f0 !important;
}

html:not(.dark) .text-slate-100,
html:not(.dark) .text-slate-200,
html:not(.dark) .text-slate-300 {
  color: #334155 !important;
}

html:not(.dark) .text-slate-400 {
  color: #64748b !important;
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

/* Background Cyber Grid */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Animated Scale Up for Modal */
@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-scaleUp {
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Custom Range Input Styling */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 6px;
  outline: none;
  background: #1e293b;
}

html:not(.dark) input[type=range] {
  background: #cbd5e1;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  border: 2px solid white;
}

input[type=range]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  border: 2px solid white;
}
