/* PlayBlock Homepage — styles on top of colors_and_type.css */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg-0);
    color: var(--fg-1);
    font-family: var(--font-body);
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section   { padding: 96px 0; position: relative; }
@media (max-width: 720px) { .section { padding: 56px 0; } }

/* ---------- Background grid + drifting particles ---------- */
.bg-grid {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 100%);
}
.bg-particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-particles span {
    position: absolute; width: 4px; height: 4px; border-radius: 1px;
    animation: drift 18s linear infinite;
    opacity: .55;
}
@keyframes drift {
    from { transform: translate3d(0, 110vh, 0); }
    to   { transform: translate3d(0, -10vh, 0); }
}

/* ---------- Scroll reveal ---------- */
.rise { animation: rise 700ms var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-body); font-weight: 600; font-size: 15px;
    border: 1px solid transparent; border-radius: 12px; padding: 14px 22px;
    color: var(--fg-1);
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease-out),
                filter var(--dur) var(--ease-out),
                border-color var(--dur) var(--ease-out),
                color var(--dur) var(--ease-out);
}
.btn:active { transform: translateY(2px); filter: brightness(.92); }
.btn:focus-visible { outline: 2px solid var(--pb-cyan); outline-offset: 2px; }
.btn-primary { background: var(--pb-gradient); color: #fff; }
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 14px 40px -10px var(--pb-magenta); }
.btn-secondary { background: transparent; border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--pb-cyan); color: var(--pb-cyan); }
.btn-premium { background: var(--pb-magenta); color: #fff; }
.btn-premium:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 14px 40px -10px var(--pb-magenta); }
.btn-gold { background: var(--tier-premium-plus); color: #2A1E00; }
.btn-gold:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 14px 40px -10px var(--tier-premium-plus); }
.btn-ghost { background: transparent; padding: 10px 6px; color: var(--fg-2); }
.btn-ghost:hover { color: var(--fg-1); }
.btn-sm { padding: 10px 16px; font-size: 13px; border-radius: 10px; }

/* ---------- Card ---------- */
.card {
    position: relative;
    background: var(--bg-2); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 28px;
    box-shadow: var(--shadow-card);
    transition: border-color var(--dur) var(--ease-out),
                transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease-out);
}
.card:hover { border-color: var(--pb-cyan); transform: translateY(-2px); box-shadow: var(--shadow-glow-cyan); }
.card .pixel-corner {
    position: absolute; top: 10px; left: 10px;
    width: 6px; height: 6px; background: var(--pb-cyan);
}
.card.magenta:hover { border-color: var(--pb-magenta); box-shadow: var(--shadow-glow-magenta); }
.card.magenta .pixel-corner { background: var(--pb-magenta); }
.card.gold:hover { border-color: var(--tier-premium-plus); box-shadow: 0 0 0 1px var(--tier-premium-plus), 0 0 40px -8px var(--tier-premium-plus); }
.card.gold .pixel-corner { background: var(--tier-premium-plus); }
.card.orange:hover { border-color: var(--tier-premium); box-shadow: 0 0 0 1px var(--tier-premium), 0 0 40px -8px var(--tier-premium); }
.card.orange .pixel-corner { background: var(--tier-premium); }

