:root {
  /* Color Palette - Light Mode */
  --primary: #0088cc;
  /* Trustworthy Blue */
  --primary-dark: #005f8f;
  --secondary: #2c3e50;
  /* Deep Slate */
  --accent: #27ae60;
  /* Growth Green */
  --background: #f8f9fa;
  --surface: #ffffff;
  --text-main: #212529;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 0.75rem;
}

[data-theme="dark"] {
  /* Color Palette - Dark Mode */
  --primary: #33aadd;
  --primary-dark: #0077aa;
  --secondary: #ecf0f1;
  --accent: #2ecc71;
  --background: #121212;
  --surface: #1e1e1e;
  --text-main: #e0e0e0;
  --text-muted: #a0a0a0;
  --border: #333333;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.flex {
  display: flex;
  gap: 1rem;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

/* Typography */
h1,
h2,
h3,
h4 {
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: var(--secondary);
}

/* Components */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary);
  opacity: 0.9;
}

[data-theme="dark"] .btn-secondary {
  color: var(--background);
}

.card {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  border: 1px solid var(--border);
}

/* Navbar */
.navbar {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  margin-left: 1.5rem;
}

.nav-link:hover {
  color: var(--primary);
}

/* Inputs & Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
}

input[type="range"] {
  width: 100%;
  margin-top: 0.5rem;
}

/* Results section */
.results-card {
  background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
  color: white;
}

.result-value {
  font-size: 2rem;
  font-weight: 800;
}

.result-label {
  opacity: 0.9;
  font-size: 0.9rem;
}

/* Footer */
footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  /* Mobile menu implementation needed later */
}