/* ==========================================================================
   paganosterix.de – gemeinsames Design für alle Seiten
   Farben, Abstände & Rundungen zentral hier als Variablen anpassen.
   ========================================================================== */

:root {
    /* Farben */
    --bg:            #0b1120;
    --bg-soft:       #0f172a;
    --card:          #1e293b;
    --card-glass:    rgba(30, 41, 59, 0.6);
    --line:          rgba(148, 163, 184, 0.16);
    --line-strong:   rgba(148, 163, 184, 0.3);
    --text:          #f8fafc;
    --text-2:        #cbd5e1;
    --muted:         #94a3b8;
    --faint:         #64748b;

    --accent:        #6366f1;
    --accent-2:      #818cf8;
    --accent-cyan:   #22d3ee;
    --gold:          #eab308;
    --gold-2:        #facc15;
    --danger:        #ef4444;
    --danger-2:      #f87171;
    --ok:            #10b981;
    --ok-2:          #34d399;
    --discord:       #5865f2;

    /* Form */
    --radius-sm:     8px;
    --radius:        12px;
    --radius-lg:     18px;
    --shadow:        0 10px 30px rgba(0, 0, 0, 0.35);
    --container:     1240px;
    --font:          system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease:          cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
/* Sicherheitsnetz: nichts darf die Seite seitlich verbreitern (clip statt hidden, damit „sticky“ weiter funktioniert) */
html, body { overflow-x: clip; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.08), transparent 30%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #a5b4fc; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
code { font-size: .9em; background: rgba(148,163,184,.12); padding: .1em .35em; border-radius: 4px; }

img { max-width: 100%; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.page { flex: 1; padding-top: 32px; padding-bottom: 48px; }
.page-narrow { flex: 1; max-width: 760px; padding-top: 40px; padding-bottom: 48px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; font-size: 1.6rem; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.inline { display: inline; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* Icons ------------------------------------------------------------------ */
.icon {
    width: 1.15em; height: 1.15em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.18em;
}
.icon--fill { fill: currentColor; }
.icon--spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Panels ----------------------------------------------------------------- */
.panel, .glass {
    background: var(--card-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.panel { padding: 20px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px;
    border: 1px solid transparent; border-radius: var(--radius);
    font: inherit; font-weight: 600; font-size: .9rem;
    color: var(--text); background: var(--card);
    cursor: pointer; white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { color: #fff; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent-2); outline-offset: 2px;
}
.btn--sm { height: 36px; padding: 0 12px; font-size: .85rem; }
.btn--primary { background: var(--accent); }
.btn--primary:hover { background: #4f46e5; }
.btn--ghost { background: rgba(15, 23, 42, .6); border-color: var(--line); color: var(--text-2); }
.btn--ghost:hover { background: rgba(51, 65, 85, .6); }
.btn--danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .3); color: var(--danger-2); }
.btn--danger:hover { background: rgba(239, 68, 68, .25); color: #fecaca; }
.btn--discord { background: var(--discord); color: #fff; box-shadow: 0 4px 16px rgba(88, 101, 242, .35); }
.btn--discord:hover { background: #4752c4; }

/* Hinweise & Badges ------------------------------------------------------ */
.notice {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; margin-bottom: 20px;
    border-radius: var(--radius); border: 1px solid var(--line);
    background: rgba(30, 41, 59, .5); color: var(--text-2); font-size: .92rem;
}
.notice .icon { color: var(--accent-2); }
.notice--ok { border-color: rgba(16, 185, 129, .35); background: rgba(16, 185, 129, .08); }
.notice--ok .icon { color: var(--ok-2); }
.notice--info .icon { color: var(--accent-2); }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px;
    font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    border: 1px solid var(--line); color: var(--muted);
}
.badge--gold { color: var(--gold-2); border-color: rgba(234, 179, 8, .45); background: rgba(234, 179, 8, .1); }
.badge--wait { color: #fda4af; border-color: rgba(244, 63, 94, .35); background: rgba(244, 63, 94, .08); }

/* Kopfleiste ------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; }
.brand__home { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand__home:hover { color: #fff; }
.brand__logo { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 12px rgba(34, 211, 238, .25); }
.brand__mark {
    display: grid; place-items: center; width: 34px; height: 34px;
    border-radius: 10px; background: rgba(99, 102, 241, .18); color: var(--accent-2);
}
.brand__name {
    font-size: 1.05rem; letter-spacing: .01em;
    background: linear-gradient(90deg, var(--accent-2), var(--accent-cyan));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand__sep { color: var(--faint); font-weight: 400; }
.brand__module { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand__module:hover { color: #fff; }

.userbox { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.userchip {
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 12px 0 4px; border-radius: 999px;
    background: rgba(15, 23, 42, .6); border: 1px solid var(--line);
    font-size: .85rem; font-weight: 600; color: var(--text-2);
}
.userchip img { width: 28px; height: 28px; border-radius: 50%; }

@media (max-width: 639px) {
    .hide-sm { display: none; }
    .userchip { padding-right: 4px; }
    .brand__name { display: none; }
    .btn--discord { padding: 0 12px; }
}

/* Fußzeile --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 18px 0; color: var(--faint); font-size: .8rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Formulare -------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.input {
    width: 100%; height: 40px; padding: 0 12px;
    border-radius: var(--radius-sm); border: 1px solid #334155;
    background: var(--bg-soft); color: var(--text); font: inherit; font-size: .9rem;
    outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(99, 102, 241, .2); }
.input::placeholder { color: var(--faint); }

/* Dialoge ---------------------------------------------------------------- */
dialog.modal {
    width: min(440px, calc(100vw - 32px));
    padding: 24px; border-radius: var(--radius-lg);
    border: 1px solid #334155; background: var(--card); color: var(--text);
    box-shadow: var(--shadow);
}
dialog.modal::backdrop { background: rgba(2, 6, 23, .75); backdrop-filter: blur(4px); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal__head h2 { margin: 0; font-size: 1.15rem; }
.modal__body { display: flex; flex-direction: column; gap: 14px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* Toast-Meldungen -------------------------------------------------------- */
.toast-area { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
    padding: 12px 16px; border-radius: var(--radius);
    background: #1e293b; border: 1px solid #334155; box-shadow: var(--shadow);
    font-size: .9rem; color: var(--text-2);
    animation: toast-in .2s var(--ease);
}
.toast--error { border-color: rgba(239, 68, 68, .5); color: #fecaca; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Textseiten ------------------------------------------------------------- */
.prose h1 { font-size: 1.8rem; }
.prose h2 { font-size: 1.2rem; margin-top: 1.6em; }
.prose p { color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
    /* Ausnahme: das grüne Aufleuchten nach einem Klick bleibt als Rückmeldung erhalten */
    *:not(.is-saved):not(.is-target), *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
