:root{
  /* lighter dark theme */
  --bg:#0f172a;        /* slate-900 */
  --card:#111c33;      /* slightly lighter than bg */
  --text:#f8fafc;      /* slate-50 */
  --muted:#aab6c5;     /* keep */
  --border:#2a3750;    /* brighter border */
  --r:18px;

  /* depth */
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-soft: 0 8px 18px rgba(0,0,0,0.25);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:radial-gradient(1200px 600px at 10% 0%, rgba(255,255,255,0.06), transparent 60%),
             radial-gradient(900px 500px at 90% 10%, rgba(255,255,255,0.04), transparent 55%),
             var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}

.wrap{
  width:min(100% - 2rem, 900px);
  margin:0 auto;
  padding:18px 0;
}

.card{
  border:1px solid rgba(255,255,255,0.08);
  background:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-radius:var(--r);
  padding:16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.row{display:flex;gap:12px;flex-wrap:wrap}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:12px 20px;
  border-radius:999px;

  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:var(--text);

  cursor:pointer;
  text-decoration:none; /* important for <a> */

  font-family:inherit;
  font-size:16px;
  font-weight:700;
  letter-spacing:-0.01em;

  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.06);
}

.btn:active{
  transform: translateY(0px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.22);
}

.btn.primary{
  background:#ffffff;
  color:#0b0d10;
  border:none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* Inputs */
input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.03);
  color:var(--text);
  outline:none;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18) inset;
  transition: border-color 160ms ease, background 160ms ease;
}

input:focus{
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.05);
}

h1{margin:0 0 10px;font-size:28px; letter-spacing:-0.02em;}
p{margin:6px 0;color:var(--muted)}

.grid{display:grid;gap:12px}

@media (min-width: 900px){
  h1{font-size:40px}
}

.small{font-size:13px;color:var(--muted)}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

/* Modal */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  display:none;
  align-items:flex-start;     /* change this */
  justify-content:center;
  padding-top:8vh;           /* push it down from top */
  padding-bottom:env(safe-area-inset-bottom);
  padding-left:18px;
  padding-right:18px;
  z-index:9999;
}

.modal{
  width:min(520px, 100%);
  border-radius: 18px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.92);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  padding:16px;
}

.modal h2{
  margin:0 0 6px;
  font-size: 18px;
}

.modal .small{
  margin-bottom: 12px;
}

.modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
}

.modal input{
  font-size: 18px;
  padding: 14px 12px;
}

/* show */
.modal-overlay.show{
  display:flex;
}

