/* ===========================================================
   Kartenhaus – Dark-Lounge-Theme
   Angelehnt an die bestehende Mylittleplayverse-Chat-Optik:
   dunkles Navy, leuchtende Rahmen, farbige Pill-Buttons.
   =========================================================== */

@font-face {
    font-family: 'Press Start 2P';
    src: url('/assets/fonts/PressStart2P-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Jersey15';
    src: url('/assets/fonts/Jersey15-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-app: #0A0F1C;
    --bg-panel: #101828;
    --bg-panel-alt: #16203A;
    --bg-input: #0D1424;
    --border: #26335A;
    --border-glow: #3A56A8;
    --text: #E9EDF7;
    --text-muted: #8792AC;

    --primary: #635BFF;      /* Electric Indigo – bleibt Markenfarbe */
    --sidebar-blue: #1D4ED8;
    --sidebar-blue-dark: #16348F;

    --pill-purple: #7C3AED;
    --pill-blue: #2F6FE0;
    --pill-green: #16A34A;
    --pill-orange: #E8871E;
    --pill-cyan: #17A2C9;
    --pill-red: #DC2626;
    --pill-darkred: #9F1D1D;
    --pill-gold: #D9A02C;

    --radius-card: 10px;
    --font-display: 'Press Start 2P', 'Courier New', monospace;
    --font-body: 'Jersey15', 'Courier New', monospace;
}

/* Diese Plattform ist standardmäßig dunkel, es lassen sich aber über den
   Barrierefreiheits-Umschalter (siehe unten) weitere Themes wählen. */

/* --- Theme: Hell -------------------------------------------------- */
body.theme-light {
    --bg-app: #F3F4F8;
    --bg-panel: #FFFFFF;
    --bg-panel-alt: #EEF0F6;
    --bg-input: #FFFFFF;
    --border: #D7DCE6;
    --border-glow: #9AA7D6;
    --text: #171923;
    --text-muted: #5B6270;
}

/* --- Theme: Kontrastreich (WCAG-orientiert) ------------------------ */
body.theme-contrast {
    --bg-app: #000000;
    --bg-panel: #000000;
    --bg-panel-alt: #0A0A0A;
    --bg-input: #000000;
    --border: #FFFFFF;
    --border-glow: #FFFF00;
    --text: #FFFFFF;
    --text-muted: #EEEEEE;
    --primary: #FFD400;
}
body.theme-contrast .pill, body.theme-contrast .side-btn, body.theme-contrast .btn-submit {
    outline: 2px solid #fff;
}
body.theme-contrast a { text-decoration: underline; }
body.theme-contrast .hero-banner { background: none; }

/* --- Schriftgröße --------------------------------------------------- */
body.fontsize-large { font-size: 113%; }
body.fontsize-xlarge { font-size: 128%; }

/* --- Barrierefreiheits-Umschalter (Topbar) -------------------------- */
.a11y-widget { position: relative; }
.a11y-panel {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px;
    padding: 16px; width: 240px; box-shadow: 0 14px 30px rgba(0,0,0,0.35); display: none;
}
.a11y-panel.open { display: block; }
.a11y-panel h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin: 0 0 8px; }
.a11y-panel .a11y-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.a11y-panel .a11y-group:last-child { margin-bottom: 0; }
.a11y-option {
    display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px;
    border: 1px solid var(--border); background: var(--bg-input); color: var(--text);
    cursor: pointer; font-size: 0.86rem; font-family: var(--font-body); text-align: left;
}
.a11y-option.active { border-color: var(--primary); background: rgba(99,91,255,0.15); font-weight: 700; }

* { box-sizing: border-box; }

/* --- Eigener Scrollbar-Look statt Browser-Standard, passend zum jeweils
   aktiven Theme (nutzt dieselben CSS-Variablen, läuft also automatisch
   in Hell/Dunkel/Kontrastreich mit) --------------------------------- */
* { scrollbar-width: thin; scrollbar-color: var(--primary) var(--bg-panel); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg-panel); }
*::-webkit-scrollbar-thumb {
    background: var(--primary); border-radius: 999px; border: 2px solid var(--bg-panel);
}
*::-webkit-scrollbar-thumb:hover { filter: brightness(1.2); }
*::-webkit-scrollbar-corner { background: var(--bg-panel); }

body {
    margin: 0;
    background: var(--bg-app);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.55;
}

a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Ohne das übernimmt der Browser seine eigene Standardfarbe/Unterstreichung
   für bereits besuchte Links (typischerweise lila) – sichtbar z. B. bei
   Sidebar-Buttons, die schon angeklickt wurden. */
a:visited { color: inherit; text-decoration: inherit; }

/* Sichtbarer Fokus-Rahmen für Tastaturnutzung (Barrierefreiheit) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, .pill:focus-visible, .side-btn:focus-visible {
    outline: 3px solid #FFD400; outline-offset: 2px;
}

.skip-link {
    position: absolute; left: -9999px; top: auto; background: var(--primary); color: #fff;
    padding: 10px 16px; border-radius: 6px; z-index: 999; font-weight: 700;
}
.skip-link:focus { left: 16px; top: 16px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--text); }

/* --- Pill-Buttons (Basis für Topbar & Sidebar) --------------------- */
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 0.88rem;
    border: none; cursor: pointer; color: #fff; font-family: var(--font-body);
    white-space: nowrap;
}
.pill i, .app-sidebar .side-btn i, .game-card h3 i, .row-actions button i { margin-right: 6px; }
.coin { color: var(--pill-gold); font-weight: 700; }
.coin i { margin-left: 2px; }
.app-infobar .coin i { margin-left: 2px; }
.pill:hover { filter: brightness(1.1); text-decoration: none; }
.pill-purple { background: var(--pill-purple); }
.pill-blue { background: var(--pill-blue); }
.pill-green { background: var(--pill-green); }
.pill-orange { background: var(--pill-orange); }
.pill-cyan { background: var(--pill-cyan); }
.pill-red { background: var(--pill-red); }
.pill-darkred { background: var(--pill-darkred); }
.pill-gold { background: var(--pill-gold); color: #241a00; }
.pill-block { display: flex; width: 100%; justify-content: flex-start; }
.pill[disabled] { opacity: 0.5; cursor: not-allowed; }

/* --- App-Shell: Topbar + Sidebar + Main ---------------------------- */
.app-frame {
    border: 2px solid var(--border-glow); border-radius: 12px;
    margin: 14px; min-height: calc(100vh - 28px);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(58, 86, 168, 0.25), 0 20px 60px rgba(0,0,0,0.5);
}

.app-topbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 16px; background: var(--bg-panel); border-bottom: 1px solid var(--border);
}
.app-topbar .brand {
    display: flex; align-items: center; gap: 8px; font-family: var(--font-display);
    font-weight: 700; font-size: 1.05rem; margin-right: 8px;
}
.brand-logo { height: 30px; width: 30px; object-fit: contain; }
.role-badge-img { height: 16px; vertical-align: middle; margin-left: 4px; }
.partner-badge-icon { font-size: 22px; vertical-align: middle; margin-left: 5px; color: var(--pill-blue); }
.verified-badge-img { height: 17px; vertical-align: middle; margin-left: 5px; }

