/* ============================================================
   SeismicRadar – style.css
   Dark space theme | Mobile-first | RTL support
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --bg-primary: #050d1a;
  --bg-secondary: #0a1628;
  --bg-card: rgba(10, 22, 40, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(0, 229, 255, 0.12);
  --border-dim: rgba(255, 255, 255, 0.07);

  --cyan: #00e5ff;
  --cyan-dim: rgba(0, 229, 255, 0.15);
  --cyan-glow: rgba(0, 229, 255, 0.4);
  --green: #00ff88;
  --yellow: #ffd600;
  --orange: #ff6d00;
  --red: #ff1744;
  --white: #ffffff;
  --text-primary: #e8f4fd;
  --text-secondary: #8eb8d4;
  --text-muted: #4a7a9b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-glow: 0 0 30px rgba(0, 229, 255, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-panel: 0 4px 16px rgba(0, 0, 0, 0.4);

  --font-display: "Inter", sans-serif;
  --font-mono: "Share Tech Mono", monospace;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-display);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(
      ellipse 80% 60% at 50% 0%,
      rgba(0, 229, 255, 0.06) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 40% at 80% 80%,
      rgba(0, 120, 255, 0.04) 0%,
      transparent 60%
    );
}

/* RTL & LTR body classes */
body[dir="ltr"] {
  direction: ltr;
  text-align: left;
}
body[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: #fff;
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
}
h2 {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Disclaimer Bar ---------- */
.disclaimer-bar {
  position: relative;
  z-index: 1000;
  background: linear-gradient(90deg, #ff1744, #ff6d00);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 12px rgba(255, 23, 68, 0.4);
  transition: var(--transition);
}
.disclaimer-bar.hidden {
  display: none;
}
.disclaimer-icon {
  font-size: 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(5, 13, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.6rem 0;
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.6));
}
.logo-main {
  display: block;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: -0.03em;
  text-shadow: 0 0 20px var(--cyan-glow);
}
.logo-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 23, 68, 0.15);
  border: 1px solid rgba(255, 23, 68, 0.4);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ff4d6a;
  letter-spacing: 0.1em;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff1744;
  animation: pulse-red 1.4s ease-in-out infinite;
}
@keyframes pulse-red {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.header-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
}
.clock-time {
  font-size: 0.9rem;
  color: var(--cyan);
  font-weight: 500;
  text-shadow: 0 0 10px var(--cyan-glow);
}
.clock-date {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.lang-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.05em;
}
.lang-toggle:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- Main Content ---------- */
.main-content {
  padding: 2rem 0;
}
body.has-disclaimer .main-content {
  padding-top: 1rem;
}

/* ---------- Hero: Gauge Section ---------- */
.hero-section {
  margin-bottom: 2rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-glow), var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 0%,
    rgba(0, 229, 255, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Gauge */
.gauge-wrapper {
  position: relative;
  width: min(260px, 90vw);
  flex-shrink: 0;
}

.gauge-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.3));
}

.gauge-track {
  stroke: rgba(255, 255, 255, 0.06);
}
.gauge-arc {
  stroke: var(--cyan);
  stroke-dasharray: 251.3;
  stroke-dashoffset: 251.3;
  transition:
    stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1),
    stroke 0.6s ease;
  filter: drop-shadow(0 0 8px currentColor);
}

.gauge-needle {
  stroke: #fff;
  transform-origin: 110px 140px;
  transform: rotate(-90deg);
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}
.gauge-pivot {
  fill: var(--cyan);
  filter: drop-shadow(0 0 6px var(--cyan));
}
.gauge-label-text {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-muted);
}

