@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bg: #06030d;
    --ink: #f1eaff;
    --muted: #b9abd9;
    --gold: #e0b341;
    --gold-hi: #ffe39a;
    --gold-lo: #8a6416;
    --violet: #a24dff;
    --violet-lo: #4b1d8a;
    --panel: rgba(14, 8, 28, 0.86);
    --ok: #4be3a0;
    --bad: #ff7391;
    --radius: 18px;
    --serif: "Cinzel", Georgia, "Times New Roman", serif;
    --sans: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

body {
    min-height: 100dvh;
    font-family: var(--sans);
    color: var(--ink);
    line-height: 1.6;
    background: radial-gradient(120% 70% at 50% -10%, #2a0f52 0%, #0d0620 45%, #05020b 100%) fixed;
    background-color: var(--bg);
    padding: max(16px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

#bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hidden { display: none !important; }

/* ---------- Painéis ---------- */
.panel {
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 22px 18px;
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        linear-gradient(155deg, var(--gold-hi), var(--gold-lo) 45%, var(--violet)) border-box;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 40px rgba(162, 77, 255, 0.1);
}

.panel-title {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--gold-hi);
    text-align: center;
    margin-bottom: 14px;
}

.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(224, 179, 65, 0.45), transparent); margin: 16px 0; border: 0; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 8px 0 2px; }