/* Eigener Hover-Tooltip für Badges (statt des schlichten Browser-Titels) */
.badge-tip { position: relative; display: inline-block; }
.badge-tip::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: var(--bg-panel-alt); color: var(--text); border: 1px solid var(--border);
    padding: 6px 10px; border-radius: 6px; font-family: var(--font-display); font-size: 0.56rem;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35); z-index: 30;
}
.badge-tip::before {
    content: ''; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: var(--border);
    opacity: 0; pointer-events: none; transition: opacity 0.15s ease; z-index: 30;
}
.badge-tip:hover::after, .badge-tip:hover::before { opacity: 1; }
.app-topbar .spacer { flex: 1; }

.app-infobar {
    display: flex; align-items: center; gap: 18px; padding: 9px 16px;
    background: var(--bg-panel-alt); border-bottom: 1px solid var(--border);
    font-size: 0.88rem; color: var(--text-muted); flex-wrap: wrap;
}
.app-infobar b { color: var(--text); }
.app-infobar .coin { color: var(--pill-gold); font-weight: 700; }
.app-infobar .role-admin { color: var(--pill-red); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; }
.app-infobar .role-moderator { color: var(--pill-purple); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; }
.app-infobar .role-player { color: var(--sidebar-blue); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; }

.lang-flag-row-small { display: flex; gap: 4px; align-items: center; }
.lang-flag-btn-small { display: flex; padding: 2px; border-radius: 4px; border: 1.5px solid transparent; opacity: 0.55; transition: all 0.15s; line-height: 0; }
.lang-flag-btn-small:hover { opacity: 0.9; }
.lang-flag-btn-small.active { opacity: 1; border-color: var(--primary); background: rgba(99,91,255,0.15); }
.lang-flag-btn-small img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; display: block; }

.app-body { display: flex; flex: 1; min-height: 0; }

.app-sidebar {
    width: 260px; flex-shrink: 0; background: var(--bg-app);
    padding: 14px; display: flex; flex-direction: column; gap: 10px;
    overflow-y: auto; border-right: 1px solid var(--border);
}
.app-sidebar .side-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; text-align: right; padding: 12px 14px; border-radius: 8px;
    background: linear-gradient(180deg, var(--sidebar-blue), var(--sidebar-blue-dark));
    color: #fff; font-weight: 700; font-size: 0.92rem; border: none; cursor: pointer;
}
.app-sidebar .side-btn small { display: block; font-weight: 400; font-size: 0.75rem; opacity: 0.85; margin-top: 2px; }
.app-sidebar .side-btn.active { outline: 2px solid #fff; outline-offset: -2px; }
.app-sidebar .side-btn .tag { font-size: 0.68rem; background: rgba(255,255,255,0.25); padding: 2px 7px; border-radius: 999px; }
.app-sidebar .side-divider { height: 1px; background: var(--border); margin: 4px 0; }
.app-sidebar .side-section-label {
    font-family: var(--font-display); font-size: 0.64rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 6px; margin-top: 2px;
}

.app-main {
    flex: 1; min-width: 0; background: var(--bg-app); padding: 26px 30px; overflow-y: auto;
}

/* --- Inhaltselemente innerhalb von app-main ------------------------ */
.panel {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-card);
    padding: 22px; margin-bottom: 22px;
}
.panel h2 { font-size: 1.1rem; }
.panel .sub { color: var(--text-muted); margin-bottom: 18px; font-size: 0.92rem; }

.hero-banner {
    background: linear-gradient(120deg, rgba(99,91,255,0.16), rgba(23,162,201,0.10));
    border: 1px solid var(--border); border-radius: var(--radius-card);
    padding: 34px 30px; margin-bottom: 24px;
}
.hero-banner h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.hero-banner p { color: var(--text-muted); max-width: 520px; }

.game-hand { display: flex; gap: 14px; flex-wrap: wrap; }
.game-card {
    flex: 1 1 200px; background: var(--bg-panel-alt); border: 1px solid var(--border);
    border-radius: var(--radius-card); padding: 18px; border-left: 4px solid var(--primary);
    position: relative;
}
.game-card:nth-child(2) { border-left-color: var(--pill-purple); }
.game-card:nth-child(3) { border-left-color: var(--pill-green); }
.game-card:nth-child(4) { border-left-color: var(--pill-gold); }
.game-card h3 { font-size: 1rem; margin-bottom: 4px; color: var(--text); }
.game-card p { color: var(--text-muted); font-size: 0.86rem; margin: 0; }
.game-card-playable {
    display: block; text-decoration: none; position: relative; border-left-color: var(--pill-green) !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.game-card-playable:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.3); text-decoration: none; }
.game-card-playable .playable-tag {
    position: absolute; top: -10px; right: 14px; background: var(--pill-green); color: #fff;
    font-family: var(--font-display); font-size: 0.56rem; padding: 5px 10px; border-radius: 999px;
}

.game-fav-btn {
    position: absolute; top: 10px; right: 10px; background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 1.1rem; padding: 4px; line-height: 1; z-index: 2;
}
.game-fav-btn:hover { color: var(--pill-gold); }
.game-fav-btn.is-fav { color: var(--pill-gold); }