.gauge-center {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}
.gauge-value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 900;
  color: var(--cyan);
  line-height: 1;
  text-shadow: 0 0 30px var(--cyan-glow);
  transition:
    color 0.6s ease,
    text-shadow 0.6s ease;
}
.gauge-pct {
  font-size: clamp(1rem, 4vw, 1.4rem);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Score Info */
.score-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.score-title {
  color: var(--text-primary);
}
.risk-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1.2rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 2px solid currentColor;
  transition: var(--transition);
}
.risk-badge-low {
  color: var(--green);
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}
.risk-badge-medium {
  color: var(--yellow);
  background: rgba(255, 214, 0, 0.1);
  border-color: rgba(255, 214, 0, 0.3);
}
.risk-badge-high {
  color: var(--orange);
  background: rgba(255, 109, 0, 0.1);
  border-color: rgba(255, 109, 0, 0.3);
}
.risk-badge-critical {
  color: var(--red);
  background: rgba(255, 23, 68, 0.12);
  border-color: rgba(255, 23, 68, 0.4);
}

.score-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 380px;
}
.last-update {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.update-icon {
  font-size: 0.8rem;
}

/* ---------- Panels Grid ---------- */
.panels-section {
  margin-bottom: 2rem;
}

.panels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-panel);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
}
.panel:hover {
  border-color: rgba(0, 229, 255, 0.25);
  box-shadow: var(--shadow-glow), var(--shadow-panel);
  transform: translateY(-2px);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.panel-icon {
  font-size: 1.4rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}
.panel-title-group {
  flex: 1;
}
.panel-title { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 0.1rem; display: flex; align-items: center; gap: 0.4rem; }
.info-icon {
  font-size: 0.8rem;
  color: var(--cyan);
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
}
.info-icon:hover { opacity: 1; text-shadow: 0 0 10px var(--cyan-glow); transform: scale(1.1); }
.panel-weight {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.panel-score-badge {
  background: var(--cyan-dim);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
  min-width: 36px;
  text-align: center;
  transition: var(--transition);
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-dim);
}
.metric-row:last-of-type {
  border-bottom: none;
}
.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
}
.metric-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 600;
  text-align: end;
}
.metric-value.highlight {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
}

.panel-bar-wrap {
  margin-top: 0.75rem;
}
.panel-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.panel-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  border-radius: 2px;
  transition:
    width 1s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.6s ease;
}

/* ---------- Map + Table Section ---------- */
.map-table-section {
  margin-bottom: 2rem;
}

.map-table-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.map-card,
.table-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(255, 255, 255, 0.02);
}
.card-icon {
  font-size: 1.1rem;
}
.card-title {
  font-size: 0.95rem;
  flex: 1;
}
.map-radius-note {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.quake-count-badge {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--cyan);
}

/* Map */
.quake-map {
  height: 320px;
  background: #0a1628;
}

/* Override Leaflet for dark theme */
.leaflet-container {
  background: #0a1628;
}
.leaflet-tile-pane {
  filter: brightness(0.65) saturate(0.5);
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-dim);
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.grey {
  background: #90a4ae;
}
.dot.yellow {
  background: var(--yellow);
}
.dot.orange {
  background: var(--orange);
}
.dot.red {
  background: var(--red);
}

/* Table */
.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 380px;
}

.quake-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 380px;
}
.quake-table thead th {
  position: sticky;
  top: 0;
  background: rgba(5, 13, 26, 0.95);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border-dim);
  text-align: start;
}
.quake-table tbody tr {
  animation: rowFadeIn 0.3s ease forwards;
  border-bottom: 1px solid var(--border-dim);
  transition: background 0.2s ease;
}
.quake-table tbody tr:hover {
  background: rgba(0, 229, 255, 0.05);
}
.quake-table tbody td {
  padding: 0.55rem 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  vertical-align: middle;
}

@keyframes rowFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mag-badge {
  display: inline-block;
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
  font-weight: 700;
  font-size: 0.75rem;
  min-width: 32px;
  text-align: center;
}
.mag-low {
  background: rgba(144, 164, 174, 0.2);
  color: #90a4ae;
}
.mag-medium {
  background: rgba(255, 214, 0, 0.15);
  color: var(--yellow);
}
.mag-high {
  background: rgba(255, 109, 0, 0.15);
  color: var(--orange);
}
.mag-major {
  background: rgba(255, 23, 68, 0.15);
  color: var(--red);
}

