/* CostaCraft HG • obsidiana/grafite + dourado */
:root {
  --bg: #09090d;
  --bg2: #101016;
  --card: #15151d;
  --card2: #1b1b25;
  --line: #2a2a37;
  --line2: #3a3a4a;
  --text: #eeedf4;
  --muted: #9b99ab;
  --gold: #e9b949;
  --gold2: #ffd77d;
  --gold-dark: #8a6416;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #60a5fa;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Cinzel', Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(233, 185, 73, .10), transparent 70%),
    linear-gradient(180deg, #0c0c12, var(--bg) 600px);
  color: var(--text); font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); letter-spacing: .02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.gold { color: var(--gold); }

/* ---------- cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 9, 13, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 900; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span b { color: var(--gold); }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--card); text-decoration: none; }
.nav a.cta { color: #17120a; background: linear-gradient(180deg, var(--gold2), var(--gold)); }
.nav a.cta:hover { filter: brightness(1.08); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line2); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 1.2rem; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 16px 16px; background: var(--bg2); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card2); color: var(--text); font: 700 1rem var(--font);
  cursor: pointer; transition: transform .12s, filter .12s, background .12s; text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.gold { color: #17120a; border-color: var(--gold); background: linear-gradient(180deg, var(--gold2), var(--gold)); box-shadow: 0 6px 20px rgba(233, 185, 73, .25); }
.btn.discord { background: #5865f2; border-color: #5865f2; }
.btn.ok { background: #166534; border-color: #22c55e; }
.btn.bad { background: #7f1d1d; border-color: #ef4444; }
.btn.small { padding: 7px 12px; font-size: .88rem; }
.btn.block { width: 100%; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 40px; text-align: center; position: relative; }
.hero .logo { width: min(520px, 90%); margin: 0 auto 8px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .7)); }
.hero .tagline { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 640px; margin: 0 auto 24px; }
.ip-box {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 10px 10px 10px 18px;
  box-shadow: var(--shadow);
}
.ip-box .ip { font: 800 1.25rem ui-monospace, Consolas, monospace; color: var(--gold2); letter-spacing: .02em; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: .92rem; color: var(--muted); margin-top: 18px;
}
.status-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status-pill.on .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(74, 222, 128, .18); animation: pulse 2s infinite; }
.status-pill.off .dot { background: var(--bad); }
.status-pill b { color: var(--text); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, .05); } }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- seções ---------- */
section.block { padding: 48px 0; }
section.block.alt { background: linear-gradient(180deg, rgba(255, 255, 255, .015), rgba(255, 255, 255, .03)); border-block: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 640px; margin-inline: auto; }
.eyebrow { display: inline-block; font: 800 .75rem var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature .icon { font-size: 1.8rem; margin-bottom: 8px; }
.feature h3 { font-family: var(--font); font-weight: 800; font-size: 1.05rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

.steps { counter-reset: step; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; padding-left: 56px; }
.step::before {
  counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 18px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #17120a; font-weight: 900; font-size: .9rem;
}
.step h3 { font-family: var(--font); font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- kits ---------- */
.kits { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kit { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kit b { display: block; color: var(--gold2); }
.kit span { color: var(--muted); font-size: .88rem; }

/* ---------- tabs / rankings ---------- */
.tabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 8px 16px; border-radius: 9px; font: 700 .95rem var(--font); cursor: pointer; }
.tabs button.active { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .pos { width: 28px; font-weight: 900; color: var(--muted); text-align: center; }
.rank-list li:nth-child(1) .pos { color: #ffd54f; }
.rank-list li:nth-child(2) .pos { color: #cfd8dc; }
.rank-list li:nth-child(3) .pos { color: #d7a26b; }
.rank-list img { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; background: var(--card2); }
.rank-list .nick { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rank-list .val { font-weight: 800; color: var(--gold2); white-space: nowrap; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- loja ---------- */
.banner { border-radius: 12px; padding: 14px 18px; border: 1px solid; margin-bottom: 20px; }
.banner.warn { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .4); color: #fde68a; }
.banner.info { background: rgba(96, 165, 250, .08); border-color: rgba(96, 165, 250, .35); color: #bfdbfe; }
.banner.ok { background: rgba(74, 222, 128, .08); border-color: rgba(74, 222, 128, .35); color: #bbf7d0; }
.banner.bad { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .4); color: #fecaca; }

.products { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: stretch; }
.product {
  --c: var(--gold);
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--card)), var(--card) 45%);
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); border-radius: 18px; padding: 20px;
  transition: transform .15s, box-shadow .15s;
}
.product:hover { transform: translateY(-3px); box-shadow: 0 16px 40px color-mix(in srgb, var(--c) 18%, transparent); }
.product.highlight { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 16px 40px color-mix(in srgb, var(--c) 20%, transparent); }
.product .ribbon { position: absolute; top: 14px; right: 14px; background: var(--c); color: #111; font: 900 .7rem var(--font); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; }
.product img { width: 150px; height: 150px; margin: 4px auto 12px; border-radius: 14px; object-fit: cover; }
.product h3 { text-align: center; font-size: 1.45rem; color: var(--c); margin-bottom: 2px; }
.product .sub { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.product ul { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; font-size: .94rem; }
.product li { padding-left: 24px; position: relative; }
.product li::before { content: '✔'; position: absolute; left: 0; color: var(--c); font-weight: 900; }
.product .push { margin-top: auto; }
.price { text-align: center; margin: 6px 0 14px; }
.price .value { font: 900 2rem var(--font); }
.price .value small { font-size: 1rem; color: var(--muted); font-weight: 700; }
.price .per { color: var(--muted); font-size: .85rem; }
.price .save { display: inline-block; margin-top: 4px; font-size: .8rem; font-weight: 800; color: var(--ok); }
.duration { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 12px; }
.duration button { border: 0; background: none; color: var(--muted); font: 700 .9rem var(--font); padding: 8px; border-radius: 7px; cursor: pointer; }
.duration button.active { background: var(--c); color: #111; }
.bonus-line { text-align: center; font-size: .88rem; color: var(--gold2); margin-bottom: 12px; }
.product .btn.buy { background: var(--c); border-color: var(--c); color: #111; }
.coins-amount { text-align: center; font: 900 1.6rem var(--font); color: var(--gold2); }
.coins-amount small { display: block; font: 600 .85rem var(--font); color: var(--muted); }

.my-orders { display: flex; flex-wrap: wrap; gap: 8px; }
.my-orders a { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: 700 .85rem ui-monospace, Consolas, monospace; }

/* ---------- modal ---------- */
dialog {
  width: min(480px, calc(100% - 32px)); border: 1px solid var(--line2); border-radius: 18px; padding: 0;
  background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}
dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head img { width: 52px; height: 52px; border-radius: 10px; }
.modal-head h3 { margin: 0; font-family: var(--font); font-weight: 800; }
.modal-head .close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: .92rem; }
.field small { color: var(--muted); font-size: .82rem; }
input[type=text], input[type=password], input[type=search], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); font: 600 1rem var(--font); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 185, 73, .18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.check input { margin-top: 4px; accent-color: var(--gold); }
.form-error { color: var(--bad); font-size: .9rem; min-height: 1.2em; margin-bottom: 8px; }
.summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.summary b { font-size: 1.2rem; }

/* ---------- pedido ---------- */
.order-layout { display: grid; gap: 20px; grid-template-columns: 1.2fr 1fr; align-items: start; }
@media (max-width: 860px) { .order-layout { grid-template-columns: 1fr; } }
.order-code { font: 900 1.6rem ui-monospace, Consolas, monospace; color: var(--gold2); letter-spacing: .08em; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 6px; }
.timeline div { text-align: center; font-size: .78rem; color: var(--muted); }
.timeline div::before { content: ''; display: block; height: 6px; border-radius: 6px; background: var(--line2); margin-bottom: 8px; }
.timeline div.done { color: var(--text); }
.timeline div.done::before { background: var(--gold); }
.timeline div.now::before { background: linear-gradient(90deg, var(--gold), var(--line2)); }
.qr { background: #fff; border-radius: 14px; padding: 12px; width: min(280px, 100%); margin: 0 auto 14px; }
.qr img { width: 100%; height: auto; image-rendering: pixelated; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font: 600 .82rem ui-monospace, Consolas, monospace; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 14px 0; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; word-break: break-word; }
.drop {
  display: grid; place-items: center; text-align: center; gap: 6px; padding: 26px 16px; cursor: pointer;
  border: 2px dashed var(--line2); border-radius: 14px; background: var(--bg2); color: var(--muted); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(233, 185, 73, .05); color: var(--text); }
.drop .big { font-size: 2rem; }
.drop input { display: none; }
.status-big { text-align: center; padding: 10px 0; }
.status-big .emoji { font-size: 3rem; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 800 .75rem var(--font); letter-spacing: .04em; text-transform: uppercase; border: 1px solid; }
.badge.aguardando_pagamento { color: var(--warn); border-color: rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .08); }
.badge.em_analise { color: var(--info); border-color: rgba(96, 165, 250, .45); background: rgba(96, 165, 250, .08); }
.badge.aprovado { color: var(--ok); border-color: rgba(74, 222, 128, .45); background: rgba(74, 222, 128, .08); }
.badge.recusado { color: var(--bad); border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .08); }
.badge.expirado { color: var(--muted); border-color: var(--line2); background: var(--card2); }

/* ---------- doadores ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; max-width: 720px; margin: 0 auto 28px; }
.podium .p { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 10px; }
.podium .p img { width: 72px; height: 72px; margin: 0 auto 10px; image-rendering: pixelated; border-radius: 8px; }
.podium .p.first { padding-top: 28px; border-color: var(--gold); box-shadow: 0 0 40px rgba(233, 185, 73, .15); }
.podium .p.first img { width: 96px; height: 96px; }
.podium .medal { font-size: 1.8rem; }
.podium .nick { font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .podium { grid-template-columns: 1fr; } .podium .p.first { order: -1; } }

/* ---------- admin ---------- */
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.orders-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.orders-table th, .orders-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.orders-table th { color: var(--muted); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.orders-table td.actions { white-space: nowrap; display: flex; gap: 6px; flex-wrap: wrap; }
.orders-table .code { font: 800 .95rem ui-monospace, Consolas, monospace; color: var(--gold2); }
.tag-new { color: var(--warn); font-size: .78rem; font-weight: 700; }
@media (max-width: 860px) {
  .orders-table thead { display: none; }
  .orders-table tr { display: block; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 8px; background: var(--card); }
  .orders-table td { display: block; border: 0; padding: 4px 6px; }
}

/* ---------- rodapé ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .88rem; margin-top: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--card2); border: 1px solid var(--gold); color: var(--text); padding: 10px 18px; border-radius: 10px;
  font-weight: 700; box-shadow: var(--shadow); transition: .2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- utilidades extras ---------- */
.narrow { max-width: 420px; margin-inline: auto; }
.no-margin { margin: 0; }
.gap-top { margin-top: 20px; }
.vip1 { color: #76FF03; font-weight: 800; }
.vip2 { color: #FF9100; font-weight: 800; }
.vip3 { color: #B388FF; font-weight: 800; }
.card ul { padding-left: 20px; margin: 0 0 1em; }
.card ul li { margin-bottom: 4px; }
.card h3 { margin-top: .6em; }
.discord-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px; background: rgba(88, 101, 242, .1); border: 1px solid rgba(88, 101, 242, .4); font-size: .92rem; }
.discord-box small { flex: 1 1 200px; }
button.link { background: none; border: 0; color: var(--gold2); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.manual-pix { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.manual-pix summary { cursor: pointer; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.small-note { font-size: .85rem; margin-top: 10px; text-align: center; }