/* --- Stern-Menü (Favoriten + zuletzt gespielt) in der Kopfzeile --------- */
.fav-games-panel { width: 300px; }
.fav-games-section { border-bottom: 1px solid var(--border); }
.fav-games-section:last-child { border-bottom: none; }
.fav-games-section-label {
    font-family: var(--font-display); font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.03em; padding: 10px 14px 4px;
}
.fav-game-item i { color: var(--pill-gold); margin-right: 6px; }
.fav-game-row { display: flex; align-items: center; }
.fav-game-row .fav-game-item { flex: 1; }
.fav-game-remove-btn {
    background: none; border: none; cursor: pointer; color: var(--pill-gold); font-size: 0.95rem;
    padding: 8px 12px; flex-shrink: 0;
}
.fav-game-remove-btn:hover { color: var(--pill-red); }

/* --- Euli-Seite (euli.php) ------------------------------------------- */
.euli-page-messages {
    display: flex; flex-direction: column; gap: 10px; padding: 16px 4px; min-height: 320px;
    max-height: 55vh; overflow-y: auto; margin-top: 16px;
}
.euli-msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; }
.euli-msg-row-bot { align-self: flex-start; }
.euli-msg-row-user { align-self: flex-end; }
.euli-bubble-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.euli-icon-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.euli-heading-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 4px; }
.euli-msg {
    max-width: 100%; padding: 10px 14px; border-radius: 14px; font-size: 0.92rem; line-height: 1.5; word-break: break-word;
}
.euli-msg-bot { align-self: flex-start; background: var(--bg-input); border-bottom-left-radius: 4px; }
.euli-msg-user {
    align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px;
}
.euli-egg-msg { display: flex; flex-direction: column; gap: 8px; }
.euli-egg-btn {
    align-self: flex-start; border: none; border-radius: 999px; padding: 7px 16px; cursor: pointer;
    background: var(--pill-gold); color: #1a1200; font-family: var(--font-display); font-size: 0.64rem;
}
.euli-egg-btn:hover { filter: brightness(1.1); }
.euli-egg-btn:disabled { opacity: 0.7; cursor: default; }
.euli-egg-result { font-family: var(--font-display); font-size: 0.68rem; color: var(--pill-green); }
.euli-egg-result.euli-egg-fail { color: var(--pill-red); }

/* --- Drei-Punkte-Menü (Blockieren/Ignorieren) auf dem Profil ------------ */
.relation-menu-wrap { position: relative; }
.relation-menu {
    position: fixed; width: 210px; z-index: 9999;
    background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: var(--radius-card);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4); padding: 6px;
}
.relation-menu-item {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: none;
    cursor: pointer; padding: 9px 10px; font-size: 0.86rem; color: var(--text); border-radius: 6px; white-space: nowrap;
}
.relation-menu-item:hover { background: var(--bg-input); }
.relation-menu-item i { width: 16px; color: var(--text-muted); }
.relation-menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* --- Melde-Overlay auf dem Profil --------------------------------------- */
.report-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9999;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.report-overlay-box {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-card);
    padding: 22px; width: 100%; max-width: 420px;
}
.report-overlay-box h3 { margin-top: 0; }
.report-overlay-box select, .report-overlay-box textarea {
    width: 100%; margin-top: 6px; margin-bottom: 14px; padding: 10px 12px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg-input); color: var(--text); font-family: var(--font-body);
}

/* --- Meldungen (Admin-Dashboard) ----------------------------------------- */
.report-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.report-row:last-child { border-bottom: none; }
.report-row-done { opacity: 0.6; }
.report-row-head { display: flex; align-items: center; gap: 10px; }
.relation-menu-parent {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 10px; font-size: 0.86rem; border-radius: 6px; cursor: default;
}
.relation-menu-parent:hover, .relation-menu-parent.open { background: var(--bg-input); }
.relation-menu-arrow { font-size: 0.7rem; color: var(--text-muted); }
.relation-submenu {
    display: none; position: absolute; top: -6px; right: calc(100% + 6px); width: 170px;
    background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: var(--radius-card);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4); padding: 6px;
}
.relation-menu-parent:hover .relation-submenu,
.relation-menu-parent.open .relation-submenu { display: block; }
@media (max-width: 640px) {
    /* Auf schmalen Screens reicht links kein Platz für ein Untermenü –
       stattdessen unterhalb aufklappen. */
    .relation-submenu { top: calc(100% + 4px); right: 0; }
}
.euli-typing { display: flex; gap: 4px; align-items: center; padding: 14px; }
.euli-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); display: inline-block;
    animation: euli-typing-bounce 1.1s infinite ease-in-out;
}
.euli-typing span:nth-child(2) { animation-delay: 0.15s; }
.euli-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes euli-typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.euli-page-form {
    display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border);
}
.euli-page-form input {
    flex: 1; border: 1px solid var(--border); background: var(--bg-input); border-radius: 999px;
    padding: 12px 18px; color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
}
.euli-page-form input:focus { outline: none; border-color: var(--primary); }
.euli-page-form button {
    width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 50%; background: var(--primary);
    color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.euli-page-form button:hover { filter: brightness(1.1); }
@media (max-width: 640px) {
    .euli-page-messages { max-height: 45vh; }
}

/* --- "Alle Spiele"-Seite: Suchleiste + Sortierung ----------------------- */
.games-toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
.games-search-wrap {
    flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px;
    border-radius: 8px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted);
}
.games-search-wrap input {
    flex: 1; border: none; background: none; padding: 11px 0; color: var(--text); font-family: var(--font-body); font-size: 1rem;
}
.games-search-wrap input:focus { outline: none; }
#games-sort {
    padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-input);
    color: var(--text); font-family: var(--font-body); font-size: 0.95rem; min-width: 220px;
}
@media (max-width: 640px) {
    .games-toolbar { flex-direction: column; }
    #games-sort { min-width: 0; width: 100%; padding: 11px 14px; }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px 18px; border-top: 3px solid var(--primary); }
.stat-card:nth-child(2) { border-top-color: var(--pill-purple); }
.stat-card:nth-child(3) { border-top-color: var(--pill-gold); }
.stat-card:nth-child(4) { border-top-color: var(--pill-green); }
.stat-card .num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.stat-card .label { color: var(--text-muted); font-size: 0.82rem; }

/* --- Listen (Blog / FAQ) ------------------------------------------- */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.post-item .date { font-size: 0.8rem; color: var(--text-muted); }
.post-item h3 { margin: 4px 0 6px; }
.post-item h3 a { color: var(--text); }
.post-thumb-img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.post-hero-img { display: block; width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; margin: 12px 0; }

/* --- Umfragen (Polls) --------------------------------------------------- */
.poll-list { display: flex; flex-direction: column; gap: 18px; }
.poll-card { background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.poll-img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.poll-card h3 { margin: 0 0 12px; }
.poll-option-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 0.92rem; cursor: pointer; }
.poll-option-row input { width: auto; }
.poll-results { display: flex; flex-direction: column; gap: 8px; }
.poll-result-row { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; }
.poll-result-label { width: 160px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-result-bar { flex: 1; height: 12px; background: var(--bg-input); border-radius: 6px; overflow: hidden; }
.poll-result-fill { height: 100%; background: var(--primary); transition: width 0.4s; }
.poll-result-fill.mine { background: var(--pill-green); }
.poll-result-pct { width: 76px; flex-shrink: 0; text-align: right; color: var(--text-muted); }

/* --- Verifizierung -------------------------------------------------------- */
.verify-criteria { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.verify-row-top { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; }
.verify-row-val { color: var(--text-muted); }
.verify-bar { height: 12px; background: var(--bg-input); border-radius: 6px; overflow: hidden; }
.verify-bar-fill { height: 100%; background: var(--primary); transition: width 0.4s; }
.verify-bar-fill.done { background: var(--pill-green); }
.verify-pick-grid { display: flex; flex-direction: column; gap: 6px; max-width: 440px; }
.verify-pick-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.9rem; cursor: pointer; }
.verify-pick-item input { width: auto; }

/* --- Regelwerk ------------------------------------------------------------ */
.rules-page-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; list-style: none; padding: 0; }
.rules-page-list li { display: flex; align-items: center; gap: 12px; background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; font-size: 0.95rem; }
.rules-page-list li i { width: 20px; color: var(--pill-gold); text-align: center; }
.read-more-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.82rem; color: var(--primary); text-decoration: none; font-family: var(--font-display); }
.read-more-link:hover { text-decoration: underline; }

