
:root{
  --bg:#0b0d10;
  --panel:#101419;
  --muted:#8b93a3;
  --line:#1b212b;
  --text:#e8ecf1;
  --accent:#61dafb;
  --accent-2:#a7f3d0;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  background:var(--bg);
  color:var(--text);
}

/* Header / Nav */
.site-header{
  position:sticky; top:0; z-index:1000;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  background:rgba(11,13,16,.8); backdrop-filter:blur(8px);
}
.brand-link{ color:var(--text); text-decoration:none; font-weight:700; letter-spacing:.4px;}
.nav a{
  color:var(--text);
  text-decoration:none;
  margin-left:12px;
  padding:8px 10px;
  border-radius:10px;
  transition:.15s ease;
  border:1px solid transparent;
}
.nav a:hover{ border-color:var(--line); background:#0f1318;}
.nav a.active{ border-color:#213040; background:#0f1620; color:var(--accent); }
.menu-toggle{ display:none; background:none; border:none; font-size:22px; color:var(--text); }

/* Layout */
.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:0;
  min-height: calc(100vh - 60px - 42px);
}
.panel{
  background:var(--panel);
  border-right:1px solid var(--line);
  padding:16px;
  overflow:auto;
}
.panel-section{ margin-bottom:18px; }
.panel h2{ margin:0 0 8px 0; }
.panel h3{ margin:0 0 8px 0; }
label{ display:block; font-size:14px; margin-bottom:6px; color:var(--muted); }
input[type="text"]{
  width:100%; padding:10px 12px; border-radius:12px;
  border:1px solid var(--line); background:#0e1217; color:var(--text);
  outline:none;
}
input[type="text"]::placeholder{ color:#5f6b7e; }

.country-list{
  list-style:none; padding:0; margin:10px 0 0 0; max-height:200px; overflow:auto;
  border:1px solid var(--line); border-radius:12px;
}
.country-list li{ padding:10px 12px; border-bottom:1px solid var(--line); cursor:pointer; }
.country-list li:last-child{ border-bottom:none; }
.country-list li:hover{ background:#0f1620; }
.country-code{
  font-size:12px; color:var(--muted); margin-left:6px;
}
.selected-country{
  border:1px solid var(--line); border-radius:12px; padding:12px;
}
.selected-country .name{ font-weight:600; }
.muted{ color:var(--muted); }

.saved-codes{
  list-style:none; padding:0; margin:0;
  display:flex; flex-direction:column; gap:8px;
}
.saved-codes li{
  border:1px solid var(--line);
  border-radius:12px; padding:10px 12px;
  display:flex; align-items:center; justify-content:space-between;
}
.saved-codes button{
  border:1px solid var(--line);
  background:#0d131a; color:var(--text);
  border-radius:10px; padding:6px 10px; cursor:pointer;
}
.saved-codes button:hover{ background:#0f1620; }

/* Map */
.map-wrapper{ position:relative; }
#map{ width:100%; height: calc(100vh - 60px - 42px); } /* header + footer */
.tooltip{
  position:absolute; pointer-events:none;
  background:rgba(15,22,32,.9); color:var(--text);
  padding:6px 10px; border-radius:8px; font-size:12px;
  border:1px solid var(--line);
  transform:translate(-50%,-120%);
  display:none;
}

/* Footer */
.site-footer{
  height:42px;
  display:flex; align-items:center; justify-content:center;
  border-top:1px solid var(--line);
  background:#0b0f14; color:var(--muted);
}

/* Responsive */
@media (max-width: 900px){
  .layout{ grid-template-columns: 1fr; }
  .panel{ position:fixed; top:60px; bottom:42px; left:0; width:100%; transform:translateY(-120%); transition:.25s ease; z-index:900; }
  body.nav-open .panel{ transform:translateY(0%); }
  .menu-toggle{ display:block; }
  .nav{ display:none; }
}
