:root {
  /* Color System */
  --color-primary: #3E8E41;
  --color-primary-light: #4caf50;
  --color-primary-dark: #2e7d32;
  
  --color-secondary: #0288d1;
  --color-secondary-light: #29b6f6;
  --color-secondary-dark: #01579b;
  
  --color-accent: #ff9800;
  --color-accent-light: #ffb74d;
  --color-accent-dark: #f57c00;
  
  --color-success: #3E8E41;
  --color-warning: #f57f17;
  --color-error: #d32f2f;
  
  --color-neutral-50: #fafafa;
  --color-neutral-100: #f5f5f5;
  --color-neutral-200: #eeeeee;
  --color-neutral-300: #e0e0e0;
  --color-neutral-400: #bdbdbd;
  --color-neutral-500: #9e9e9e;
  --color-neutral-600: #757575;
  --color-neutral-700: #616161;
  --color-neutral-800: #424242;
  --color-neutral-900: #212121;
  
  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --space-6: 3rem;
  
  /* Other Variables */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition-standard: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
  color: var(--color-neutral-800);
  background-color: var(--color-neutral-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-2);
  flex: 1;
}

/* Header Styles */
.header {
  background-color: #3E8E41;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 80px;
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.desktop-nav a:hover {
  color: black;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-neutral-800);
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--color-neutral-800);
  transition: all 0.3s ease;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  bottom: -6px;
}

.mobile-nav {
  display: none;
  background-color: white;
  padding: 1rem;
}

.mobile-nav-content nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav a {
  color: var(--color-neutral-800);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
}

/* Calculator Styles */
.calculator-card,
.results-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: var(--space-4);
  transition: var(--transition-standard);
}

.card-header {
  background-color: var(--color-primary);
  color: white;
  padding: var(--space-2);
  text-align: center;
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 500;
}

/* Form Styles */
form {
  padding: var(--space-3);
}

.form-group {
  margin-bottom: var(--space-3);
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: var(--color-neutral-800);
}

input,
select {
  width: 100%;
  padding: var(--space-1) var(--space-2);
  border: 2px solid var(--color-neutral-300);
  border-radius: var(--border-radius-md);
  font-size: 1rem;
  transition: var(--transition-standard);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(62, 142, 65, 0.2);
}

.helper-text {
  display: block;
  font-size: 0.875rem;
  color: var(--color-neutral-600);
  margin-top: 0.25rem;
}

.calculate-btn {
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  margin-top: 2rem;
}

.calculate-btn:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Results Styles */
.results-card {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  margin-top: var(--space-4);
}

.results-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.results-card.hidden {
  display: none;
}

.results-content {
  padding: var(--space-4);
  max-width: 800px;
  margin: 0 auto;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--space-4);
  font-weight: 600;
  font-size: 1.125rem;
}

.status-badge .status-icon {
  margin-right: var(--space-2);
  font-size: 1.25rem;
}

.status-badge.success {
  background-color: rgba(62, 142, 65, 0.1);
  color: var(--color-success);
}

.status-badge.warning {
  background-color: rgba(245, 127, 23, 0.1);
  color: var(--color-warning);
}

.status-badge.danger {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--color-error);
}

/* Load Comparison */
.load-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-neutral-50);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--space-4);
}

.load-data {
  text-align: center;
}

.load-data h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-neutral-600);
  margin-bottom: var(--space-2);
}

.load-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--space-1);
}

.roof-type-label {
  font-size: 0.875rem;
  color: var(--color-neutral-600);
}

/* Load Meter */
.load-meter-container {
  margin: var(--space-4) 0;
}

.load-meter {
  height: 12px;
  background: var(--color-neutral-100);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.load-bar {
  height: 100%;
  width: 0;
  background: var(--color-success);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px;
}

.load-bar.warning {
  background: var(--color-warning);
}

.load-bar.danger {
  background: var(--color-error);
}

.load-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-1);
  font-size: 0.75rem;
  color: var(--color-neutral-600);
}

/* Load Status */
.load-status {
  padding: var(--space-3);
  border-radius: var(--border-radius-lg);
  margin: var(--space-4) 0;
  font-size: 1rem;
  line-height: 1.6;
}

.status-safe {
  background: rgba(62, 142, 65, 0.1);
  border-left: 4px solid var(--color-success);
  color: var(--color-success);
}

