/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #3b82f6;
  --primary-blue-dark: #2563eb;
  --secondary-green: #10b981;
  --secondary-green-dark: #059669;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --amber-50: #fffbeb;
  --amber-500: #f59e0b;
  --green-50: #f0fdf4;
  --green-500: #22c55e;
  --blue-50: #eff6ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--slate-900);
  background-color: var(--slate-50);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-blue);
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--slate-700);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--primary-blue);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Main Content */
main {
  padding: 3rem 0;
  min-height: calc(100vh - 400px);
}

/* Cards */
.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.card h3 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.card p {
  color: var(--slate-600);
  line-height: 1.6;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}

input[type="number"],
input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--slate-200);
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

input[type="range"] {
  width: 100%;
  height: 0.5rem;
  background: var(--slate-200);
  border-radius: 0.25rem;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--primary-blue);
  cursor: pointer;
  border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  background: var(--primary-blue);
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-full {
  width: 100%;
  padding: 1rem;
  font-size: 1.125rem;
}

/* Results Display */
.result-card {
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
  border: 2px solid;
}

.result-success {
  background: linear-gradient(135deg, var(--green-50) 0%, #d1fae5 100%);
  border-color: var(--secondary-green);
}

.result-warning {
  background: linear-gradient(135deg, var(--amber-50) 0%, #fef3c7 100%);
  border-color: var(--amber-500);
}

.result-error {
  background: linear-gradient(135deg, var(--red-50) 0%, #fee2e2 100%);
  border-color: var(--red-500);
}

.result-info {
  background: linear-gradient(135deg, var(--blue-50) 0%, #dbeafe 100%);
  border-color: var(--primary-blue);
}

.result-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.result-value.success { color: var(--secondary-green); }
.result-value.warning { color: var(--amber-500); }
.result-value.error { color: var(--red-600); }
.result-value.info { color: var(--primary-blue); }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: white;
}

thead {
  background: var(--slate-100);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
}

th {
  font-weight: 600;
  color: var(--slate-900);
}

tr:hover {
  background: var(--slate-50);
}

/* Alert Boxes */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  margin: 1rem 0;
  border-left: 4px solid;
}

.alert-info {
  background: var(--blue-50);
  border-color: var(--primary-blue);
  color: #1e40af;
}

.alert-success {
  background: var(--green-50);
  border-color: var(--secondary-green);
  color: #065f46;
}

.alert-warning {
  background: var(--amber-50);
  border-color: var(--amber-500);
  color: #92400e;
}

.alert-error {
  background: var(--red-50);
  border-color: var(--red-500);
  color: #991b1b;
}

.alert h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.alert ul {
  margin-left: 1.5rem;
}

.alert li {
  margin: 0.25rem 0;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Chart Container */
.chart-container {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
  margin-bottom: 1.5rem;
  color: var(--slate-900);
}

canvas {
  max-width: 100%;
  height: auto;
}

/* FAQ/Accordion */
details {
  background: white;
  padding: 1rem;
  border-radius: 0.375rem;
  border: 1px solid var(--slate-200);
  margin-bottom: 0.5rem;
}

summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--slate-900);
  padding: 0.5rem;
}

summary:hover {
  color: var(--primary-blue);
}

details[open] summary {
  margin-bottom: 1rem;
  color: var(--primary-blue);
}

details p {
  color: var(--slate-700);
  padding: 0 0.5rem;
}

/* Footer */
footer {
  background: var(--slate-900);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: white;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--slate-200);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--slate-200);
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
  }
  
  nav ul.active {
    display: flex;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .result-value {
    font-size: 2rem;
  }
}

@media print {
  header, footer, .btn { display: none; }
}
