/* ===== Base (desktop) styles ===== */
/* Note: Using CSS Variables for theme support */
body { background-color: var(--color-bg-primary, #f0f4f8); }

.main-title {
  font-weight: 800;
  color: var(--color-accent-blue, #3b82f6);
  font-size: var(--font-h1);
  line-height: 1.2;
}

.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.cards h2 { font-size: var(--font-h2); }
.cards h3 { font-size: var(--font-h3); }

.cards {
  display: grid;
  gap: var(--space-5, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.card {
  background: var(--color-card-bg, #fff);
  border-radius: 18px;
  box-shadow: var(--color-card-shadow, 0 8px 20px rgba(0, 0, 0, 0.05));
  padding: 1.5rem;
  width: 100%;
  color: var(--color-text-primary, #1e293b);
  border: 1px solid var(--color-card-border, transparent);
}

.footprint-card {
  background-color: var(--color-footprint-bg, #FFFBEA);
  border: 1px solid var(--color-footprint-border, #F5EAC2);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  color: var(--color-footprint-text, #92400e);
}

.simulator-card {
  background-color: var(--color-simulator-bg, #E6FAF0);
  border: 1px solid var(--color-simulator-border, #C8EEDA);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  color: var(--color-simulator-text, #065f46);
}

.water-drop-container {
  position: relative;
  width: 150px;
  height: 150px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.water-drop-background {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #3b82f6;
  border-radius: 0 0 50px 50px;
  transition: height 1s ease-out;
}

.water-drop-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 192 0s19.4 4.2 25.4 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 192 0s19.4 4.2 25.4 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192z"/></svg>');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  background-color: #e0e0e0;
}

.days-left-card {
  background: var(--color-days-left-bg, linear-gradient(135deg, #ef4444, #b91c1c));
  color: var(--color-days-left-text, white);
}

.rain-bar {
  background-color: var(--color-info-bg, #93c5fd);
  border-radius: .5rem;
  position: relative;
}

.rain-bar-fill {
  background-color: var(--color-info, #1d4ed8);
  border-radius: .5rem;
  transition: height 1s ease-out;
}

.btn-gemini {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  transition: all .3s ease;
}

.btn-gemini:hover { box-shadow: 0 0 20px rgba(79, 70, 229, .5); }

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--color-border, #d1d5db);
  border-radius: 5px;
  outline: none;
  opacity: .7;
  transition: opacity .2s;
}

input[type=range]:hover { opacity: 1; }

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--color-accent-blue, #3b82f6);
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid var(--color-bg-secondary, white);
  box-shadow: 0 0 5px rgba(0, 0, 0, .2);
}

input[type=range]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--color-accent-blue, #3b82f6);
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid var(--color-bg-secondary, white);
  box-shadow: 0 0 5px rgba(0, 0, 0, .2);
}

#out-footprint,
#water-result,
#simulate-result,
#solution-result {
  margin-top: .75rem;
  line-height: 1.9;
  font-size: var(--font-body);
}

.site-logo {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 150px;
  height: auto;
  aspect-ratio: 1 / 1;
  max-width: 150px;
  max-height: 150px;
  z-index: 1000;
}

/* ===== Mobile overrides ===== */
@media (max-width: 768px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .card {
    width: 100%;
  }

  .site-logo {
    position: static;
    margin: 10px auto;
    width: 35vw;
    max-width: 120px;
  }

  .water-drop-container {
    width: 35vw;
    height: 35vw;
    max-width: 120px;
    max-height: 120px;
  }
}

