/* BoxMines - farverne er taget fra logoet: himmel, græs, guld og sten. */

:root {
  --night: #0b1220;
  --night-2: #0f1829;
  --panel: #131d31;
  --panel-2: #1a2640;
  --line: #263352;
  --text: #eef3fb;
  --muted: #93a2bd;

  --sky: #44aefc;
  --grass: #62c232;
  --grass-dark: #3d8a19;
  --dirt: #7a4a2a;
  --gold: #ffc233;
  --gold-dark: #d98a00;
  --stone: #9aa3b2;
  --lava: #ff7a2f;
  --blurple: #5865f2;
  --blurple-dark: #3c45c7;

  --medal-1: #ffc233;
  --medal-2: #cfd8e3;
  --medal-3: #e0894a;

  --radius: 14px;
  --display: "Lilita One", "Arial Black", system-ui, sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.55 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 50% -120px, rgba(68, 174, 252, 0.18), transparent 70%),
    var(--night);
}

a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 56px; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

.kicker { margin: 0 0 6px; color: var(--grass); font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; }

/* ---------- top-menu ---------- */

.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 1.45rem; }
.brand:hover { text-decoration: none; }
.brand img { display: block; }
.brand span { background: linear-gradient(180deg, #fff 0 45%, var(--gold) 55% 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 700; }
nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
nav a.active { color: var(--text); background: var(--panel-2); }
.account { margin-left: auto; }
.me { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.me:hover, .me.active { text-decoration: none; border-color: var(--grass); }
.me img { border-radius: 50%; }

/* ---------- knapper (klodsede, som i spillet) ---------- */

.btn {
  --c: var(--grass); --d: var(--grass-dark); --t: #0c1f02;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--c); color: var(--t);
  border: 2px solid var(--d); border-radius: 8px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  padding: 10px 18px 12px; font: inherit; font-weight: 800; cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22); }
.btn.gold { --c: var(--gold); --d: var(--gold-dark); --t: #2b1900; }
.btn.discord { --c: var(--blurple); --d: var(--blurple-dark); --t: #fff; }
.btn.ghost { --c: var(--panel-2); --d: var(--line); --t: var(--text); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25); }
.btn.small { padding: 7px 14px 9px; font-size: 0.95rem; }
.btn.big { padding: 14px 26px 16px; font-size: 1.1rem; }
.btn .dc { width: 20px; height: 20px; }
.btn:focus-visible, nav a:focus-visible, .tab:focus-visible, .ip:focus-visible, .me:focus-visible {
  outline: 3px solid var(--sky); outline-offset: 2px;
}

/* ---------- forside ---------- */

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 40px; align-items: center;
  padding: 36px 40px; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(19, 29, 49, 0.92), rgba(15, 24, 41, 0.78));
}
/* Logoet sløret bag det hele, så farverne går igen. */
.hero::before {
  content: ""; position: absolute; inset: -40px; z-index: -1;
  background: url(/logo.webp) center / cover;
  filter: blur(48px) saturate(1.3); opacity: 0.35;
}
.hero-art img {
  /* drop-shadow følger logoets egne runde hjørner - box-shadow gør ikke */
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
.lead { color: #c9d5ea; font-size: 1.1rem; margin: 0 0 22px; max-width: 520px; }
.join { margin-bottom: 14px; }
.ip {
  display: inline-flex; align-items: center; gap: 14px; cursor: pointer;
  background: rgba(0, 0, 0, 0.35); color: var(--text); border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 10px; padding: 10px 12px 10px 16px; font: inherit; font-size: 1.15rem; max-width: 100%;
}
.ip:hover { border-color: var(--gold); }
.ip .mono { font-weight: 700; overflow-wrap: anywhere; text-align: left; }
.ip em { font-style: normal; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--gold); color: #2b1900; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.ip.done { border-color: var(--grass); }
.ip.done em { background: var(--grass); color: #0c1f02; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); margin: 16px 0 0; }
.status strong { color: var(--text); }

.dot { width: 10px; height: 10px; border-radius: 50%; background: #5b6780; display: inline-block; flex: none; }
.dot.on { background: var(--grass); box-shadow: 0 0 0 4px rgba(98, 194, 50, 0.2); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(98, 194, 50, 0.06); } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 44px 0 14px; }
.section-head h1, .section-head h2 { margin: 0; }
main > .section-head:first-child { margin-top: 0; }

/* ---------- kort ---------- */

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 20px 18px; min-width: 0; overflow: hidden;
}
/* Græskant i toppen - som en græsblok. */
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--grass) 0 14px, var(--grass-dark) 14px 18px, var(--grass) 18px 26px, #7fd64b 26px 30px);
}
.card.wide { max-width: 820px; margin: 0 auto; }
.card.narrow { max-width: 540px; margin: 0 auto; }
.card h3, .board-title { display: flex; align-items: center; gap: 10px; }
.ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--panel-2); font-size: 1.1rem; }