.status-warning {
  background: rgba(245, 127, 23, 0.1);
  border-left: 4px solid var(--color-warning);
  color: var(--color-warning);
}

/* Load Breakdown */
.load-breakdown {
  background: var(--color-neutral-50);
  border-radius: var(--border-radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.load-breakdown h3 {
  font-size: 1.125rem;
  color: var(--color-neutral-800);
  margin-bottom: var(--space-3);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-neutral-200);
}

.breakdown-row:last-child {
  border-bottom: none;
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-neutral-300);
  font-weight: 600;
}

.breakdown-row .load-type {
  color: var(--color-neutral-700);
}

.breakdown-row .load-value {
  font-size: 1rem;
  font-weight: 500;
}

/* Recommendations */
.recommendations {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.recommendations h3 {
  color: var(--color-primary);
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
}

.recommendations ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recommendations li {
  position: relative;
  padding-left: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--color-neutral-700);
}

.recommendations li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 600;
}

/* CTA Buttons */
.next-steps {
  margin-top: var(--space-4);
}

.cta-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--border-radius-md);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cta-btn.materials {
  background: var(--color-primary);
  color: white;
}

.cta-btn.cost {
  background: var(--color-secondary);
  color: white;
}

.cta-btn.engineer {
  background: var(--color-accent);
  color: white;
}

.cta-btn.download {
  background: var(--color-neutral-800);
  color: white;
}

/* Footer Styles */
.footer {
  background-color: var(--color-neutral-900);
  color: white;
  padding: 4rem 2rem 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
}

.footer-info {
  max-width: 400px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-info p {
  color: var(--color-neutral-400);
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.link-group h4 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.link-group ul {
  list-style: none;
}

.link-group li {
  margin-bottom: 0.5rem;
}

.link-group a {
  color: var(--color-neutral-400);
  text-decoration: none;
  transition: color 0.3s ease;
}

.link-group a:hover {
  color: white;
}

.copyright {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--color-neutral-700);
  text-align: center;
  color: var(--color-neutral-500);
  font-size: 0.875rem;
}

/* Form Section Improvements */
.form-section {
  background-color: var(--color-neutral-50);
  border-radius: var(--border-radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  transition: var(--transition-standard);
}

.form-section:hover {
  background-color: white;
  box-shadow: var(--box-shadow);
}

.form-section h3 {
  color: var(--color-primary);
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Input Group Improvements */
.form-group {
  position: relative;
  margin-bottom: var(--space-4);
}

.form-group label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-neutral-600);
  margin-bottom: var(--space-1);
}

.form-group input,
.form-group select {
  background-color: white;
  border: 2px solid var(--color-neutral-200);
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  width: 100%;
  transition: all 0.3s ease;
}

.form-group input:hover,
.form-group select:hover {
  border-color: var(--color-neutral-400);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(62, 142, 65, 0.1);
  outline: none;
}

.form-group .helper-text {
  font-size: 0.75rem;
  color: var(--color-neutral-500);
  margin-top: 0.5rem;
  transition: color 0.3s ease;
}

.form-group:hover .helper-text {
  color: var(--color-neutral-700);
}

/* Checkbox Group Improvements */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background-color: white;
  border: 2px solid var(--color-neutral-200);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkbox-label:hover {
  border-color: var(--color-primary);
  background-color: var(--color-neutral-50);
}

.checkbox-label input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-neutral-400);
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Calculate Button Improvements */
.calculate-btn {
  background-color: var(--color-primary);
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1.25rem 2rem;
  border-radius: var(--border-radius-lg);
  border: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  margin-top: var(--space-4);
  position: relative;
  overflow: hidden;
}

.calculate-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0));
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.calculate-btn:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(62, 142, 65, 0.2);
}

.calculate-btn:hover::after {
  transform: translateY(0);
}

.calculate-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .logo-icon {
    font-size: 2rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .tagline {
    font-size: 1rem;
  }
  
  .load-comparison {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .cta-buttons {
    grid-template-columns: 1fr;
  }
  
  .load-value {
    font-size: 2rem;
  }

  .form-section {
    padding: var(--space-3);
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .calculate-btn {
    font-size: 1.125rem;
    padding: 1rem 1.5rem;
  }
}