:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel2: #1c2230;
  --border: #2a313c;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #2f81f7;
  --maxw: 1100px;
}
/* Light theme overrides */
html[data-theme="light"] {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel2: #eef1f5;
  --border: #d6dbe2;
  --text: #161b22;
  --muted: #5a6472;
  --accent: #1f6feb;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
}
.nav {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 18px; flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 18px; color: var(--text); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0; }
.last-updated { color: var(--muted); font-size: 13px; margin: -4px 0 16px; display: flex; align-items: center; gap: 6px; }
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 22px; line-height: 1; padding: 5px 11px; cursor: pointer; }

/* Mobile hamburger nav (active μόνο σε header με .has-toggle) */
@media (max-width: 820px) {
  .has-toggle .nav-toggle { display: block; }
  .has-toggle .nav-links {
    display: none; flex-basis: 100%; flex-direction: column; gap: 0;
    margin: 8px -18px -12px; padding: 0;
  }
  .has-toggle .nav-links.open { display: flex; }
  .has-toggle .nav-links a {
    padding: 14px 18px; font-size: 16px; border-top: 1px solid var(--border); width: 100%;
  }
}

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 24px 18px; }
.content { max-width: 760px; }
.content h1 { font-size: 30px; margin: 6px 0 14px; }
.content h2 { font-size: 22px; margin: 30px 0 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.content h3 { font-size: 18px; margin: 22px 0 8px; }
.content p, .content li { color: #c9d1d9; }
.content ul, .content ol { padding-left: 22px; }
.lead { font-size: 18px; color: var(--text); }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 20px; margin: 16px 0;
}
.muted { color: var(--muted); }
.tag { display:inline-block; background: var(--panel2); border:1px solid var(--border);
  border-radius: 20px; padding: 3px 12px; font-size: 13px; color: var(--muted); margin: 2px; }
.btn {
  display:inline-block; background: var(--accent); color:#fff;
  padding: 9px 18px; border-radius: 8px; font-weight: 600; margin-top: 8px;
}
.btn:hover { text-decoration: none; opacity: .9; }
table { width:100%; border-collapse: collapse; margin: 14px 0; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; font-size: 14px; }
th { background: var(--panel); }

/* ---------- Ad slots ---------- */
.ad-slot {
  margin: 22px auto; text-align: center; min-height: 90px;
  background: repeating-linear-gradient(45deg,#12161d,#12161d 10px,#10141a 10px,#10141a 20px);
  border: 1px dashed var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #565d68; font-size: 13px; overflow: hidden;
}
.ad-slot.in-article { max-width: 728px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--panel); border-top: 1px solid var(--border);
  margin-top: 40px; color: var(--muted); font-size: 14px;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 24px 18px;
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Cookie consent ---------- */
#cookie-consent {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5000;
  background: var(--panel2); border-top: 1px solid var(--border);
  padding: 16px 18px; display: none;
}
#cookie-consent.show { display: block; }
.cc-inner { max-width: var(--maxw); margin: 0 auto; display: flex;
  gap: 16px; align-items: center; flex-wrap: wrap; }
.cc-text { flex: 1; min-width: 260px; font-size: 14px; color: #c9d1d9; }
.cc-buttons { display: flex; gap: 10px; }
.cc-buttons button {
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 16px;
  font-size: 14px; cursor: pointer; font-weight: 600;
}
.cc-accept { background: var(--accent); color: #fff; border-color: var(--accent); }
.cc-reject { background: transparent; color: var(--text); }

/* ---------- Hero / "Έγινε σεισμός;" ---------- */
.hero { background: linear-gradient(180deg,#11161e,#0e1116); border-bottom: 1px solid var(--border); }
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 18px; }
.hero-q { font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin: 0; }
.hero-h1 { font-size: 32px; margin: 6px 0 4px; line-height: 1.15; }
.hero-sub { font-size: 16px; color: var(--muted); margin: 0 0 14px; }
@media (max-width: 760px) { .hero-h1 { font-size: 24px; } .hero-sub { font-size: 14px; } }
.latest-card { display: flex; align-items: center; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.latest-mag { width: 78px; height: 78px; border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #000; font-weight: 800; flex-shrink: 0; }
.latest-mag .v { font-size: 30px; line-height: 1; }
.latest-mag .u { font-size: 10px; font-weight: 700; opacity: .7; }
.latest-info { min-width: 0; }
.latest-place { font-size: 22px; font-weight: 700; }
.latest-meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.latest-meta b { color: var(--text); }
.latest-ago { display:inline-block; background: var(--panel2); border:1px solid var(--border);
  border-radius: 20px; padding: 2px 12px; font-size: 13px; margin-top: 6px; }

/* ---------- SEO content section (homepage) ---------- */
.seo-section { background: var(--panel); border-top: 1px solid var(--border); }
.seo-inner { max-width: var(--maxw); margin: 0 auto; padding: 30px 18px; }
.seo-inner h2 { font-size: 22px; margin: 24px 0 10px; }
.seo-inner h2:first-child { margin-top: 0; }
.seo-inner p { color: #c9d1d9; max-width: 820px; }
.city-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.city-links a { background: var(--panel2); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 14px; color: var(--text); }
.city-links a:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Map page ---------- */
.map-wrap { display: flex; min-height: 0; height: 560px; }
#map { flex: 1; min-width: 0; }
#sidebar { width: 340px; background: var(--panel); border-left: 1px solid var(--border);
  overflow-y: auto; flex-shrink: 0; }
.map-toolbar { background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 8px 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.status { font-size: 13px; color: var(--muted); }
.status .dot { display:inline-block; width:9px; height:9px; border-radius:50%;
  background:#3fb950; margin-right:6px; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.map-toolbar select {
  background:#0d1117; color:var(--text); border:1px solid var(--border);
  border-radius:6px; padding:5px 9px; font-size:13px; cursor:pointer;
}
.map-toolbar button {
  background:#0d1117; color:var(--text); border:1px solid var(--border);
  border-radius:6px; padding:5px 9px; font-size:13px; cursor:pointer;
}
.quake { padding:10px 14px; border-bottom:1px solid var(--border); cursor:pointer;
  display:flex; gap:12px; align-items:center; }
.quake:hover { background: var(--panel2); }
.mag { flex-shrink:0; width:44px; height:44px; border-radius:8px; display:flex;
  align-items:center; justify-content:center; font-weight:700; font-size:16px; color:#000; }
.quake .place { font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.quake .meta { font-size:12px; color:var(--muted); margin-top:2px; }
.legend { background:var(--panel); padding:8px 10px; border-radius:6px; font-size:12px;
  line-height:1.6; border:1px solid var(--border); }
.legend i { display:inline-block; width:12px; height:12px; border-radius:50%; margin-right:6px; }

@media (max-width: 760px) {
  .map-wrap { flex-direction: column; height: auto; }
  #map { height: 56vh; min-height: 320px; }
  #sidebar { width: 100%; height: 46vh; border-left: none; border-top: 1px solid var(--border); }
  .nav-links { gap: 12px; }

  /* Hero πιο συμπαγές σε κινητά */
  .hero-inner { padding: 14px; }
  .latest-place { font-size: 19px; }
  .latest-mag { width: 64px; height: 64px; }
  .latest-mag .v { font-size: 25px; }

  /* Toolbar: τα φίλτρα σε σειρά που αναδιπλώνεται */
  .map-toolbar { padding: 8px 14px; gap: 10px; }
  .map-toolbar label { margin-left: 0 !important; }
  .map-toolbar .status { flex-basis: 100%; }

  .content h1 { font-size: 24px; }
  .seo-inner { padding: 22px 14px; }
  .seo-inner h2 { font-size: 19px; }
  table { font-size: 13px; }
}

@media (max-width: 420px) {
  .latest-card { gap: 12px; }
  .map-toolbar select, .map-toolbar button { padding: 6px 8px; }
}

/* ---------- Map markers (divIcon) ---------- */
.q-marker span { display:block; border-radius:50%; border:1px solid rgba(0,0,0,.55);
  box-sizing:border-box; transition: box-shadow .15s, transform .15s; }
.q-marker.q-hi span { box-shadow:0 0 0 4px #fff; transform:scale(1.25); }
.pulse-marker span { display:block; width:22px; height:22px; border-radius:50%;
  background:rgba(215,48,39,.55); animation:pulse-ring 1.6s ease-out infinite; }
@keyframes pulse-ring { 0%{transform:scale(.4);opacity:.85} 100%{transform:scale(2.6);opacity:0} }
.me-marker span { display:block; width:18px; height:18px; border-radius:50%;
  background:#2f81f7; border:3px solid #fff; box-shadow:0 0 0 2px #2f81f7; }

/* "Σεισμοί κοντά μου" banner */
#nearme-result { position:fixed; left:50%; transform:translateX(-50%); bottom:18px; z-index:6000;
  display:none; max-width:92%; background:var(--panel); color:var(--text);
  border:1px solid var(--border); border-left:5px solid var(--accent); border-radius:10px;
  padding:12px 16px; font-size:14px; box-shadow:0 8px 30px rgba(0,0,0,.4); cursor:pointer;
  font-family:system-ui,sans-serif; }

/* Trust badges (κάτω από το hero) */
.trust-badges { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.trust-badges span { display:inline-flex; align-items:center; gap:6px; font-size:12.5px;
  color:var(--muted); background:var(--panel); border:1px solid var(--border);
  border-radius:20px; padding:5px 12px; }
.trust-badges span b { color:var(--text); font-weight:600; }

/* Footer trust line */
.footer-trust { max-width:var(--maxw); margin:0 auto; padding:14px 18px 0; font-size:13px;
  color:var(--muted); line-height:1.6; }
.footer-trust a { color:var(--muted); text-decoration:underline; }
.footer-trust a:hover { color:var(--text); }

/* Share bar */
.share-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:26px 0 6px;
  padding-top:18px; border-top:1px solid var(--border); }
.share-bar .share-label { color:var(--muted); font-size:14px; font-weight:600; }
.share-bar a, .share-bar button { display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:50%; border:1px solid var(--border); background:var(--panel);
  color:var(--text); font-size:16px; cursor:pointer; text-decoration:none; transition:.15s; }
.share-bar a:hover, .share-bar button:hover { border-color:var(--accent); transform:translateY(-2px); text-decoration:none; }
.share-bar .copied { color:#3fb950; font-size:13px; }

/* Theme toggle */
.theme-toggle { background:none; border:1px solid var(--border); border-radius:8px;
  color:var(--text); font-size:15px; line-height:1; padding:5px 9px; cursor:pointer; }
@media (max-width:820px){ .has-toggle .theme-toggle { order:3; } }
