/* Bird Cage Size Calculator — sky / avian theme */

:root {
  --bg: #152028;
  --bg-card: #1e2d38;
  --bg-elevated: #263848;
  --text: #eef3f7;
  --text-muted: #8fa3b3;
  --accent: #5eb8e8;
  --accent-soft: rgba(94, 184, 232, 0.18);
  --accent-hover: #7ec8ef;
  --success: #6fd4b8;
  --success-soft: rgba(111, 212, 184, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --highlight: rgba(94, 184, 232, 0.22);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(94, 184, 232, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(111, 212, 184, 0.06), transparent);
}

.site-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(21, 32, 40, 0.88);
}

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

.logo {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lang-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
  outline: none;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}

.tagline {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.disclaimer {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cage-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.calc-btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #0f1a22;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.25rem;
}

.calc-btn:hover,
.calc-btn:focus-visible {
  background: var(--accent-hover);
  outline: none;
}

.calc-btn:active {
  transform: scale(0.98);
}

.result {
  margin-top: 1.35rem;
  padding: 1.15rem 1rem;
  background: var(--success-soft);
  border: 1px solid rgba(111, 212, 184, 0.35);
  border-radius: 12px;
  text-align: center;
}

.result[hidden] {
  display: none;
}

.result-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-dims {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--success);
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.result-bars {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
}

.result-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.chart h2,
.howto h2 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.chart-note {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 300px;
}

.size-table th,
.size-table td {
  padding: 0.55rem 0.45rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.size-table th:first-child,
.size-table td:first-child {
  text-align: start;
}

.size-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-weight: 600;
}

.size-table tbody tr.row-match {
  background: var(--highlight);
}

.size-table tbody tr.row-match td:first-child {
  font-weight: 800;
  color: var(--accent);
}

.size-table td:first-child {
  font-weight: 600;
}

.howto ol {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.howto li {
  margin-bottom: 0.45rem;
}

.howto li:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

/* AdSense slots stay hidden until real ads are pasted */
.ad-slot {
  display: none;
}

@media (min-width: 480px) {
  .logo {
    font-size: 1.25rem;
  }

  .card {
    padding: 1.5rem 1.5rem;
  }

  .result-dims {
    font-size: 2.15rem;
  }
}