.rows { list-style: none; margin: 4px 0 0; padding: 0; }
.row { display: grid; grid-template-columns: 30px 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; }
.row + .row { border-top: 1px solid rgba(38, 51, 82, 0.7); }
.row:hover { background: var(--panel-2); }
.row img { border-radius: 5px; image-rendering: pixelated; }
.pos { color: var(--muted); font-weight: 800; text-align: center; font-family: var(--display); font-size: 1.1rem; }
.row.p1 .pos { color: var(--medal-1); }
.row.p2 .pos { color: var(--medal-2); }
.row.p3 .pos { color: var(--medal-3); }
.row.p1 { background: linear-gradient(90deg, rgba(255, 194, 51, 0.1), transparent 70%); }
.name { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.val { font-family: var(--mono); font-weight: 800; color: var(--gold); }
.more { display: inline-block; margin-top: 12px; font-weight: 800; color: var(--grass); }
.empty { color: var(--muted); margin: 10px 0; }

/* ---------- toplister ---------- */

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tab { padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.tab:hover { text-decoration: none; border-color: var(--grass); }
.tab.active { background: var(--grass); border-color: var(--grass-dark); color: #0c1f02; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; margin: 18px 0 8px; }
.spot { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); min-width: 0; position: relative; }
.spot:hover { text-decoration: none; }
.spot img { border-radius: 8px; image-rendering: pixelated; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.spot .crown { font-size: 1.6rem; line-height: 1; margin-bottom: -4px; }
.pname { font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pval { font-family: var(--mono); font-weight: 800; color: var(--gold); }
.block {
  width: 100%; display: grid; place-items: center; margin-top: 6px;
  font-family: var(--display); font-size: 2rem; color: rgba(0, 0, 0, 0.45);
  border-radius: 8px 8px 0 0; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.2), inset 0 3px 0 rgba(255, 255, 255, 0.3);
}
.p1 .block { height: 110px; background: var(--medal-1); }
.p2 .block { height: 80px; background: var(--medal-2); }
.p3 .block { height: 60px; background: var(--medal-3); }
.spot.empty .block { opacity: 0.25; }

/* ---------- profil ---------- */

.profile { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; align-items: start; }
.skin { display: grid; place-items: center; background: linear-gradient(180deg, rgba(68, 174, 252, 0.25), rgba(98, 194, 50, 0.15)); border-radius: 12px; padding: 12px 6px; }
.skin img { image-rendering: pixelated; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4)); }
.profile h1 { margin: 0; overflow-wrap: anywhere; }
.profile .status { margin: 8px 0 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 0 0 16px; }
.stats div { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.stats dd { margin: 2px 0 0; font-size: 1.45rem; font-family: var(--display); }
.places { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; }
.places a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255, 194, 51, 0.12); color: var(--gold); font-weight: 800; border: 1px solid rgba(255, 194, 51, 0.3); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); color: var(--text); font-size: 0.85rem; font-weight: 700; border: 1px solid var(--line); }
.tag.ok { color: var(--grass); }
.tag.gold { color: var(--gold); }
.tag img { border-radius: 50%; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.row-actions.center { justify-content: center; }
.row-actions form { margin: 0; }

/* ---------- login ---------- */

.login { padding-top: 30px; }
.login-logo { margin-bottom: 8px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4)); }
.discord-avatar { border-radius: 50%; border: 4px solid var(--blurple); margin-bottom: 8px; }
.login .btn.discord { margin: 8px 0 4px; }
.first-time { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; }
.first-time h2 { font-size: 1.3rem; }
.steps { list-style: none; padding: 0; margin: 12px 0; text-align: left; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--panel-2); border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); }
.num { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--gold); color: #2b1900; font-family: var(--display); }
.alert { background: rgba(255, 122, 47, 0.12); border: 1px solid rgba(255, 122, 47, 0.4); color: #ffd2b8; border-radius: 10px; padding: 10px 14px; text-align: left; }
.alert.info { background: rgba(88, 101, 242, 0.14); border-color: rgba(88, 101, 242, 0.45); color: #d7dbff; }

/* ---------- bund ---------- */

.foot { border-top: 1px solid var(--line); background: var(--night-2); color: var(--muted); }
.foot-in { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 28px; }
.foot strong { color: var(--text); }
.foot-links { display: flex; gap: 18px; }

/* ---------- mobil ---------- */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 24px 18px 28px; gap: 18px; }
  .hero-art { max-width: 240px; margin: 0 auto; }
  .lead { margin-left: auto; margin-right: auto; }
  .actions, .status { justify-content: center; }
  .profile { grid-template-columns: 1fr; }
  .skin { max-width: 140px; margin: 0 auto; }
  .profile-main { text-align: center; }
  .profile .status, .places, .row-actions { justify-content: center; }
  nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
  .row { grid-template-columns: 24px 28px minmax(0, 1fr) auto; gap: 8px; }
  .row img { width: 28px; height: 28px; }
  .podium { gap: 6px; }
  .spot img { width: 56px; height: 56px; }
  .ip { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art img, .dot.on { animation: none; }
  .btn { transition: none; }
}
