@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/pixelify-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/pixelify-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0d0b14;
  --stone: #1c1924;       /* panou */
  --stone-hi: #3b3649;    /* muchie luminată */
  --stone-lo: #08070c;    /* muchie umbrită */
  --slot: #121019;        /* slot de inventar */
  --line: #2c2838;
  --text: #f1eef8;
  --muted: #a39db5;
  --pri: #3d8bff;         /* safir */
  --pri-hi: #7fb4ff;
  --pri-lo: #1f4fa6;
  --acc: #b8a4ff;
  --heart: #ff2f45;
  --heart-lo: #9c1224;
  --ok: #55ff7f;
  --bad: #ff5566;
  --gold: #ffd83d;
  --px: "Pixelify Sans", ui-monospace, "Courier New", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* pământ întunecat din blocuri + lumină roșie de sus */
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 50% -80px, rgba(255, 47, 69, .20), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .022) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 2px, transparent 2px),
    linear-gradient(45deg, rgba(0, 0, 0, .22) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, .22) 75%),
    linear-gradient(45deg, rgba(0, 0, 0, .22) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, .22) 75%);
  background-size: auto, 32px 32px, 32px 32px, 64px 64px, 64px 64px;
  background-position: 0 0, 0 0, 0 0, 0 0, 32px 32px;
  background-attachment: fixed, scroll, scroll, scroll, scroll;
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font: 500 1em var(--px);
  background: #000;
  color: var(--gold);
  padding: .05em .4em;
  border: 2px solid var(--line);
  overflow-wrap: anywhere;
}
h1, h2, .brand, nav a, .btn, th, .rk, .val, .tile strong, .pill, .eyebrow, .tag { font-family: var(--px); }
h1, h2 { line-height: 1.15; margin: 0 0 .5em; font-weight: 500; letter-spacing: .03em; text-shadow: 3px 3px 0 #000; }
h2 { font-size: 1.35rem; letter-spacing: .02em; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.sub { margin: -.2em 0 1.2em; }
.pt { font-size: 2.2rem; margin-top: .2em; }
.center { text-align: center; }

/* panou în stil GUI de Minecraft: ramă neagră + muchii luminate/umbrite */
.card, .tile {
  background: var(--stone);
  border: 3px solid #000;
  box-shadow: inset 3px 3px 0 var(--stone-hi), inset -3px -3px 0 var(--stone-lo), 6px 6px 0 rgba(0, 0, 0, .45);
}

/* header */
.top { position: sticky; top: 0; z-index: 5; background: #15121c; border-bottom: 3px solid #000; box-shadow: inset 0 -3px 0 var(--stone-lo), inset 0 3px 0 var(--stone-hi); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; font-size: 1.35rem; text-shadow: 2px 2px 0 #000; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 27px; image-rendering: pixelated; }
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--muted); padding: 6px 12px; font-size: 1.1rem; font-weight: 500; border: 2px solid transparent; }
nav a:hover { color: #fff; text-decoration: none; border-color: var(--line); background: var(--slot); }
nav a.on { color: var(--gold); border-color: #000; background: var(--slot); box-shadow: inset 2px 2px 0 var(--stone-lo), inset -2px -2px 0 var(--stone-hi); }

/* butoane ca în meniul jocului */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.12rem; font-weight: 500; line-height: 1.2; color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .7);
  background: var(--pri);
  border: 3px solid #000;
  box-shadow: inset 3px 3px 0 var(--pri-hi), inset -3px -3px 0 var(--pri-lo);
  padding: 11px 20px; cursor: pointer; border-radius: 0;
}
.btn:hover { background: #5a9dff; color: #fff; text-decoration: none; outline: 2px solid #fff; outline-offset: -5px; }
.btn:active { box-shadow: inset 3px 3px 0 var(--pri-lo), inset -3px -3px 0 var(--pri-hi); transform: translateY(2px); }
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.ghost { background: #6b6578; box-shadow: inset 3px 3px 0 #a9a3b8, inset -3px -3px 0 #45404f; }
.btn.ghost:hover { background: #7d778b; }
.btn.red { background: var(--heart); box-shadow: inset 3px 3px 0 #ff8f9b, inset -3px -3px 0 var(--heart-lo); }
.btn.red:hover { background: #ff4d60; }
nav a.btn.sm { padding: 6px 14px; color: #fff; margin-left: 6px; font-size: 1.05rem; border: 3px solid #000; }
.btn.wide { width: 100%; }

/* hero */
.hero { text-align: center; padding: 34px 0 30px; }
.eyebrow { color: var(--acc); text-transform: uppercase; letter-spacing: .2em; font-size: 1rem; font-weight: 500; margin: 0 0 8px; text-shadow: 2px 2px 0 #000; }
.hero h1 { font-size: clamp(2.6rem, 11vw, 5.2rem); margin: 0 0 10px; color: #fff; text-shadow: 4px 4px 0 #000, 8px 8px 0 rgba(255, 47, 69, .55); letter-spacing: .01em; }
.hero h1 em { font-style: normal; color: var(--pri); }
.hearts-bar { display: flex; justify-content: center; gap: 4px; margin: 0 auto 18px; }
.hearts-bar img { width: clamp(22px, 6.4vw, 36px); height: auto; aspect-ratio: 11 / 10; image-rendering: pixelated; animation: beat 1.6s steps(2, end) infinite; }
.hearts-bar img:nth-child(2n) { animation-delay: .2s; }
.hearts-bar img:nth-child(3n) { animation-delay: .4s; }
@keyframes beat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.lead { color: #d9d4e6; max-width: 560px; margin: 0 auto 20px; font-size: 1.08rem; }

/* tooltip de item din Minecraft */
.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; font-size: 1.08rem; font-weight: 500;
  background: #120312; border: 3px solid #2a0b5c; box-shadow: 0 0 0 3px #120312; text-shadow: 2px 2px 0 #000;
}
.pill.ok { color: var(--ok); }
.pill.bad { color: var(--bad); }
.dot { display: inline-block; width: 10px; height: 10px; background: var(--bad); flex: none; box-shadow: 2px 2px 0 #000; }
.dot.on { background: var(--ok); }
.ip { display: flex; justify-content: center; align-items: stretch; gap: 10px; margin: 24px auto 14px; flex-wrap: wrap; }
.ip code { font-size: 1.45rem; padding: 8px 20px; border: 3px solid #a39db5; background: #000; color: #fff; display: flex; align-items: center; }
.cta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* carduri și sloturi */
.card { padding: 22px; margin-bottom: 22px; }
.grid { display: grid; gap: 22px; }
.grid .card { margin-bottom: 0; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-bottom: 22px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { padding: 14px 16px; }
.tile span { display: block; color: var(--muted); font-size: .84rem; margin-bottom: 2px; }
.tile strong { font-size: 1.7rem; font-weight: 500; text-shadow: 2px 2px 0 #000; font-variant-numeric: tabular-nums; }
.tile.hearts strong, td.hearts { color: var(--heart); }
.tile.hearts strong::after, td.hearts::after, .val.h::after {
  content: ""; display: inline-block; width: .95em; height: .86em; margin-left: .3em; vertical-align: -.06em;
  background: url(heart.svg) center / contain no-repeat; image-rendering: pixelated;
}

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; min-height: 36px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center;
  font: 500 1.2rem var(--px); color: #fff; background: var(--slot); border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--stone-lo), inset -2px -2px 0 var(--stone-hi);
}
.plain { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }

/* clasamente */
.board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board li {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; background: var(--slot); border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--stone-lo), inset -2px -2px 0 var(--stone-hi);
}
.rk { width: 30px; height: 30px; display: grid; place-items: center; background: #2c2838; color: var(--muted); font-size: 1.05rem; font-weight: 500; flex: none; border: 2px solid #000; }
.rk1 { background: var(--gold); color: #3a2a00; }
.rk2 { background: #d6dbe6; color: #24304a; }
.rk3 { background: #d98a4e; color: #3a1e08; }
.val { margin-left: auto; font-weight: 500; font-size: 1.15rem; white-space: nowrap; text-shadow: 2px 2px 0 #000; font-variant-numeric: tabular-nums; }
.val.h { color: var(--heart); }
.val small { color: var(--muted); font-weight: 500; font-size: .85em; }
.pl { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 500; min-width: 0; }
.pl span:last-of-type { overflow: hidden; text-overflow: ellipsis; }

/* avatar: cap de jucător, pătrat și pixelat */
.av { width: 30px; height: 30px; overflow: hidden; background: var(--pri-lo); display: inline-grid; place-items: center; flex: none; position: relative; border: 2px solid #000; }
.av::before { content: attr(data-l); font: 500 1rem var(--px); color: #fff; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.av.lg { width: 92px; height: 92px; border-width: 3px; box-shadow: 5px 5px 0 rgba(0, 0, 0, .5); }
.av.lg::before { font-size: 2.6rem; }

/* tabel + câmpuri */
.search { width: 100%; max-width: 360px; margin-bottom: 16px; }
input {
  font: inherit; color: #fff; background: #000; border: 3px solid #a39db5; border-radius: 0; padding: 10px 14px; width: 100%;
}
input:focus { border-color: #fff; }
input::placeholder { color: #7d778b; }
.tablewrap { padding: 6px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 580px; }
th, td { text-align: left; padding: 10px 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { color: var(--gold); font-size: 1rem; font-weight: 500; text-shadow: 2px 2px 0 #000; border-bottom: 3px solid #000; }
tbody tr { border-top: 2px solid var(--line); }
tbody tr:first-child { border-top: 0; }
tbody tr:hover { background: var(--slot); }
td.hearts { font: 500 1.1rem var(--px); }
.tag { font-size: .95rem; font-weight: 500; padding: 0 8px; border: 2px solid currentColor; vertical-align: middle; background: #000; }
.tag.bad { color: var(--bad); }

/* profil + login */
.profile { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile > div { flex: 1; min-width: 200px; }
.profile h1 { margin-bottom: .1em; font-size: 2.2rem; overflow-wrap: anywhere; }
.profile p { margin: 0 0 6px; }
.auth { max-width: 430px; margin: 24px auto; }
.auth form { display: grid; gap: 14px; margin: 18px 0; }
.auth label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.alert { background: #2a0509; border: 3px solid var(--heart); color: #ffd0d5; padding: 10px 14px; margin: 14px 0 0; }

.foot { display: flex; gap: 8px 20px; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: .86rem; padding-top: 20px; padding-bottom: 28px; border-top: 3px solid #000; }

@media (max-width: 560px) {
  .bar { justify-content: center; padding-top: 8px; padding-bottom: 8px; }
  nav a { padding: 5px 8px; font-size: 1rem; }
  .card { padding: 18px 16px; }
  .card, .tile { box-shadow: inset 3px 3px 0 var(--stone-hi), inset -3px -3px 0 var(--stone-lo), 4px 4px 0 rgba(0, 0, 0, .45); }
  .ip code { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .hearts-bar img { animation: none; } }

/* panoul personal */
.sec { margin: 26px 0 12px; font-size: 1.5rem; color: var(--gold); }
.hearts-row { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 10px; }
.hearts-row img { width: 22px; height: 20px; image-rendering: pixelated; }
.big { margin: 0; font: 500 1.9rem var(--px); text-shadow: 2px 2px 0 #000; }
.big .muted { font-size: 1.05rem; text-shadow: none; }
.red { color: var(--heart); font-weight: 500; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.slots li {
  background: var(--slot); border: 2px solid #000; padding: 8px 10px; font-size: .92rem; overflow-wrap: anywhere;
  box-shadow: inset 2px 2px 0 var(--stone-lo), inset -2px -2px 0 var(--stone-hi);
}
.slots small { display: block; color: var(--muted); font-size: .76rem; }
.slots b { color: var(--gold); font: 500 1rem var(--px); }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rows li {
  display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; background: var(--slot); border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--stone-lo), inset -2px -2px 0 var(--stone-hi);
}
.rows span { flex: 1; min-width: 0; }
.rows b { font: 500 1.05rem var(--px); color: var(--ok); white-space: nowrap; }
.rows small { color: var(--muted); white-space: nowrap; min-width: 4.5em; text-align: right; }

/* ranguri */
.rank { display: inline-block; font: 500 .98rem var(--px); padding: 0 8px; border: 2px solid #000; background: #2c2838; color: #d9d4e6; text-shadow: 1px 1px 0 #000; vertical-align: middle; white-space: nowrap; }
.rank.vip { background: #1f4fa6; color: #fff; }
.rank.staff { background: #7a1020; color: #fff; }
.rank.r-owner { background: var(--gold); color: #3a2a00; text-shadow: none; }
.rank.lvl { background: #14351f; color: var(--ok); }
