/* Premium Theme - Developer Metric */
:root {
  /* Core Palette (Dark/Navy/Neon) */
  --color-bg: #0f172a;
  /* Slate 900 */
  --color-bg-alt: #1e293b;
  /* Slate 800 */
  --color-surface: rgba(30, 41, 59, 0.7);
  /* Surface with opacity for glass */

  --color-primary: #38bdf8;
  /* Sky 400 - Electric Blue */
  --color-primary-glow: rgba(56, 189, 248, 0.5);

  --color-secondary: #818cf8;
  /* Indigo 400 */
  --color-accent: #22d3ee;
  /* Cyan 400 */

  --color-text: #f8fafc;
  /* Slate 50 */
  --color-text-muted: #94a3b8;
  /* Slate 400 */

  --border-glass: rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* Utilities - Glassmorphism */
.glass {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
}

.glass-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(56, 189, 248, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.glass-card:hover::after {
  opacity: 1;
}

.glass-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 20px 40px -15px rgba(56, 189, 248, 0.2);
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Buttons */
.btn-glow {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #0f172a;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
  z-index: 1;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.btn-glow:hover::before {
  opacity: 1;
}

.btn-glow:hover {
  box-shadow: 0 0 20px var(--color-primary-glow);
  transform: scale(1.02);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-bg-alt);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* Utility / Helpers */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Mobile Menu Transition */
#mobile-menu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Calculator Styles */
.calc-input {
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: white;
  transition: border-color 0.2s;
  width: 100%;
}

.calc-input:focus {
  outline: none;
  border-color: #22d3ee;
}

.calc-result-box {
  background-color: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stats Counter */
.counter-val {
  background: linear-gradient(to bottom, #fff, var(--color-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--color-bg-alt);
  border: 1px solid var(--border-glass);
  border-radius: 1.5rem;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  transform: scale(0.9);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--color-primary);
}

.terms-content {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.terms-content h2 {
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.terms-content h3 {
  color: var(--color-text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.terms-content p,
.terms-content ul {
  margin-bottom: 1rem;
}

.terms-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}

.terms-cta {
  margin-top: 2rem;
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #0f172a;
  font-weight: 700;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.terms-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(34, 211, 238, 0.3);
}