/* ---------- Badge ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
    text-transform: uppercase; padding: 5px 10px;
    border-radius: var(--r-full); border: 1px solid transparent;
    white-space: nowrap;
}
.badge.live     { color: var(--pb-cyan);            background: rgba(76,199,255,.12);  border-color: rgba(76,199,255,.35); }
.badge.premium  { color: var(--tier-premium-plus);  background: rgba(255,221,85,.12);  border-color: rgba(255,221,85,.35); }
.badge.success  { color: var(--success);            background: rgba(91,229,132,.12);  border-color: rgba(91,229,132,.35); }
.badge.new      { color: var(--pb-magenta);         background: rgba(255,63,180,.12);  border-color: rgba(255,63,180,.35); }
.badge.warn     { color: var(--warn);               background: rgba(255,197,61,.12);  border-color: rgba(255,197,61,.35); }
.badge.muted    { color: var(--fg-2);               background: rgba(255,255,255,.04); border-color: var(--line); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.field input, .field select, .field textarea {
    width: 100%;
    font-family: var(--font-body); font-size: 15px;
    color: var(--fg-1); background: var(--bg-3); border: 1px solid var(--line);
    padding: 12px 14px; border-radius: var(--r-md); outline: none;
    transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-3); }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--pb-cyan); box-shadow: 0 0 0 3px rgba(76,199,255,.18);
}
.field textarea { resize: vertical; min-height: 120px; }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50; height: 72px;
    backdrop-filter: blur(12px); background: rgba(10,11,20,.7);
    border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-pixel); font-size: 13px; letter-spacing: .04em; }
.nav-logo img { width: 36px; height: 36px; image-rendering: pixelated; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
    padding: 8px 14px; border-radius: var(--r-md);
    font-size: 14px; color: var(--fg-2); cursor: pointer;
    transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.nav-link:hover { color: var(--fg-1); background: rgba(255,255,255,.03); }
.nav-link.active {
    color: var(--pb-cyan); background: rgba(76,199,255,.08);
}
.nav-right { display: flex; gap: 10px; align-items: center; }
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-right .btn-secondary.nav-ip { display: none; }
}

/* ---------- Eyebrow ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 12px;
    letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3);
}
.eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success); box-shadow: 0 0 12px var(--success);
    animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 48px 0; color: var(--fg-3); font-size: 14px; }
footer a:hover { color: var(--fg-1); }

/* ---------- Pixel frame ---------- */
.pixel-frame {
    position: relative; border: 2px dashed var(--line-strong); border-radius: var(--r-lg);
    background:
        linear-gradient(45deg, rgba(255,255,255,.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.02) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    display: flex; align-items: center; justify-content: center; color: var(--fg-3);
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- Live feed ---------- */
.feed {
    border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--bg-1); overflow: hidden;
}
.feed-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--line);
    background: var(--bg-2);
}
.feed-head-left { display: flex; align-items: center; gap: 12px; }
.feed-list {
    list-style: none; margin: 0; padding: 0;
    max-height: 520px; overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.feed-item {
    display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
    padding: 14px 20px; border-bottom: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 14px;
    animation: feed-in 500ms var(--ease-out) both;
}
.feed-item:last-child { border-bottom: 0; }
@keyframes feed-in {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: none; }
}
.feed-icon {
    width: 36px; height: 36px; border-radius: var(--r-md);
    display: grid; place-items: center;
    background: var(--bg-3); color: var(--pb-cyan); font-size: 16px;
    border: 1px solid var(--line);
}
.feed-text { color: var(--fg-2); }
.feed-text b { color: var(--fg-1); font-weight: 600; }
.feed-text .mc-bedwars { color: var(--pb-cyan); }
.feed-text .mc-kitpvp  { color: var(--pb-magenta); }
.feed-text .mc-parkour { color: var(--success); }
.feed-text .mc-case    { color: var(--warn); }
.feed-time {
    color: var(--fg-3); font-size: 12px; white-space: nowrap;
}

