/* ============================================
   Paw Safety Check - Shared Styles
   ============================================ */

/* --- CSS Variables & Theming --- */
:root {
  --bg: #f4f4f9;
  --card-bg: #ffffff;
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  --text-main: #1f2937;
  --text-sub: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --input-focus: #3b82f6;
  --safe: #10b981;
  --safe-bg: #ecfdf5;
  --caution: #f59e0b;
  --caution-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --cold-danger: #3b82f6;
  --cold-bg: #eff6ff;
  --accent: #111827;
  --accent-hover: #374151;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
  --text-main: #f1f5f9;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --input-bg: #0f172a;
  --input-border: #475569;
  --input-focus: #60a5fa;
  --safe-bg: #064e3b;
  --caution-bg: #78350f;
  --danger-bg: #7f1d1d;
  --cold-bg: #1e3a5f;
  --accent: #e2e8f0;
  --accent-hover: #cbd5e1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Base Reset & Body --- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-main);
  margin: 0;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: background-color 0.4s ease, color 0.3s ease;
}

/* Subtle animated paw pattern background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23666'%3E%3Cellipse cx='50' cy='68' rx='18' ry='22'/%3E%3Ccircle cx='28' cy='38' r='10'/%3E%3Ccircle cx='72' cy='38' r='10'/%3E%3Ccircle cx='18' cy='58' r='8'/%3E%3Ccircle cx='82' cy='58' r='8'/%3E%3C/svg%3E");
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] body::before {
  opacity: 0.008;
  filter: invert(1);
}

/* --- Card Container --- */
.container {
  position: relative;
  background: var(--card-bg);
  padding: 2rem 1.5rem;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  max-width: 600px;
  width: 100%;
  z-index: 1;
  transition: background 0.4s ease, box-shadow 0.3s ease, max-width 0.3s ease;
}

@media (min-width: 768px) {
  .container { max-width: 780px; padding: 2.5rem 3rem; }
}

@media (min-width: 1024px) {
  .container { max-width: 900px; padding: 2.5rem 3.5rem; }
}

/* Desktop scaling for headings and content */
@media (min-width: 768px) {
  h1 { font-size: 2.1rem; }
  .hero-intro { font-size: 1rem; max-width: 540px; }
  .tagline { font-size: 1rem; margin-bottom: 1.75rem; }
  h2 { font-size: 1.25rem; }
  .dog-icon { width: 88px; height: 88px; }
}

@media (min-width: 1024px) {
  h1 { font-size: 2.4rem; }
  .hero-intro { font-size: 1.05rem; max-width: 580px; }
  .tagline { font-size: 1.05rem; }
}

/* --- Dog Icon --- */
.dog-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px auto;
  transition: transform 0.3s ease;
}

.dog-icon:hover {
  transform: rotate(-8deg) scale(1.1);
}

[data-theme="dark"] .dog-icon {
  filter: invert(1) brightness(2);
}

/* --- Headings --- */
h1 {
  font-size: 1.6rem;
  margin: 0 0 0.75rem 0;
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.25;
}

.hero-highlight {
  color: var(--input-focus);
}

.hero-intro {
  text-align: center;
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 auto 1.5rem auto;
  max-width: 480px;
  font-weight: 400;
}

.tagline {
  text-align: center;
  color: var(--text-sub);
  font-size: 0.85rem;
  margin: 0 0 1.5rem 0;
  font-weight: 400;
}

h2 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem 0;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

/* --- Navigation --- */
.nav-group {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  background: var(--border-light);
  padding: 4px;
  border-radius: 12px;
}

.nav-btn {
  flex: 1;
  padding: 10px 14px;
  text-align: center;
  background: transparent;
  color: var(--text-sub);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: none;
}

.nav-btn.active {
  background: var(--card-bg);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .nav-btn.active {
  box-shadow: none;
}

.nav-btn:not(.active):hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .nav-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .nav-btn.active {
  background: var(--accent);
  color: #0f172a;
}

/* --- Top Controls (Unit Toggle + Theme Toggle) --- */
.top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.unit-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 34px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider { background-color: var(--accent); }
input:checked + .slider::before { transform: translateX(16px); }

/* Theme toggle button */
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 1.1rem;
  transition: all 0.2s;
  padding: 0;
}

.theme-btn:hover {
  background: var(--border-light);
  color: var(--text-main);
  transform: rotate(20deg);
}