.loading-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--cyan-dim);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Sources Section ---------- */
.sources-section {
  margin-bottom: 2rem;
}
.sources-header {
  margin-bottom: 0.75rem;
}
.sources-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sources-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.source-chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
  text-decoration: none;
}

/* ---------- Site Footer ---------- */
.site-footer {
  background: rgba(5, 13, 26, 0.98);
  border-top: 1px solid var(--border-dim);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h3 {
  color: var(--cyan);
  font-size: 1rem;
  margin-bottom: 0.6rem;
}
.footer-legal-full p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.app-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dim);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.app-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); text-decoration: none; }
.app-icon { font-size: 1.2rem; }
.footer-guidelines ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-guidelines li {
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
  background: rgba(255,109,0,0.1);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--orange);
}
.footer-guidelines li strong { color: var(--orange); }

.footer-legal {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.footer-version {
  font-size: 0.65rem;
  color: rgba(74,122,155,0.6);
  font-family: var(--font-mono);
  text-align: center;
  border-top: 1px solid var(--border-dim);
  padding-top: 1rem;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.hidden {
  display: none;
}

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

.modal-box {
  background: linear-gradient(135deg, #0d1f3c 0%, #0a1628 100%);
  border: 1px solid rgba(255, 100, 0, 0.4);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  max-width: 520px;
  width: 100%;
  box-shadow:
    0 0 60px rgba(255, 100, 0, 0.15),
    var(--shadow-card);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.modal-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6d00, #ff1744, #ff6d00);
}

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

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.modal-icon {
  font-size: 1.8rem;
}
.modal-header h2 {
  color: var(--orange);
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  line-height: 1.7;
}
.modal-body strong {
  color: var(--text-primary);
}

.modal-highlight {
  background: rgba(255, 23, 68, 0.08);
  border: 1px solid rgba(255, 23, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem !important;
  font-size: 0.82rem !important;
  color: #ff8a99 !important;
}

.modal-btn {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #ff6d00, #ff1744);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(255, 23, 68, 0.3);
}
.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 23, 68, 0.45);
}
.modal-btn:active {
  transform: translateY(0);
}

.info-modal-box { max-width: 450px; border-color: var(--cyan); background: var(--bg-card); box-shadow: 0 0 30px rgba(0,229,255,0.15); }
.info-modal-box .modal-header h2 { color: var(--cyan); }
.info-modal-box .modal-btn { background: var(--cyan); color: #000; box-shadow: none; margin-top: 1rem; }
.info-modal-box .modal-btn:hover { background: #00b3cc; }

/* ---------- Gauge pulse animation for high risk ---------- */
@keyframes gauge-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 16px rgba(255, 23, 68, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(255, 23, 68, 0.9));
  }
}
.gauge-wrapper.pulse {
  animation: gauge-pulse 2s ease-in-out infinite;
}

/* ---------- Responsive Breakpoints ---------- */

/* Small tablets: 600px+ */
@media (min-width: 600px) {
  .panels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-inner {
    flex-direction: row;
    align-items: center;
    padding: 2.5rem;
  }
  .score-info {
    text-align: start;
    align-items: flex-start;
  }
}

/* Tablets: 768px+ */
@media (min-width: 768px) {
  .map-table-grid {
    grid-template-columns: 1fr 1fr;
  }
  .quake-map {
    height: 380px;
  }
  .header-inner {
    gap: 2rem;
  }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; text-align: start; }
  .footer-guidelines li { border-right: none; border-left: 3px solid var(--orange); }
  [dir="rtl"] .footer-guidelines li { border-left: none; border-right: 3px solid var(--orange); }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  .panels-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .main-content {
    padding: 2.5rem 0;
  }
  .hero-inner {
    padding: 3rem;
    gap: 3rem;
  }
  .gauge-wrapper {
    width: 300px;
  }
}

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
  .container {
    padding: 0 2rem;
  }
}

/* ---- LTR overrides ---- */
[dir="ltr"] .header-clock {
  align-items: flex-start;
}
[dir="ltr"] .score-info {
  text-align: start;
  align-items: flex-start;
}
[dir="ltr"] .metric-value {
  text-align: start;
}