.faq-group { margin-bottom: 26px; }
.faq-group h3 { color: var(--pill-cyan); font-size: 0.95rem; margin-bottom: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 8px; background: var(--bg-panel-alt); }
.faq-item .q { font-weight: 700; margin-bottom: 4px; }
.faq-item .a { color: var(--text-muted); margin: 0; font-size: 0.92rem; }

/* --- Formulare -------------------------------------------------------- */
.form-grid { display: flex; flex-direction: column; gap: 4px; max-width: 440px; }
.form-grid label { font-size: 0.82rem; font-weight: 700; margin-top: 12px; color: var(--text-muted); }
.form-grid input, .form-grid select, .form-grid textarea {
    padding: 10px 12px; border-radius: 7px; border: 1px solid var(--border);
    background: var(--bg-input); color: var(--text); font-family: var(--font-body); font-size: 0.92rem;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: 2px solid var(--primary); }
.form-grid textarea { min-height: 130px; resize: vertical; }
.form-grid .row-inline { display: flex; gap: 10px; }
.form-grid .row-inline > * { flex: 1; }
.form-grid .check-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 500; font-size: 0.9rem; }
.form-grid .check-row input { width: auto; }
.admin-image-preview { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.admin-image-preview img { max-width: 140px; max-height: 90px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; }
.btn-submit {
    margin-top: 18px; align-self: flex-start; background: var(--primary); color: #fff; border: none;
    border-radius: 8px; padding: 11px 22px; font-weight: 700; font-size: 0.92rem; cursor: pointer; font-family: var(--font-body);
}
.btn-submit:hover { filter: brightness(1.08); }
.btn-ghost {
    margin-top: 18px; background: transparent; color: var(--text-muted); border: 1px solid var(--border);
    border-radius: 8px; padding: 11px 22px; font-weight: 700; cursor: pointer; font-family: var(--font-body);
}

/* --- Tabellen (Admin) ------------------------------------------------ */
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data-table th { text-align: left; color: var(--text-muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.data-table td { padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr.is-removing { opacity: 0.3; }

.tag-role { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.tag-role.admin { background: rgba(220,38,38,0.18); color: #F87171; }
.tag-role.moderator { background: rgba(124,58,237,0.2); color: #C4B5FD; }
.tag-role.player { background: rgba(29,78,216,0.2); color: #93C5FD; }
.tag-role.bot { background: rgba(23,162,201,0.2); color: #7DD3E8; }
.code-tag { font-family: monospace; background: var(--bg-input); padding: 2px 6px; border-radius: 5px; color: var(--pill-gold); }

.row-actions { display: flex; gap: 10px; font-size: 0.84rem; }
.row-actions button.link {
    background: none; border: none; color: var(--pill-cyan); cursor: pointer; font-size: 0.84rem;
    font-family: var(--font-body); padding: 0; text-decoration: underline;
}
.row-actions button.link.danger { color: var(--pill-red); }

/* --- Toasts (statt statischer Flash-Banner) -------------------------- */
#toast-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.toast {
    padding: 12px 18px; border-radius: 8px; font-size: 0.88rem; font-weight: 600; color: #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,0.4); min-width: 220px; animation: toast-in 0.18s ease-out;
}
.toast.success { background: var(--pill-green); }
.toast.error { background: var(--pill-red); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- Login-Karte (in den app-main eingebettet) ----------------------- */
.auth-card { max-width: 380px; margin: 40px auto; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 34px; }
.auth-card .auth-sub { color: var(--text-muted); margin-top: 2px; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg-input); border-radius: 999px; padding: 4px; margin: 18px 0; }
.auth-tabs button { flex: 1; text-align: center; padding: 8px 0; border-radius: 999px; color: var(--text-muted); font-weight: 700; font-size: 0.86rem; border: none; background: none; cursor: pointer; font-family: var(--font-body); }
.auth-tabs button.active { background: var(--primary); color: #fff; }
#auth-error { background: rgba(220,38,38,0.15); color: #F87171; padding: 10px 14px; border-radius: 8px; font-size: 0.88rem; margin-bottom: 10px; display: none; }
.auth-hint { color: var(--text-muted); font-size: 0.82rem; margin-top: 16px; text-align: center; }

.empty-note { color: var(--text-muted); font-size: 0.9rem; }

/* --- Footer mit Rechts-Links ----------------------------------------- */
.app-footer {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding: 12px 18px; border-top: 1px solid var(--border); background: var(--bg-panel);
    font-size: 0.82rem; color: var(--text-muted);
}
.app-footer .legal-links { display: flex; gap: 16px; flex-wrap: wrap; }
.app-footer .legal-links a { color: var(--text-muted); }
.app-footer .legal-links a:hover { color: var(--text); }

/* --- "Hosted by Lenterve"-Badge --------------------------------------- */
.lenterve-badge {
    display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.82rem;
}
.lenterve-badge img { height: 20px; width: auto; }
.lenterve-badge:hover { color: var(--text); text-decoration: none; }

/* --- Rechtliche Inhaltsseiten (Impressum, Datenschutz, AGB) ------------ */
.legal-content { white-space: pre-wrap; line-height: 1.7; }

@media (max-width: 860px) {
    .app-body { flex-direction: column; }
    .app-sidebar { width: 100%; flex-direction: row; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
    .app-sidebar .side-btn { flex-shrink: 0; width: auto; white-space: nowrap; text-align: left; }
    .app-sidebar .side-divider { flex-shrink: 0; width: 1px; height: auto; align-self: stretch; margin: 0 4px; }
    .app-sidebar .side-section-label { flex-shrink: 0; display: flex; align-items: center; }
    .app-main { padding: 18px; }
    .notif-panel { width: min(320px, calc(100vw - 32px)); right: -8px; }
    .a11y-panel { width: min(260px, calc(100vw - 32px)); }
}

/* ===========================================================
   Press Start 2P für alle fett gesetzten Elemente (Überschriften,
   Buttons, Badges, Labels), Jersey15 bleibt die normale Lesetextschrift.
   Press Start 2P bringt nur ein Gewicht (400) mit – font-weight wird
   daher bewusst auf 400 zurückgesetzt, damit der Browser keinen
   künstlichen Fett-Stil erzeugt (sieht bei Pixel-Fonts schlecht aus).
   =========================================================== */
h1, h2, h3,
.pill, .app-sidebar .side-btn, .app-topbar .brand, .stat-card .num,
.btn-submit, .btn-ghost, .auth-tabs button, table.data-table th,
.tag-role, .app-infobar .coin, .app-infobar .role-admin,
.app-infobar .role-moderator, .app-infobar .role-player,
.faq-item .q, .form-grid label, .a11y-option.active, .skip-link,
.auth-brand, .post-item h3, .panel h2, .stat-card .label {
    font-family: var(--font-display);
    font-weight: 400;
}

/* Press Start 2P ist deutlich breiter pro Zeichen als eine normale
   Schrift – Größe & Zeilenhöhe an kompakten Stellen leicht anpassen,
   damit nichts umbricht oder überläuft. */
h1 { line-height: 1.5; }
h2 { line-height: 1.5; font-size: 1rem; }
h3 { line-height: 1.5; font-size: 0.85rem; }
.app-topbar .brand { font-size: 0.8rem; gap: 10px; }
.app-sidebar .side-btn { font-size: 0.66rem; line-height: 1.6; padding: 14px; }
.app-sidebar .side-btn small { font-size: 0.6rem; margin-top: 6px; }
.pill { font-size: 0.66rem; padding: 11px 16px; }
.tag-role { font-size: 0.56rem; padding: 5px 10px; }
table.data-table th { font-size: 0.6rem; letter-spacing: 0.02em; }
.app-infobar { font-size: 0.72rem; }
.app-infobar .coin, .app-infobar .role-admin, .app-infobar .role-moderator, .app-infobar .role-player { font-size: 0.62rem; }
.form-grid label { font-size: 0.62rem; letter-spacing: 0.02em; }
.btn-submit, .btn-ghost { font-size: 0.66rem; padding: 13px 22px; }
.auth-tabs button { font-size: 0.6rem; padding: 10px 4px; }
.faq-item .q { font-size: 0.72rem; line-height: 1.5; }
.stat-card .num { font-size: 1.3rem; }
.stat-card .label { font-size: 0.6rem; }

/* ===========================================================
   Chat + Voice-Chat
   =========================================================== */
.chat-layout { display: flex; height: 620px; }
.chat-room-list-col {
    width: 220px; flex-shrink: 0; background: var(--bg-panel-alt); border-left: 1px solid var(--border);
    display: flex; flex-direction: column; min-height: 0;
}
.chat-room-list {
    flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 0;
}
.chat-online-toggle-btn {
    display: flex; align-items: center; gap: 8px; margin: 0 12px 12px; padding: 9px 10px; border-radius: 7px;
    border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted);
    font-family: var(--font-display); font-size: 0.72rem; cursor: pointer; flex-shrink: 0;
}
.chat-online-toggle-btn:hover { color: var(--primary); border-color: var(--primary); }
.chat-online-panel { flex-direction: column; min-height: 0; flex: 1; }
.chat-online-panel-header {
    display: flex; align-items: center; justify-content: space-between; padding: 12px;
    border-bottom: 1px solid var(--border); font-family: var(--font-display); font-size: 0.76rem; flex-shrink: 0;
}
.chat-online-panel-header .link { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.72rem; }
.chat-online-panel-header .link:hover { color: var(--primary); }
.chat-rules-panel-list { display: flex; flex-direction: column; gap: 6px; padding: 10px; overflow-y: auto; }
.chat-rule-row { display: flex; align-items: center; gap: 10px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; font-size: 0.78rem; }
.chat-rule-row i { width: 16px; color: var(--pill-gold); text-align: center; flex-shrink: 0; }
#chat-online-panel-list { overflow-y: auto; padding: 10px 12px; flex: 1; }
.chat-room-section { font-family: var(--font-display); font-size: 0.64rem; color: var(--text-muted); margin: 12px 6px 6px; text-transform: uppercase; }
.chat-room-section:first-child { margin-top: 2px; }
.chat-room-btn {
    display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 7px; border: none;
    background: transparent; color: var(--text-muted); font-family: var(--font-body); font-size: 0.98rem;
    cursor: pointer; text-align: left; width: 100%;
}
.chat-room-btn:hover { background: var(--hover); color: var(--text); }
.chat-room-btn.active { background: var(--primary); color: #fff; }
.chat-room-btn i { width: 16px; text-align: center; }

.chat-panel { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header {
    padding: 14px 18px; border-bottom: 1px solid var(--border); font-family: var(--font-display);
    font-size: 0.9rem; display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.chat-header .voice-join-btn { font-size: 0.68rem; padding: 9px 16px; }

.chat-voice-bar {
    padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--bg-panel-alt);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.voice-participant {
    display: flex; align-items: center; gap: 6px; background: var(--bg-input); padding: 6px 12px;
    border-radius: 999px; font-size: 0.76rem; font-family: var(--font-display); border: 2px solid transparent;
}
.voice-participant.speaking { border-color: var(--pill-green); }
.voice-participant .mic-off { color: var(--pill-red); }
.voice-participant.self { background: rgba(99,91,255,0.18); }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; position: relative; }
.chat-msg:hover .msg-menu-trigger { opacity: 1; pointer-events: auto; }
.msg-menu-trigger {
    position: absolute; top: 2px; right: 4px; opacity: 0; pointer-events: none; transition: opacity 0.15s;
    background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted);
    width: 24px; height: 24px; cursor: pointer; font-size: 0.8rem;
}
.msg-menu-trigger:hover { color: var(--text); background: var(--bg-input); }
.chat-msg .bubble .text.deleted-msg { color: var(--text-muted); font-style: italic; font-size: 0.85rem; }
.chat-msg .chat-avatar-link { flex-shrink: 0; margin-top: 2px; }
.chat-msg .author { font-family: var(--font-display); font-size: 0.74rem; }
.chat-msg .author .badge-tip { margin-left: 2px; }
.chat-msg .author .role-badge-img { height: 14px; }
.chat-msg .author .partner-badge-icon { font-size: 15px; }
.chat-msg .author .verified-badge-img { height: 14px; }
.chat-msg .author.role-admin { color: #F87171; }
.chat-msg .author.role-moderator { color: #C4B5FD; }
.chat-msg .author.role-player { color: #93C5FD; }
.chat-msg .author.role-bot { color: var(--primary); }
.bot-tag {
    font-family: var(--font-display); font-size: 0.5rem; background: var(--primary); color: #fff;
    padding: 1px 6px; border-radius: 999px; margin-left: 4px; vertical-align: middle;
}
.euli-chat-avatar { border: 2px solid var(--primary); }
.euli-chat-bubble { border: 2px solid var(--primary); border-radius: 10px; padding: 8px 12px; }
.chat-msg .bubble { flex: 1; }
.chat-msg .bubble .text { font-size: 1.05rem; line-height: 1.5; word-break: break-word; color: #FFA500; }
.chat-msg .time { font-size: 0.72rem; color: var(--text-muted); margin-left: 8px; }
.chat-msg.system { justify-content: center; text-align: center; color: var(--text-muted); font-size: 0.82rem; font-style: italic; }
.chat-msg.mine .bubble { background: rgba(99,91,255,0.12); border-radius: 10px; padding: 8px 12px; }
.chat-msg.stacked { margin-top: -6px; }
.chat-msg.stacked .bubble { position: relative; }
.chat-msg.stacked:hover .bubble::before {
    content: attr(data-time); position: absolute; left: -48px; top: 3px; width: 42px;
    text-align: right; font-size: 0.62rem; color: var(--text-muted);
}

.chat-composer { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); position: relative; }
.chat-composer input {
    flex: 1; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-input); color: var(--text); font-family: var(--font-body); font-size: 1.05rem;
}
.chat-composer input:disabled { opacity: 0.5; }
.chat-composer button { margin-top: 0; }

/* ===========================================================
   Slash-Befehle: Discord-artiges Autocomplete + Argument-Hinweise
   =========================================================== */
.chat-cmd-popup {
    position: absolute; bottom: 100%; left: 18px; right: 18px; margin-bottom: 8px;
    background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: var(--radius-card);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.4); overflow-y: auto; max-height: 260px; z-index: 60;
}
.chat-cmd-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.chat-cmd-item:last-child { border-bottom: none; }
.chat-cmd-item:hover, .chat-cmd-item.active { background: rgba(99, 91, 255, 0.14); }
.chat-cmd-item i { width: 18px; text-align: center; color: var(--pill-blue); flex-shrink: 0; }
.chat-cmd-item .name { font-family: var(--font-display); font-size: 0.78rem; white-space: nowrap; }
.chat-cmd-item .desc { color: var(--text-muted); font-size: 0.72rem; margin-left: auto; text-align: right; }
.chat-cmd-hint {
    position: absolute; bottom: 100%; left: 18px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px; background: var(--bg-panel-alt);
    border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font-size: 0.74rem; z-index: 59;
}
.chat-cmd-hint .arg { color: var(--text-muted); padding: 3px 9px; border-radius: 999px; }
.chat-cmd-hint .arg.current { color: #fff; background: var(--pill-blue); font-weight: 700; }
.chat-cmd-hint .sep { opacity: 0.35; }

@media (max-width: 860px) {
    .chat-layout { flex-direction: column; height: auto; }
    .chat-room-list-col { width: 100%; border-left: none; border-top: 1px solid var(--border); }
    .chat-room-list { flex-direction: row; overflow-x: auto; }
    .chat-messages { height: 380px; }
}

/* ===========================================================
   Profile & Avatare
   =========================================================== */
.avatar-img { border-radius: 50%; object-fit: cover; border: 2px solid var(--border); display: inline-block; vertical-align: middle; }
.avatar-fallback {
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    color: #fff; font-family: var(--font-display); font-weight: 400; flex-shrink: 0; vertical-align: middle;
}
.profile-header { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile-avatar-block { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.profile-avatar-block .pill { font-size: 0.56rem; padding: 8px 12px; }
.profile-identity h1 { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.profile-meta { color: var(--text-muted); font-size: 0.82rem; margin-top: 8px; }
.profile-social-icon {
    display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    border-radius: 8px; background: var(--bg-input); border: 1px solid var(--border);
    font-size: 1.05rem; transition: transform 0.15s;
}
.profile-social-icon:hover { transform: translateY(-2px); border-color: currentColor; }
.chat-msg .author a { color: inherit; }
.chat-msg .author a:hover { text-decoration: underline; }

/* --- Sprachkanal-Statusanzeige in der Topbar (auf jeder Seite sichtbar) --- */
.voice-status-pill {
    display: none; align-items: center; gap: 8px; background: rgba(22,163,74,0.18); color: #4ADE80;
    padding: 8px 14px; border-radius: 999px; font-size: 0.6rem; font-family: var(--font-display);
}
.voice-status-pill.active { display: inline-flex; }
.voice-status-pill button {
    background: none; border: none; color: #F87171; cursor: pointer; font-family: var(--font-display);
    font-size: 0.6rem; text-decoration: underline; padding: 0;
}

/* ===========================================================
   Benachrichtigungsglocke
   =========================================================== */
.notif-bell-wrap { position: relative; }
.notif-bell-btn {
    position: relative; background: none; border: none; color: var(--text); cursor: pointer;
    font-size: 1.1rem; padding: 4px 6px; display: flex; align-items: center;
}
.notif-bell-btn:hover { color: var(--primary); }
.notif-bell-badge {
    position: absolute; top: -4px; right: -2px; background: var(--pill-red); color: #fff;
    font-size: 0.6rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px; font-family: var(--font-display);
}
.notif-panel {
    position: absolute; top: calc(100% + 10px); right: 0; width: 320px; max-height: 400px;
    background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: var(--radius-card);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4); z-index: 200; overflow: hidden; display: flex; flex-direction: column;
}
.notif-panel-header {
    display: flex; align-items: center; justify-content: space-between; padding: 10px 14px;
    border-bottom: 1px solid var(--border); font-family: var(--font-display); font-size: 0.76rem;
}
.notif-panel-header .link { color: var(--pill-red); background: none; border: none; cursor: pointer; font-size: 0.7rem; }
.notif-panel-list { overflow-y: auto; }
.notif-item {
    display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; text-decoration: none;
    color: var(--text); border-bottom: 1px solid var(--border); font-size: 0.82rem;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-input); }
.notif-item.unread { background: rgba(99,91,255,0.10); }
.notif-item.unread .notif-item-msg::before { content: "●"; color: var(--primary); margin-right: 6px; font-size: 0.6rem; }
.notif-item-time { font-size: 0.68rem; color: var(--text-muted); }

.voice-limit-note {
    background: rgba(245,184,61,0.14); border: 1px solid var(--pill-gold); color: var(--pill-gold);
    padding: 10px 14px; border-radius: 8px; font-size: 0.86rem; margin-bottom: 14px;
}

/* --- Eigenständiges Sprachkanal-Popup-Fenster --------------------------- */
.voice-popup-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; min-height: 100vh; }
.voice-popup-body h1 { font-size: 1.05rem; }
.voice-popup-participants { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.voice-popup-actions { display: flex; gap: 10px; }

/* ===========================================================
   Bilder im Chat + Lightbox
   =========================================================== */
.chat-image-btn {
    display: flex; align-items: center; justify-content: center; width: 42px; flex-shrink: 0;
    border-radius: 8px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted);
    cursor: pointer; font-size: 1rem;
}
.chat-image-btn:hover { color: var(--primary); border-color: var(--primary); }

.chat-voice-btn {
    display: flex; align-items: center; justify-content: center; width: 42px; flex-shrink: 0;
    border-radius: 8px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted);
    cursor: pointer; font-size: 1rem;
}
.chat-voice-btn:hover { color: var(--primary); border-color: var(--primary); }
.chat-voice-btn.recording { background: var(--pill-red); color: #fff; border-color: var(--pill-red); animation: voice-rec-pulse 1.4s ease-in-out infinite; }
@keyframes voice-rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
#chat-voice-recording { font-family: var(--font-display); font-size: 0.72rem; color: var(--pill-red); white-space: nowrap; }

.voice-msg { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.voice-msg audio { height: 34px; max-width: 240px; }
.voice-msg-duration { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-display); }

.chat-typing-indicator {
    padding: 4px 18px; font-size: 0.72rem; color: var(--text-muted); font-style: italic; min-height: 1.2em;
}

.chat-online-title { font-family: var(--font-display); font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.chat-online-list { display: flex; flex-direction: column; gap: 6px; }
.chat-online-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 0.8rem; }
.chat-online-item:hover { background: var(--bg-input); }

.chat-msg .attachment {
    display: block; max-width: 280px; max-height: 280px; border-radius: 10px; margin-top: 6px;
    cursor: zoom-in; border: 1px solid var(--border);
}
.chat-msg .attachment.uploading { opacity: 0.5; }

.lightbox-overlay {
    position: fixed; inset: 0; background: rgba(5,7,14,0.9); display: none;
    align-items: center; justify-content: center; z-index: 1000; cursor: zoom-out; padding: 30px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }

/* ===========================================================
   Private Räume, temporäre Sprachkanäle, Mitgliederverwaltung
   =========================================================== */
.chat-room-create-btn {
    border: 1px dashed var(--border); color: var(--text-muted);
}
.chat-room-create-btn:hover { border-color: var(--primary); color: var(--primary); background: transparent; }

.chat-members-bar {
    padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--bg-panel-alt);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.members-list { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===========================================================
   Freunde: Liste mit Online-Status/Aktivität, Anfragen
   =========================================================== */
.friend-list { display: flex; flex-direction: column; gap: 4px; }
.friend-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px;
    border-bottom: 1px solid var(--border);
}
.friend-item:last-child { border-bottom: none; }
.friend-avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; text-decoration: none; }
.presence-dot {
    position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid var(--bg-panel); background: #5B6270; /* offline */
}
.presence-dot.status-online, .presence-dot.status-chat { background: #4ADE80; }
.presence-dot.status-voice { background: #17A2C9; }
.presence-dot.status-game { background: var(--pill-gold); }
.friend-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.friend-name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.friend-name a { color: inherit; text-decoration: none; }
.friend-name a:hover { text-decoration: underline; }
.friend-presence { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.friend-presence.status-online i, .friend-presence.status-chat i { color: #4ADE80; }
.friend-presence.status-voice i { color: #17A2C9; }
.friend-presence.status-game i { color: var(--pill-gold); }
.friend-actions { display: flex; gap: 6px; flex-shrink: 0; }
.friend-actions .pill { font-size: 0.6rem; }

/* ===========================================================
   Münz-Shop: Karten-Grid + Vorschau, Profil-Hero-Hintergrund
   =========================================================== */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.shop-card { border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; background: var(--bg-panel-alt); }
.shop-preview { height: 90px; }
.shop-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.shop-price { font-size: 0.78rem; color: var(--text-muted); }
.shop-card-body .pill { align-self: flex-start; margin-top: 2px; }

.shop-filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.shop-search-input {
    flex: 1; min-width: 180px; padding: 9px 12px; border-radius: 8px; border: 1.5px solid var(--border);
    background: var(--bg-input); color: var(--text); font-family: var(--font-body); font-size: 14px; outline: none;
}
.shop-search-input:focus { border-color: var(--primary); }
.shop-filter-pills { display: flex; gap: 8px; }
.shop-filter-pill {
    background: var(--bg-input); border: 1.5px solid var(--border); color: var(--text-muted); cursor: pointer;
    padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; transition: all 0.15s;
}
.shop-filter-pill:hover { border-color: var(--primary); color: var(--text); }
.shop-filter-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Wenn ein eigener Profil-Hintergrund aktiv ist (siehe #main-content-Style
   direkt in profile.php), werden die Kacheln nur leicht transparent, damit
   der Hintergrund dahinter durchscheint – die Fläche selbst wird nicht mehr
   hier, sondern direkt auf #main-content gesetzt (siehe profile.php). */
.profile-content-wrap.has-bg .panel {
    background: rgba(10, 14, 26, 0.68);
    backdrop-filter: blur(3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

@keyframes shop-bg-aurora { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shop-bg-sunset { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shop-bg-forest { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shop-bg-cybergrid { 0% { background-position: 0 0, 0 0; } 100% { background-position: 28px 28px, 28px 28px; } }
@keyframes shop-bg-gold { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes shop-bg-easter { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shop-bg-galaxy {
    0%   { background-position: 0px 0px,0px 0px,0px 0px,0px 0px,0px 0px,0px 0px,0px 0px,0px 0px, 0% 50%; }
    50%  { background-position: -100px -100px,-100px -100px,-100px -100px,-100px -100px,-100px -100px,-100px -100px,-100px -100px,-100px -100px, 100% 50%; }
    100% { background-position: -200px -200px,-200px -200px,-200px -200px,-200px -200px,-200px -200px,-200px -200px,-200px -200px,-200px -200px, 0% 50%; }
}
@keyframes shop-bg-lava { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shop-bg-vaporwave { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shop-bg-glassbg { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shop-bg-ocean { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shop-bg-rainbow { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes egg-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }

/* ===========================================================
   Farbiger/animierter Name (Münz-Shop-Feature)
   =========================================================== */
.name-flair {
    background-image: linear-gradient(90deg, var(--nc1), var(--nc2));
    background-clip: text; -webkit-background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
    display: inline-block;
}
.name-flair.anim-spin {
    background-image: linear-gradient(90deg, var(--nc1), var(--nc2), var(--nc1));
    background-size: 200% auto;
    animation: name-flair-spin 3s linear infinite;
}
.name-flair.anim-shine {
    background-image: linear-gradient(100deg, var(--nc1) 0%, var(--nc2) 25%, #ffffff 50%, var(--nc1) 75%, var(--nc2) 100%);
    background-size: 250% auto;
    animation: name-flair-shine 2.5s ease-in-out infinite;
}
@keyframes name-flair-spin { from { background-position: 0% center; } to { background-position: -200% center; } }
@keyframes name-flair-shine { 0% { background-position: 0% center; } 100% { background-position: -250% center; } }
.username-sub { color: var(--text-muted); font-size: 0.7em; font-weight: 400; }
.xp-badge {
    display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 0.62em;
    color: var(--pill-gold); background: rgba(245,184,61,0.16); border: 1px solid var(--pill-gold);
    padding: 1px 7px; border-radius: 999px; vertical-align: middle; margin-left: 2px;
}
.xp-progress-bar { width: 220px; max-width: 100%; height: 6px; border-radius: 999px; background: var(--bg-input); overflow: hidden; margin-top: 4px; }
.xp-progress-fill { height: 100%; background: linear-gradient(90deg, var(--pill-gold), #FFD97A); }

.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.achievement-badge {
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
    padding: 16px 10px; border-radius: 10px; border: 1px solid var(--border); font-size: 0.72rem;
}
.achievement-badge i { font-size: 1.3rem; }
.achievement-badge.earned { background: rgba(245,184,61,0.12); border-color: var(--pill-gold); color: var(--pill-gold); }
.achievement-badge.locked { opacity: 0.35; filter: grayscale(1); }

.highscore-list { display: flex; flex-direction: column; }
.highscore-row {
    display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-bottom: 1px solid var(--border);
}
.highscore-row:last-child { border-bottom: none; }
.highscore-row.me { background: rgba(99,91,255,0.10); border-radius: 8px; }
.highscore-rank { width: 34px; flex-shrink: 0; text-align: center; font-family: var(--font-display); font-size: 0.9rem; color: var(--text-muted); }
.highscore-row.top-1 .highscore-rank { color: #FFD700; font-size: 1.3rem; }
.highscore-row.top-2 .highscore-rank { color: #C0C0C0; font-size: 1.2rem; }
.highscore-row.top-3 .highscore-rank { color: #CD7F32; font-size: 1.2rem; }
.highscore-avatar { flex-shrink: 0; }
.highscore-name { flex: 1; min-width: 0; }
.highscore-name a { color: var(--text); text-decoration: none; }
.highscore-name a:hover { text-decoration: underline; }
.highscore-xp { font-family: var(--font-display); font-size: 0.72rem; color: var(--pill-gold); flex-shrink: 0; }