[data-theme="dark"] .theme-btn {
  border-color: var(--border);
}

[data-theme="dark"] .theme-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* --- Search / Input Group --- */
.input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.search-container {
  position: relative;
  flex: 1;
}

#addressInput {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#addressInput:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] #addressInput:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

[data-theme="dark"] .suggestions {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  color: var(--text-main);
  transition: background 0.15s;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--border-light); }

/* --- Buttons --- */
.geo-btn {
  background: var(--card-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  width: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-sub);
  transition: all 0.2s;
}

.geo-btn:hover {
  border-color: var(--input-focus);
  color: var(--input-focus);
  transform: scale(1.05);
}

.geo-btn svg { width: 20px; height: 20px; }

#searchBtn {
  padding: 12px 20px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
}

#searchBtn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] #searchBtn:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#searchBtn:disabled { opacity: 0.5; cursor: not-allowed; }

[data-theme="dark"] #searchBtn {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* --- Loader (paw print animation) --- */
.loader {
  display: none;
  text-align: center;
  padding: 24px 0;
}

.loader-paws {
  display: inline-flex;
  gap: 8px;
}

.loader-paw {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: pawBounce 1.4s ease-in-out infinite;
  opacity: 0.3;
}

.loader-paw:nth-child(2) { animation-delay: 0.2s; }
.loader-paw:nth-child(3) { animation-delay: 0.4s; }
.loader-paw:nth-child(4) { animation-delay: 0.6s; }