.logo {
    width: min(56vw, 210px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: block;
    margin: 0 auto 14px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(224, 179, 65, 0.5), 0 0 44px rgba(162, 77, 255, 0.5), 0 14px 30px rgba(0, 0, 0, 0.7);
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(27px, 8vw, 36px);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.15;
    background: linear-gradient(180deg, #fff2c4, #e0b341 55%, #9a6f17);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Botões ---------- */
.stack { display: flex; flex-direction: column; gap: 10px; }

.btn {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: 600 15px/1.2 var(--sans);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s, filter 0.2s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

.btn-gold { background: linear-gradient(180deg, #f6d36b, #c99522); color: #1a0f00; border-color: #ffe39a; }
.btn-violet { background: linear-gradient(180deg, #7a2fd6, #4b1d8a); border-color: #b97bff; }
.btn-line { background: rgba(255, 255, 255, 0.04); border-color: rgba(224, 179, 65, 0.55); color: var(--gold-hi); }
.btn-wa { background: linear-gradient(180deg, #2bd46b, #128c4a); border-color: #5cf09a; color: #04210f; }
.btn-out { background: rgba(255, 115, 145, 0.08); border-color: rgba(255, 115, 145, 0.5); color: #ffb3c4; }
.btn-sm { min-height: 40px; font-size: 13px; padding: 0 12px; border-radius: 10px; width: auto; }

/* ---------- Formulários ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 500; color: var(--gold-hi); margin-bottom: 5px; }

.input-wrap { position: relative; }
.input-wrap > i.ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 14px; pointer-events: none; }
.input-wrap > i.eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; cursor: pointer; padding: 10px; }

input, select {
    width: 100%;
    min-height: 50px;
    padding: 0 14px 0 42px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(224, 179, 65, 0.35);
    border-radius: 12px;
    color: #fff;
    font: 500 16px var(--sans);
    transition: border-color 0.2s, box-shadow 0.2s;
}
input.pad-r { padding-right: 44px; }
input:focus, select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(162, 77, 255, 0.25); outline: none; }
input::placeholder { color: rgba(185, 171, 217, 0.6); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 400px) { .grid-2.stack-sm { grid-template-columns: 1fr; gap: 0; } }

.note {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
    border: 1px solid rgba(162, 77, 255, 0.4);
    background: rgba(162, 77, 255, 0.1);
    color: #dcc8ff;
}
.note.warn { border-color: rgba(255, 115, 145, 0.5); background: rgba(255, 115, 145, 0.08); color: #ffc2cf; }
.note strong { color: var(--gold-hi); }

.link { color: var(--violet-hi, #c99bff); font-weight: 600; text-decoration: underline; cursor: pointer; background: none; border: 0; font: inherit; }
.center { text-align: center; }
.small { font-size: 13px; color: var(--muted); }

.legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(224, 179, 65, 0.2); }
.legal a { color: var(--muted); font-size: 12px; text-decoration: none; }
.legal a:hover { color: var(--gold-hi); text-decoration: underline; }

/* ---------- Status ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.on { background: rgba(75, 227, 160, 0.14); color: var(--ok); border: 1px solid rgba(75, 227, 160, 0.5); }
.chip.off { background: rgba(255, 115, 145, 0.12); color: var(--bad); border: 1px solid rgba(255, 115, 145, 0.45); }
.chip.dev { background: rgba(224, 179, 65, 0.12); color: var(--gold-hi); border: 1px solid rgba(224, 179, 65, 0.45); }

.user-name { font-family: var(--serif); font-size: 22px; font-weight: 700; text-align: center; color: #fff; letter-spacing: 0.04em; }
.user-sub { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 16px; }

.planos { display: flex; flex-direction: column; gap: 10px; }
.plano {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(185, 171, 217, 0.2);
}
.plano .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.plano .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { text-align: center; padding: 12px 6px; border-radius: 14px; background: rgba(162, 77, 255, 0.09); border: 1px solid rgba(162, 77, 255, 0.3); }
.stat b { display: block; font: 700 26px/1.1 var(--serif); color: var(--gold-hi); }
.stat span { font-size: 12px; color: var(--muted); line-height: 1.3; display: block; margin-top: 4px; }

/* ---------- Apresentação ---------- */
.texto p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; font-size: 15px; color: #e4d9fb; }
.texto p + p { margin-top: 12px; }
.texto h2, .jogo h3 { font-family: var(--serif); text-align: center; }
.texto h2 { font-size: 19px; letter-spacing: 0.06em; color: var(--gold-hi); margin-bottom: 14px; }

.jogos-titulo { text-align: center; margin: 8px 0 -4px; }
.jogos-titulo h2 { font-family: var(--serif); font-size: 21px; letter-spacing: 0.1em; color: var(--gold-hi); }
.jogos-titulo p { font-size: 13px; color: var(--muted); }

.jogo { text-align: center; }
.jogo .thumb {
    width: 108px; height: 108px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 12px;
    box-shadow: 0 0 0 1px rgba(224, 179, 65, 0.5), 0 0 28px rgba(162, 77, 255, 0.4), 0 8px 20px rgba(0, 0, 0, 0.6);
    background: #12091f;
}
.jogo h3 { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 0.04em; line-height: 1.3; margin-bottom: 8px; }
.jogo .chip { margin-bottom: 14px; }
.jogo .texto { text-align: left; }

details.mais { margin-top: 12px; }
details.mais summary {
    list-style: none; cursor: pointer; text-align: center; font-weight: 600; font-size: 14px;
    color: var(--gold-hi); padding: 11px; border-radius: 12px; border: 1px solid rgba(224, 179, 65, 0.4);
    background: rgba(224, 179, 65, 0.06);
}
details.mais summary::-webkit-details-marker { display: none; }
details.mais summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; margin-left: 8px; display: inline-block; transition: transform 0.2s; }
details.mais[open] summary::after { transform: rotate(180deg); }
details.mais[open] summary { margin-bottom: 14px; }

.fechamento { text-align: center; }
.fechamento p { text-align: center; }
.fechamento .final { font-family: var(--serif); font-size: 17px; line-height: 1.5; color: var(--gold-hi); margin-top: 16px; }

.rodape { text-align: center; font-size: 12px; color: var(--muted); padding: 6px 0 0; }

/* ---------- Lista (indicados / admin) ---------- */
.lista { display: flex; flex-direction: column; gap: 10px; }
.item { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(185, 171, 217, 0.2); }
.item .nome { font-weight: 600; font-size: 15px; word-break: break-word; }
.item .meta { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.item .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.vazio { text-align: center; color: var(--muted); font-size: 14px; padding: 18px 8px; }

.copybox { display: flex; gap: 8px; align-items: stretch; }
.copybox input { padding-left: 14px; font-size: 13px; }

.acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.acoes .rot { grid-column: 1 / -1; font-size: 12px; color: var(--gold-hi); font-weight: 600; margin-top: 4px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(3, 1, 8, 0.85); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal .panel { width: 100%; max-width: 420px; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
