:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #10b981;
  --blue: #0284c7;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Prompt', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Header */
.app-header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.8rem 1.5rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.brand h1 { font-size: 1.25rem; color: var(--text); }
.brand p { font-size: 0.75rem; color: var(--muted); }

.nav-tabs { display: flex; gap: 8px; }
.nav-tab {
  background: #e2e8f0;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.nav-tab.active, .nav-tab:hover {
  background: var(--primary);
  color: white;
}

.app-main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.hidden { display: none; }

.intro-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.intro-card h2 { font-size: 1.5rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.intro-card p { font-size: 0.9rem; color: var(--muted); }

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.bird-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.sire-panel { border-top: 4px solid #3b82f6; }
.dam-panel { border-top: 4px solid #ec4899; }

.panel-header { display: flex; align-items: center; gap: 8px; margin-bottom: 1.2rem; }
.gender-icon { font-size: 1.5rem; }
.panel-header h3 { font-size: 1.2rem; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.4rem; }
.form-group select, .form-group input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: white;
}

.splits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chk-label {
  display: flex;
  align-items: center;
  background: #f8fafc;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  cursor: pointer;
}
.chk-label input { margin-right: 6px; }

.hint { font-size: 0.75rem; color: var(--muted); display: block; margin-top: 4px; }

.bird-preview-badge {
  background: #f1f5f9;
  border: 1px dashed var(--border);
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bird-emoji { font-size: 1.8rem; }

.calc-action-bar { text-align: center; margin: 2rem 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-calc { background: var(--primary); color: white; box-shadow: 0 4px 14px rgba(5,150,105,0.3); }
.btn-calc:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Results */
.results-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.results-card h3 {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  text-align: center;
}

.gender-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gender-col {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
}

.male-col { border-left: 4px solid #3b82f6; }
.female-col { border-left: 4px solid #ec4899; }

.col-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.offspring-item {
  background: white;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-visual { font-weight: 600; font-size: 0.95rem; }
.item-genotype { font-size: 0.78rem; color: var(--muted); }
.item-pct {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.85rem;
}

.punnett-box {
  background: #fafaf9;
  border: 1px dashed var(--border);
  padding: 1.2rem;
  border-radius: 8px;
}
.punnett-box h4 { font-size: 1rem; margin-bottom: 0.8rem; color: #444; }

/* Transit Search */
.transit-search-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: center;
}

.input-wrap label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.input-wrap input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}

.routes-container { display: flex; flex-direction: column; gap: 1rem; }
.bus-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s;
}

.bus-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.bus-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  background: #ecfdf5;
  padding: 4px 14px;
  border-radius: 8px;
}

.bus-info h4 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.bus-info p { font-size: 0.85rem; color: var(--muted); }

.bus-badge-tag {
  background: #e2e8f0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.app-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .calculator-grid, .gender-breakdown, .search-row { grid-template-columns: 1fr; }
}