@keyframes pawBounce {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* --- Error --- */
.error {
  color: var(--danger);
  text-align: center;
  margin-top: 10px;
  display: none;
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Result Card --- */
.result-card {
  display: none;
  text-align: center;
  animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Status Badge --- */
.status-badge {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 9999px;
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  letter-spacing: 0.06em;
  animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes badgePop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.status-safe { background: var(--safe); }
.status-caution { background: var(--caution); }
.status-danger { background: var(--danger); }
.status-cold { background: var(--cold-danger); }

/* Pulse effect for danger states */
.status-danger {
  animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both,
             dangerPulse 2s ease-in-out infinite 0.5s;
}

@keyframes dangerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* --- Surface Temperature Bar --- */
.surface-wrap {
  margin: 0 auto 18px auto;
  max-width: 360px;
}

@media (min-width: 768px) {
  .surface-wrap { max-width: 480px; }
}

.surface-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.surface-label {
  color: var(--text-sub);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.surface-value {
  font-weight: 700;
  font-size: 0.95rem;
}

.surface-bar {
  position: relative;
  height: 8px;
  border-radius: 9999px;
  overflow: visible;
  background: var(--border-light);
}

/* Zones aligned to risk thresholds:
   0-12%  red    (extreme cold, < -8°C)
   12-30% orange (cold danger, -8 to 0°C)
   30-70% green  (safe, 0 to 30°C)
   70-88% orange (caution, 30 to 38°C)
   88-100% red   (danger/extreme, 38°C+) */
.surface-zones {
  height: 100%;
  width: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg,
    #ef4444 0%,
    #ef4444 10%,
    #fbbf24 14%,
    #fbbf24 28%,
    #34d399 32%,
    #34d399 68%,
    #fbbf24 72%,
    #fbbf24 86%,
    #ef4444 90%,
    #ef4444 100%
  );
}

[data-theme="dark"] .surface-zones {
  opacity: 0.85;
}

.surface-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.surface-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: var(--card-bg);
  border: 3px solid var(--text-main);
  left: 50%;
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .surface-marker {
  background: #f1f5f9;
  border-color: #f1f5f9;
}

/* --- Metrics Grid --- */
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  background: var(--border-light);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.metric-item {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.metric-label {
  color: var(--text-sub);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.metric-value {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
}

@media (min-width: 768px) {
  .metrics { gap: 14px; padding: 18px; }
  .metric-value { font-size: 1.15rem; }
  .metric-label { font-size: 0.75rem; }
}

/* --- Details / Expandable Sections --- */
details {
  background: var(--border-light);
  border-radius: 12px;
  padding: 0;
  text-align: left;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
  transition: background 0.2s;
  font-size: 0.95rem;
}

summary:hover { background: rgba(0, 0, 0, 0.03); }

[data-theme="dark"] summary:hover { background: rgba(255, 255, 255, 0.04); }

summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}

details[open] summary::after {
  content: "-";
  transform: rotate(180deg);
}

.summary-text {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.explanation {
  padding: 0 16px 16px 16px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-sub);
}

/* --- Manual Check Warning --- */
.manual-check {
  margin-top: 1rem;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: var(--card-bg);
  border-radius: 0 10px 10px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-sub);
}

[data-theme="dark"] .manual-check {
  box-shadow: none;
  border-left-color: var(--input-focus);
  background: var(--border-light);
}

/* --- Share Button --- */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  transform: translateY(-1px);
}

[data-theme="dark"] .share-btn {
  border-color: var(--border);
}

[data-theme="dark"] .share-btn:hover {
  border-color: var(--text-sub);
}

.share-btn.copied {
  border-color: var(--safe);
  color: var(--safe);
}

/* --- Fun Tips Section --- */
.fun-tip {
  margin-top: 1rem;
  padding: 14px 16px;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-sub);
  text-align: left;
  animation: fadeIn 0.5s ease;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.fun-tip::before {
  content: "\1F4A1";
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.fun-tip strong {
  color: var(--text-main);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- About Section --- */
.about-section {
  margin-top: 1rem;
}

.about-section summary {
  padding: 12px 16px;
  font-size: 0.9rem;
}

.about-content {
  padding: 0 16px 16px 16px;
  color: var(--text-sub);
  font-size: 0.93rem;
  line-height: 1.6;
}

/* --- Footer Links --- */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text-main);
}

/* Celebration animation removed */

/* --- Info Page Specific --- */
.info-container {
  max-width: 520px;
}

@media (min-width: 768px) {
  .info-container { max-width: 760px; }
}

@media (min-width: 1024px) {
  .info-container { max-width: 860px; }
}

.info-container p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 1rem;
}

.info-container ul {
  padding-left: 20px;
  margin-bottom: 1rem;
}

.info-container li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.info-container a {
  color: var(--input-focus);
  transition: opacity 0.2s;
}

.info-container a:hover { opacity: 0.8; }

.highlight-box {
  background: var(--border-light);
  border-left: 4px solid var(--accent);
  padding: 16px;
  margin: 1.25rem 0;
  border-radius: 0 10px 10px 0;
}

[data-theme="dark"] .highlight-box {
  border-left-color: var(--input-focus);
}

.metric-comparison {
  display: flex;
  justify-content: space-between;
  background: var(--border-light);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.col {
  display: flex;
  flex-direction: column;
  text-align: center;
  width: 48%;
}

.col .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.col .value {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.9rem;
}

/* Symptom Gallery */
.symptom-gallery {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
}

.symptom-item {
  margin: 0 0 1.25rem 0;
}

.symptom-item figcaption {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.symptom-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.symptom-item img:hover {
  transform: scale(1.02);
}

/* Sources */
.sources {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sources li {
  font-size: 0.88rem;
}

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

/* --- Contact Page Specific --- */
.contact-container {
  max-width: 520px;
}

@media (min-width: 768px) {
  .contact-container { max-width: 640px; }
}

.contact-container h1 {
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.contact-container .subtitle {
  color: var(--text-sub);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--text-main);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .contact-form input:focus,
[data-theme="dark"] .contact-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.contact-form button {
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.contact-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .contact-form button:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .contact-form button {
  background: #e2e8f0;
  color: #0f172a;
}

/* Star Rating */
.rating-group {
  display: flex;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 4px;
  margin-bottom: 8px;
}

.rating-group input { display: none; }

.rating-group label {
  font-size: 2rem;
  color: var(--border);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}

.rating-group label:hover { transform: scale(1.2); }

.rating-group label:hover,
.rating-group label:hover ~ label,
.rating-group input:checked ~ label {
  color: #fbbf24;
}

/* --- Scroll to top (info page) --- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
  z-index: 50;
}

.scroll-top:hover { transform: translateY(-2px); }
.scroll-top.visible { display: flex; }

[data-theme="dark"] .scroll-top {
  background: #e2e8f0;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* --- 7-Day Forecast --- */
.forecast-section {
  margin-top: 1rem;
  animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.forecast-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  margin: 0 0 10px 0;
  text-align: center;
}

.forecast-grid {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.forecast-grid::-webkit-scrollbar {
  display: none;
}

.forecast-day {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 10px 6px;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.forecast-today {
  border-color: var(--input-focus);
  background: var(--cold-bg);
}

[data-theme="dark"] .forecast-today {
  background: rgba(59, 130, 246, 0.12);
}

.forecast-day-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-sub);
}

.forecast-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.forecast-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.forecast-temps {
  display: flex;
  gap: 6px;
  font-size: 0.78rem;
}

.forecast-hi {
  font-weight: 700;
  color: var(--text-main);
}

.forecast-lo {
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .forecast-day {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    gap: 4px;
  }
  .forecast-icon { font-size: 1.5rem; }
  .forecast-desc { font-size: 0.7rem; }
  .forecast-temps { font-size: 0.85rem; }
  .forecast-day-name { font-size: 0.75rem; }
}

/* --- SEO Content Section --- */
.seo-section {
  margin-top: 1.25rem;
  text-align: left;
}

.seo-section h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem 0;
  padding-bottom: 6px;
}

.seo-section p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin: 0 0 0.75rem 0;
}

.seo-section a {
  color: var(--input-focus);
  text-decoration: none;
  transition: opacity 0.2s;
}

.seo-section a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* FAQ Items */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

.faq-item {
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border-light);
  overflow: hidden;
}

.faq-item summary {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.faq-answer {
  padding: 0 16px 14px 16px;
}

.faq-answer p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin: 0;
}

.faq-answer a {
  color: var(--input-focus);
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

/* --- Visit Counter --- */
.visit-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1.25rem;
  padding: 12px 16px;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.visit-counter-icon {
  font-size: 1.1rem;
}

.visit-counter-label {
  font-weight: 500;
}

.visit-counter-value {
  color: var(--text-main);
  font-size: 1.05rem;
}

/* --- Cool Route Builder Game --- */
.game-section {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--border-light);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.game-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  border: none;
  padding: 0;
  color: var(--text-main);
}

.game-toggle-btn {
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  background: var(--card-bg);
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
}

.game-toggle-btn:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.game-content {
  padding: 0 16px 16px 16px;
}

.game-intro {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.game-stats-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 10px;
  padding: 6px 10px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Game grid */
.game-grid {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.game-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
  font-size: 1rem;
  border: 2px solid transparent;
}

.game-cell:hover {
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .game-cell {
    transition: none;
  }
  .game-cell:hover {
    transform: none;
  }
}

.cell-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Tile colours */
.tile-grass {
  background: #86efac;
}

.tile-shade {
  background: #a7f3d0;
}

.tile-concrete {
  background: #d1d5db;
}

.tile-asphalt {
  background: #6b7280;
  color: white;
}

.tile-metal {
  background: #9ca3af;
}

[data-theme="dark"] .tile-grass { background: #166534; }
[data-theme="dark"] .tile-shade { background: #065f46; }
[data-theme="dark"] .tile-concrete { background: #4b5563; }
[data-theme="dark"] .tile-asphalt { background: #374151; }
[data-theme="dark"] .tile-metal { background: #6b7280; }

/* Path highlight */
.cell-path {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 1px var(--input-focus);
}

/* Pawprint cell */
.cell-paw .cell-icon {
  font-size: 1.2rem;
}

.cell-collected {
  border-color: var(--safe);
  box-shadow: 0 0 0 1px var(--safe);
}

/* Game controls */
.game-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}

.game-btn {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: all 0.2s;
}

.game-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .game-btn {
  background: #e2e8f0;
  color: #0f172a;
}

.game-btn-secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-sub);
}

.game-btn-secondary:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

[data-theme="dark"] .game-btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-sub);
}

/* Game result */
.game-result {
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.game-result-win {
  background: var(--safe-bg);
  color: var(--safe);
  border: 1px solid var(--safe);
}

.game-result-lose {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* Game counter */
.game-counter {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.game-counter strong {
  color: var(--text-main);
}

.game-counter-today {
  color: var(--text-muted);
}

/* --- Responsive tweaks --- */
@media (max-width: 400px) {
  .container { padding: 1.5rem; }
  h1 { font-size: 1.3rem; }
  .top-controls { flex-wrap: wrap; gap: 8px; }
  .game-cell { border-radius: 4px; }
  .cell-icon { font-size: 0.9rem; }
  .game-stats-bar { font-size: 0.75rem; }
}