/* ---------- Chat specimen ---------- */
.chat {
    background: #000; border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 16px 18px; font-family: var(--font-mono); font-size: 13px; line-height: 1.8;
    color: #BDBDBD;
}
.chat .g  { color: #A8A8A8; }
.chat .y  { color: #FFD54F; }
.chat .a  { color: #5BE584; }
.chat .c  { color: #FF5C5C; }
.chat .b  { color: #4CC7FF; }
.chat .m  { color: #FF3FB4; }
.chat .w  { color: #F5F5F5; font-weight: 600; }
.chat .f  { color: #FFC53D; font-weight: 600; }

/* ---------- Tier card (shop) ---------- */
.tier {
    position: relative; display: flex; flex-direction: column; gap: 20px;
    padding: 32px; border-radius: var(--r-xl);
    background: var(--bg-2); border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.tier:hover { transform: translateY(-3px); }
.tier.featured { border-color: rgba(255,221,85,.45); }
.tier.featured:hover { box-shadow: 0 0 0 1px var(--tier-premium-plus), 0 20px 60px -20px var(--tier-premium-plus); }
.tier .tier-title { font-family: var(--font-pixel); font-size: 16px; letter-spacing: .04em; }
.tier .tier-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tier .tier-features li { display: flex; gap: 10px; align-items: flex-start; color: var(--fg-2); font-size: 14px; }
/* Volle Breite: Vorteile in mehreren Spalten rendern, damit die Karte in
   einem einzelnen Rang-Layout nicht zur Textwüste wird. */
.tier .tier-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 24px;
}
.tier .tier-features li .check { color: var(--success); flex-shrink: 0; }
.tier .tier-ribbon {
    position: absolute; top: -1px; right: 24px;
    background: var(--tier-premium-plus); color: #2A1E00;
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    padding: 6px 12px; border-radius: 0 0 var(--r-sm) var(--r-sm);
}

/* Pay toggle (coins vs donation) */
.pay-toggle {
    display: inline-flex; background: var(--bg-2); border: 1px solid var(--line);
    border-radius: var(--r-full); padding: 4px; gap: 4px;
}
.pay-toggle button {
    padding: 8px 18px; border-radius: var(--r-full);
    font-size: 13px; color: var(--fg-2);
    transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.pay-toggle button.active { background: var(--bg-3); color: var(--fg-1); }
.pay-toggle .pay-ic { font-family: var(--font-mono); }

/* ---------- Apply ---------- */
.role-card {
    position: relative; padding: 24px; border-radius: var(--r-lg);
    background: var(--bg-2); border: 1px solid var(--line);
    cursor: pointer; transition: all var(--dur) var(--ease-out);
    display: flex; flex-direction: column; gap: 12px; min-height: 190px;
}
.role-card:hover { border-color: var(--pb-cyan); transform: translateY(-2px); }
.role-card.selected { border-color: var(--pb-cyan); box-shadow: 0 0 0 1px var(--pb-cyan), 0 0 40px -8px var(--pb-cyan); }
.role-card .role-icon {
    width: 40px; height: 40px; border-radius: var(--r-md);
    background: var(--bg-3); color: var(--pb-cyan);
    display: grid; place-items: center; font-size: 18px;
    font-family: var(--font-mono);
}

/* ---------- Divider ---------- */
.hr-rule {
    border: 0; height: 1px; background: var(--line); margin: 0;
}

/* ---------- Utility ---------- */
.text-grad-2 { background: linear-gradient(100deg, var(--pb-cyan), var(--pb-magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--font-mono); }

/* ---------- Hero floaty ---------- */
@keyframes bob    { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-12px); } }
@keyframes float1 { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-10px); } }
@keyframes float2 { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(8px); } }

/* Responsive */
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr !important; }
    .grid-3 { grid-template-columns: 1fr !important; }
    .grid-4 { grid-template-columns: 1fr 1fr !important; }
}

/* ---------- Auth Modal ---------- */
.auth-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(6, 7, 14, .72);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    overflow-y: auto;
    padding: 24px;
    animation: fadeIn 180ms var(--ease-out) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.auth-card {
    position: relative;
    width: 100%; max-width: 440px;
    margin: auto; /* zentriert in Flex, fällt bei Overflow auf top-aligned zurück (scrollbar) */
    background: var(--bg-2); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 28px 28px 22px;
    box-shadow: var(--shadow-card), 0 0 0 1px var(--line-strong);
    animation: authRise 240ms var(--ease-out) both;
}
@keyframes authRise { from { transform: translateY(20px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.auth-card .pixel-corner { position: absolute; top: 10px; left: 10px; width: 6px; height: 6px; background: var(--pb-cyan); }
.auth-close {
    position: absolute; top: 10px; right: 10px;
    width: 28px; height: 28px; border-radius: var(--r-sm);
    color: var(--fg-3); font-size: 14px;
    transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.auth-close:hover { color: var(--fg-1); background: rgba(255,255,255,.05); }

.auth-tabs {
    display: flex; gap: 4px; margin: 4px 0 18px;
    border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.auth-tab {
    padding: 10px 14px; font-size: 13px; font-weight: 600;
    color: var(--fg-3); border-bottom: 2px solid transparent;
    margin-bottom: -1px; letter-spacing: .02em;
    transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.auth-tab:hover { color: var(--fg-2); }
.auth-tab.active { color: var(--fg-1); border-bottom-color: var(--pb-cyan); }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .field input {
    /* kompakter als Default-Form */
    padding: 11px 12px; font-size: 14px;
}
.auth-form .field label { font-size: 11px; }
.auth-error {
    background: rgba(255,92,92,.1); border: 1px solid rgba(255,92,92,.3);
    color: var(--danger); padding: 10px 12px; border-radius: var(--r-md);
    font-size: 13px; line-height: 1.4;
}
.auth-switch {
    text-align: center; font-size: 13px; color: var(--fg-3); margin-top: 8px;
}
.auth-link {
    background: none; padding: 0; color: var(--pb-cyan); font: inherit; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
}
.auth-link:hover { color: var(--fg-1); }

.auth-code {
    background: var(--bg-3); border: 1px solid var(--line-strong);
    border-radius: var(--r-md); padding: 18px 16px;
    font-family: var(--font-mono); font-size: 18px;
    color: var(--fg-2); text-align: center; letter-spacing: .04em;
    margin: 6px 0;
}
.auth-code b {
    color: var(--pb-cyan); font-size: 22px; letter-spacing: .08em; margin-left: 6px;
}
.auth-progress {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 10px 12px; font-size: 13px; color: var(--fg-2);
    background: rgba(255,255,255,.02); border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.auth-step {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px; border-radius: var(--r-md);
    border: 1px solid var(--line); background: rgba(255,255,255,.02);
    margin-bottom: 10px;
    transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.auth-step.active { border-color: var(--pb-cyan); background: rgba(76,199,255,.06); }
.auth-step.done   { border-color: var(--success); background: rgba(91,229,132,.05); }
.auth-step.locked { opacity: .55; }
.auth-step-num {
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 13px; font-weight: 700;
    background: var(--bg-3); color: var(--fg-2);
    border: 1px solid var(--line);
    flex-shrink: 0;
}
.auth-step.active .auth-step-num { background: var(--pb-cyan); color: #03263a; border-color: var(--pb-cyan); }
.auth-step.done .auth-step-num   { background: var(--success); color: #0a2211; border-color: var(--success); }
.auth-step-title { font-size: 14px; font-weight: 600; color: var(--fg-1); }
.auth-progress .dot {
    width: 8px; height: 8px; border-radius: 50%;
    animation: pulse 1.6s infinite;
}
.auth-progress .dot.warm { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.auth-progress .dot.ok   { background: var(--success); box-shadow: 0 0 10px var(--success); animation: none; }
.auth-progress .dot.bad  { background: var(--danger); box-shadow: 0 0 10px var(--danger); animation: none; }
.code {
    font-family: var(--font-mono); font-size: 12px;
    background: var(--bg-3); padding: 2px 6px; border-radius: var(--r-sm); color: var(--fg-1);
}

/* ---------- Nav user (MC head + name) ---------- */
.nav-user-btn { position: relative; padding-left: 6px; padding-right: 12px; gap: 8px; }
.nav-user-head {
    width: 26px; height: 26px; border-radius: 6px;
    image-rendering: pixelated;
    background: var(--bg-3); border: 1px solid var(--line);
    object-fit: cover;
    display: block;
}
.nav-user-head.placeholder {
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 12px; font-weight: 700;
    color: #fff; background: var(--pb-gradient); border: 0;
}
.nav-user-warn {
    display: inline-grid; place-items: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--warn); color: #1a1308;
    font-family: var(--font-mono); font-size: 11px; font-weight: 700;
    margin-left: 2px;
}
.nav-user-admin {
    display: inline-grid; place-items: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--tier-premium); color: #1a1000;
    font-family: var(--font-mono); font-size: 10px; font-weight: 700;
    margin-left: 2px;
}
.nav-user-team {
    display: inline-grid; place-items: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--success); color: #0a2211;
    font-size: 9px;
    margin-left: 2px;
}

/* ---------- Admin Panel ---------- */
.admin-card { max-width: 920px; }
.admin-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px; margin-bottom: 14px;
}
.admin-stat {
    padding: 12px 14px; border: 1px solid var(--line);
    border-radius: var(--r-md); background: var(--bg-3);
}
.admin-table-wrap {
    max-height: 60vh; overflow: auto; margin-top: 12px;
    border: 1px solid var(--line); border-radius: var(--r-md);
}
.admin-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.admin-table th, .admin-table td {
    text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.admin-table thead th {
    position: sticky; top: 0; background: var(--bg-2);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--fg-3); font-weight: 600;
    border-bottom: 1px solid var(--line-strong);
    z-index: 1;
}
.admin-table tbody tr:hover { background: rgba(255,255,255,.02); }
.admin-head {
    width: 22px; height: 22px; border-radius: 4px;
    image-rendering: pixelated; background: var(--bg-3);
    border: 1px solid var(--line);
}
.admin-rank-pill {
    display: inline-block; padding: 3px 9px; border-radius: 999px;
    border: 1px solid; font-family: var(--font-mono); font-size: 10px;
    letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}

/* ---------- Daily Reward Button ---------- */
.daily-reward-wrap {
    padding: 28px 20px 8px;
}
.daily-reward-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 22px;
    background: var(--bg-2);
    border: 1px solid color-mix(in srgb, #FFC83D 55%, var(--line));
    border-radius: var(--r-md);
    box-shadow: 0 0 0 1px color-mix(in srgb, #FFC83D 15%, transparent),
                0 8px 28px rgba(255, 200, 61, .08);
}
@media (max-width: 640px) {
    .daily-reward-card { flex-direction: column; align-items: stretch; gap: 12px; }
}
.daily-reward-head { flex: 1; min-width: 0; }

/* Rechte Spalte: Button + optionaler Ok/Err-Banner darunter. Als eigene
   Flex-Column, damit der Banner die Textspalte links nicht zusammenquetscht. */
.daily-reward-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    max-width: 360px;
}
@media (max-width: 640px) {
    .daily-reward-right { max-width: none; }
}

.btn-daily-reward {
    position: relative;
    flex: 0 0 auto;
    padding: 14px 26px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #FFC83D;
    background: transparent;
    border: 2px solid #FFC83D;
    border-radius: var(--r-md);
    cursor: pointer;
    text-transform: uppercase;
    transition: background .15s ease, color .15s ease, transform .08s ease,
                box-shadow .2s ease;
    white-space: nowrap;
    user-select: none;
}
.btn-daily-reward:hover:not(:disabled) {
    background: #FFC83D;
    color: #1a1400;
    box-shadow: 0 0 0 3px rgba(255, 200, 61, .28),
                0 0 24px rgba(255, 200, 61, .35);
}
.btn-daily-reward:active:not(:disabled) {
    transform: translateY(1px);
}
.btn-daily-reward:disabled {
    opacity: .55;
    cursor: not-allowed;
    color: color-mix(in srgb, #FFC83D 70%, var(--fg-3));
    border-color: color-mix(in srgb, #FFC83D 50%, var(--line));
}

.daily-reward-ok {
    padding: 8px 12px;
    background: color-mix(in srgb, var(--success) 18%, transparent);
    border: 1px solid var(--success);
    color: var(--success);
    border-radius: var(--r-sm);
    font-size: 13px;
}
.daily-reward-err {
    padding: 8px 12px;
    background: color-mix(in srgb, var(--danger) 18%, transparent);
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: var(--r-sm);
    font-size: 13px;
}

/* ---------- Admin / Team Portal (volle Seite statt Modal) ---------- */
.portal-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    padding: 24px 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}
@media (max-width: 820px) {
    .portal-shell { grid-template-columns: 1fr; }
}

.portal-sidebar {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-2);
    padding: 14px;
    position: sticky;
    /* 72px Nav-Höhe + 20px Puffer — sonst wird der Sidebar-Kopf beim
       Scrollen hinter der sticky Top-Nav versteckt. */
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (max-width: 820px) {
    .portal-sidebar { position: static; }
}
.portal-sidebar-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.portal-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    color: var(--fg-1);
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    width: 100%;
    transition: background .1s, border-color .1s;
}
.portal-nav-item:hover { background: rgba(255,255,255,.04); }
.portal-nav-item.active {
    background: color-mix(in srgb, var(--pb-cyan) 16%, transparent);
    border-color: color-mix(in srgb, var(--pb-cyan) 45%, transparent);
    color: var(--fg-1);
}
.portal-nav-icon {
    flex: 0 0 auto;
    width: 20px;
    text-align: center;
    font-size: 14px;
}
.portal-nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.portal-nav-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fg-3);
    background: var(--bg-3);
    border: 1px solid var(--line);
    padding: 1px 7px;
    border-radius: 999px;
}
.portal-nav-item.active .portal-nav-badge {
    color: var(--fg-1);
    border-color: color-mix(in srgb, var(--pb-cyan) 45%, transparent);
    background: rgba(0,0,0,.25);
}
.portal-sidebar-foot {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.portal-back {
    width: 100%;
    text-align: center;
    text-decoration: none;
}

.portal-main {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-2);
    padding: 20px;
    min-height: 480px;
    position: relative;
}
.portal-main::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 14px; height: 14px;
    border-top: 2px solid var(--pb-cyan);
    border-left: 2px solid var(--pb-cyan);
    border-top-left-radius: var(--r-md);
    opacity: .7;
}

.portal-section { display: flex; flex-direction: column; gap: 16px; }
.portal-section-head {
    display: flex; flex-direction: column; gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.portal-section-sub { color: var(--fg-3); }
.portal-section-body { display: flex; flex-direction: column; gap: 14px; }

.portal-loading {
    max-width: 1400px;
    margin: 40px auto;
    padding: 40px;
    text-align: center;
    color: var(--fg-3);
    font-size: 14px;
}

.portal-denied {
    max-width: 520px;
    margin: 60px auto;
    padding: 20px;
}
.portal-denied-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-2);
    padding: 28px 24px;
    text-align: center;
}

.admin-stat-clickable {
    cursor: pointer;
    transition: border-color .1s, background .1s;
}
.admin-stat-clickable:hover {
    border-color: color-mix(in srgb, var(--pb-cyan) 55%, var(--line));
    background: color-mix(in srgb, var(--pb-cyan) 5%, var(--bg-3));
}

.portal-dash-tip {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 16px;
    background: color-mix(in srgb, var(--pb-cyan) 6%, var(--bg-3));
    border: 1px solid color-mix(in srgb, var(--pb-cyan) 30%, var(--line));
    border-radius: var(--r-md);
    font-size: 13px;
    color: var(--fg-2);
    line-height: 1.5;
}
.portal-dash-tip-icon { font-size: 18px; flex: 0 0 auto; }

/* ---------- Admin Panel · Rechte-Tab ---------- */
.perms-wrap {
    display: grid; grid-template-columns: 260px 1fr; gap: 14px;
    margin-top: 10px; max-height: 62vh; min-height: 400px;
}
@media (max-width: 720px) {
    .perms-wrap { grid-template-columns: 1fr; }
}
.perms-left {
    border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 10px; background: var(--bg-3); overflow: hidden;
    display: flex; flex-direction: column;
    /* min-height:0 ist nötig, damit das Grid-Item nicht auf Content-Höhe
       wächst und damit die max-height des .perms-wrap sprengt. */
    min-height: 0;
}
.perms-rank-list {
    overflow-y: auto; flex: 1;
    display: flex; flex-direction: column; gap: 2px;
}
.perms-rank-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; background: transparent;
    border: 1px solid transparent; border-radius: var(--r-sm);
    color: var(--fg-1); cursor: pointer; text-align: left;
    font-size: 13px;
}
.perms-rank-item:hover { background: rgba(255,255,255,.04); }
.perms-rank-item.active {
    background: color-mix(in srgb, var(--pb-cyan) 14%, transparent);
    border-color: color-mix(in srgb, var(--pb-cyan) 40%, transparent);
}
.perms-rank-dot {
    width: 10px; height: 10px; border-radius: 50%;
    border: 1px solid var(--line-strong); flex: 0 0 auto;
}
.perms-rank-name { flex: 1; font-weight: 600; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.perms-rank-badge {
    font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
    background: var(--bg-2); padding: 2px 7px; border-radius: 999px;
    border: 1px solid var(--line);
}
.perms-right {
    border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 14px; background: var(--bg-3); overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px;
    /* Siehe .perms-left — ohne min-height:0 übersteuert der intrinsische
       Inhalt die max-height des Grid-Containers und die Kategorien
       fluten unter den Footer. */
    min-height: 0;
}
.perms-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 10px; flex-wrap: wrap; padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.perms-cat {
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--bg-2); overflow: hidden;
}
.perms-cat-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; cursor: pointer;
    user-select: none;
    background: linear-gradient(0deg, rgba(255,255,255,.01), rgba(255,255,255,.03));
    border-bottom: 1px solid var(--line);
}
.perms-cat-head:hover { background: rgba(255,255,255,.04); }
.perms-cat-arrow {
    width: 14px; display: inline-block; color: var(--fg-3); font-size: 12px;
}
.perms-cat-title { flex: 1; font-weight: 700; font-size: 14px; }
.perms-cat-count {
    font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
    background: var(--bg-3); padding: 2px 7px; border-radius: 999px;
    border: 1px solid var(--line);
}
.perms-cat-all {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--fg-2); cursor: pointer;
    font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
}
.perms-cat-all input { cursor: pointer; }
.perms-cat-desc {
    padding: 6px 12px; font-size: 11px; color: var(--fg-3);
    border-bottom: 1px solid var(--line); background: var(--bg-3);
}
.perms-cat-body {
    padding: 8px; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 4px;
}
.perms-item {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 8px 10px; border-radius: var(--r-sm);
    cursor: pointer; border: 1px solid transparent;
}
.perms-item:hover {
    background: rgba(255,255,255,.03);
    border-color: var(--line);
}
.perms-item input { margin-top: 2px; cursor: pointer; flex: 0 0 auto; }
.perms-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perms-item-label { font-size: 13px; color: var(--fg-1); font-weight: 600; }
.perms-item-desc { font-size: 11px; color: var(--fg-3); line-height: 1.35; }

/* ---------- Profile Modal ---------- */
.profile-card { max-width: 460px; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
    width: 72px; height: 72px; border-radius: var(--r-md);
    image-rendering: pixelated; background: var(--bg-3); border: 1px solid var(--line);
    object-fit: cover;
}
.profile-avatar.placeholder {
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 26px; font-weight: 700;
    color: #fff; background: var(--pb-gradient); border: 0;
}
.profile-head-text { flex: 1; min-width: 0; }

.profile-rows { display: flex; flex-direction: column; gap: 10px; }
.profile-row {
    display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: baseline;
}
.profile-row-label {
    font-family: var(--font-mono); font-size: 11px;
    letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3);
}
.profile-row-value { font-size: 14px; color: var(--fg-1); }

.profile-verify {
    margin-top: 16px; padding: 14px;
    background: rgba(255,197,61,.06);
    border: 1px solid rgba(255,197,61,.3);
    border-radius: var(--r-md);
}

/* ---------- Forum ---------- */
.forum-section-list { display: flex; flex-direction: column; gap: 10px; }
.forum-section-row {
    position: relative;
    display: flex; align-items: center; gap: 16px;
    padding: 18px 22px;
    background: var(--bg-2); border: 1px solid var(--line);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.forum-section-row:hover {
    border-color: var(--pb-cyan); transform: translateY(-1px);
}
.forum-section-row .pixel-corner {
    position: absolute; top: 10px; left: 10px;
    width: 6px; height: 6px; background: var(--pb-cyan);
}

.forum-thread-list { display: flex; flex-direction: column; gap: 8px; }
.forum-thread-row {
    display: flex; gap: 16px; padding: 14px 18px;
    background: var(--bg-2); border: 1px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.forum-thread-row:hover {
    border-color: var(--pb-cyan); background: rgba(76,199,255,.02);
}

.forum-new-form, .forum-reply-form {
    background: var(--bg-2); border: 1px solid var(--line);
    border-radius: var(--r-md); padding: 16px;
    margin: 14px 0;
    display: flex; flex-direction: column; gap: 10px;
}
.forum-reply-form { margin-top: 20px; }

.forum-post-list { display: flex; flex-direction: column; gap: 12px; }
.forum-post-card {
    position: relative;
    display: grid; grid-template-columns: 140px 1fr; gap: 20px;
    padding: 18px;
    background: var(--bg-2); border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.forum-post-card.op { border-color: var(--pb-cyan); background: rgba(76,199,255,.03); }
.forum-post-card .pixel-corner {
    position: absolute; top: 10px; left: 10px;
    width: 6px; height: 6px; background: var(--pb-cyan);
}
.forum-post-author {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 8px 0; text-align: center;
}
.forum-post-head {
    width: 48px; height: 48px; border-radius: 8px;
    image-rendering: pixelated; background: var(--bg-3);
    border: 1px solid var(--line);
}
.forum-post-name {
    font-size: 13px; font-weight: 600; color: var(--fg-1);
    word-break: break-word;
}
.forum-post-rank {
    margin-top: 4px;
    font-family: var(--font-mono); font-size: 10px;
    letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
    word-break: break-word;
}
.forum-post-body { min-width: 0; }
.forum-post-text {
    white-space: pre-wrap;
    font-size: 14px; line-height: 1.5; color: var(--fg-1);
    word-break: break-word;
}
.forum-edit-area {
    width: 100%; font-family: var(--font-body); font-size: 14px;
    background: var(--bg-3); border: 1px solid var(--line);
    color: var(--fg-1); padding: 10px 12px;
    border-radius: var(--r-md); outline: none;
    resize: vertical;
}
.forum-edit-area:focus {
    border-color: var(--pb-cyan); box-shadow: 0 0 0 3px rgba(76,199,255,.18);
}

@media (max-width: 720px) {
    .forum-post-card { grid-template-columns: 1fr; gap: 12px; }
    .forum-post-author { flex-direction: row; justify-content: flex-start; padding: 0; }
    .forum-thread-row { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ---------- Likes + Action-Row ---------- */
.forum-post-actions {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    margin-top: 10px; padding-top: 8px;
    border-top: 1px dashed var(--line);
}
.forum-like-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    background: var(--bg-3); border: 1px solid var(--line);
    border-radius: 999px; color: var(--fg-2);
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: color .12s, background .12s, border-color .12s, transform .08s;
    user-select: none;
}
.forum-like-btn:hover {
    color: var(--pb-magenta);
    border-color: color-mix(in srgb, var(--pb-magenta) 45%, var(--line));
    background: color-mix(in srgb, var(--pb-magenta) 6%, var(--bg-3));
}
.forum-like-btn:active { transform: scale(.96); }
.forum-like-btn.liked {
    color: var(--pb-magenta);
    border-color: color-mix(in srgb, var(--pb-magenta) 60%, var(--line));
    background: color-mix(in srgb, var(--pb-magenta) 14%, var(--bg-3));
}
.forum-like-count { font-family: var(--font-mono); font-size: 12px; }

/* ---------- Sub-Comments ---------- */
.forum-subcomment-list {
    display: flex; flex-direction: column; gap: 10px;
    margin-left: 24px; padding-left: 18px;
    border-left: 2px solid color-mix(in srgb, var(--pb-cyan) 30%, var(--line));
    margin-top: -4px;
}
.forum-post-card.sub {
    background: var(--bg-3);
    padding: 12px 14px;
    grid-template-columns: 48px 1fr;
    gap: 12px;
}
.forum-post-card.sub .forum-post-head { width: 32px; height: 32px; border-radius: 6px; }
.forum-post-card.sub .pixel-corner { background: var(--pb-magenta); }

/* Inline-Reply-Form unterhalb eines Posts */
.forum-inline-reply {
    padding: 10px 12px 14px;
    background: color-mix(in srgb, var(--pb-cyan) 4%, var(--bg-2));
    border: 1px solid color-mix(in srgb, var(--pb-cyan) 30%, var(--line));
    border-radius: var(--r-md);
    margin-top: -4px;
}
.forum-inline-reply.indent {
    margin-left: 24px;
    margin-top: 0;
}
.forum-inline-reply textarea {
    width: 100%;
    font-family: var(--font-body); font-size: 14px;
    background: var(--bg-3); border: 1px solid var(--line);
    color: var(--fg-1); padding: 10px 12px;
    border-radius: var(--r-md); outline: none;
    resize: vertical;
}
.forum-inline-reply textarea:focus {
    border-color: var(--pb-cyan); box-shadow: 0 0 0 3px rgba(76,199,255,.18);
}

/* ---------- Team-Sektion (auf der Forum-Übersicht) ---------- */
.team-rank-heading {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-mono); font-size: 11px;
    letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
    margin-bottom: 10px;
}
.team-rank-bar {
    display: inline-block; width: 18px; height: 3px; border-radius: 2px;
}
.team-rank-count {
    margin-left: auto;
    font-family: var(--font-mono); font-size: 11px;
    color: var(--fg-3); letter-spacing: 0;
    text-transform: none; font-weight: 500;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}
.team-member-card {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 14px 14px 14px 16px;
    background: var(--bg-2); border: 1px solid var(--line);
    border-left: 3px solid var(--line-strong);
    border-radius: var(--r-md);
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.team-member-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -12px rgba(0,0,0,.6);
}
.team-member-card .pixel-corner {
    position: absolute; top: 6px; left: 6px;
    width: 5px; height: 5px;
}
.team-member-head {
    width: 48px; height: 48px; border-radius: 8px;
    image-rendering: pixelated;
    background: var(--bg-3); border: 1px solid var(--line);
    flex-shrink: 0;
    object-fit: cover;
}
.team-member-head.placeholder {
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 18px; font-weight: 700;
    color: #fff; background: var(--pb-gradient); border: 0;
}
.team-member-name {
    font-size: 14px; font-weight: 700;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.team-member-mc {
    font-size: 11px; color: var(--fg-3);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    margin-top: 2px;
}
.team-member-rank {
    font-family: var(--font-mono); font-size: 10px;
    letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
    margin-top: 4px;
}

/* ---------- Legal Pages (Impressum, Datenschutz, AGB, Refund) ---------- */
.legal-container {
    max-width: 820px;
}
.legal-text {
    color: var(--fg-2);
    font-size: 15px;
    line-height: 1.7;
}
.legal-text h2 {
    font-family: var(--font-display); font-weight: 700;
    font-size: 22px; line-height: 1.25;
    color: var(--fg-1);
    margin: 40px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.legal-text h2:first-child { margin-top: 0; }
.legal-text h3 {
    font-family: var(--font-display); font-weight: 600;
    font-size: 16px; color: var(--fg-1);
    margin: 24px 0 8px;
}
.legal-text p {
    margin: 0 0 14px;
}
.legal-text ul {
    margin: 0 0 14px; padding-left: 22px;
    display: flex; flex-direction: column; gap: 6px;
}
.legal-text li { padding-left: 4px; }
.legal-text a {
    color: var(--pb-cyan);
    text-decoration: underline; text-underline-offset: 3px;
}
.legal-text a:hover { color: var(--fg-1); }
.legal-text code {
    font-family: var(--font-mono); font-size: 13px;
    background: var(--bg-3); color: var(--fg-1);
    padding: 1px 6px; border-radius: var(--r-sm);
}
.legal-text strong { color: var(--fg-1); font-weight: 600; }
.legal-text em { color: var(--warn); font-style: normal;
    background: rgba(255,197,61,.08);
    padding: 1px 6px; border-radius: var(--r-sm);
    font-size: 13px;
}
