@font-face {
    font-family: 'Michroma';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/michroma.ttf') format('truetype');
}

/* =========================================================
   Chapter80.de – zentrales Stylesheet
   Hier werden Farben & Aussehen der ganzen Seite gesteuert.
   ========================================================= */

:root {
    --bg:        #080B12;
    --surface:   #111827;
    --surface-2: #182235;
    --border:    #263249;
    --text:      #F4F7FB;
    --text-dim:  #A7B0C0;
    --text-mut:  #6F7A8C;
    --accent:    #406AE4;
    --accent-dim:#2F55C8;
    --secondary: #22D3EE;
    --warn-acc:  #F59E0B;
    --online:    #22C55E;
    --idle:      #F59E0B;
    --dnd:       #F87171;
    --offline:   #6F7A8C;
    --live:      #F87171;
    --twitch:    #A970FF;
    --radius:    12px;
}

html { scrollbar-gutter: stable; }

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
    background-color: var(--surface);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 52px; height: 52px; border-radius: 10px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-placeholder {
    width: 52px; height: 52px; border-radius: 10px;
    background: var(--surface-2); color: var(--text-mut);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
}
.brand-name { font-family: 'Michroma', sans-serif; font-weight: 400; font-size: 18px; color: var(--text); }
.brand-slogan { font-size: 12px; color: var(--text-mut); margin-top: 2px; }

.site-nav { display: flex; gap: 4px; align-items: center; }
.nav-link {
    font-size: 14px; color: var(--text); opacity: 0.8;
    padding: 7px 14px; border-radius: 8px;
    display: inline-flex; align-items: center; line-height: 1;
}
.nav-link:hover { opacity: 1; background: var(--surface-2); }
.nav-link.active { opacity: 1; background: var(--surface-2); color: var(--accent); }

.nav-toggle {
    display: none;
    background: none; border: none; color: var(--text);
    font-size: 22px; cursor: pointer;
}

/* ---------- Main ---------- */
.site-main { flex: 1; padding: 20px 24px; max-width: 1200px; width: 100%; margin: 0 auto; }

.section-label {
    color: var(--text-dim); font-size: 13px; margin: 0 0 10px;
    display: flex; align-items: center; gap: 6px;
}

/* Zwei-Spalten-Layout: Inhalt links, Sidebar rechts */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

/* ---------- News-Karten ---------- */
.news-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); display: flex; gap: 14px; overflow: hidden;
    margin-bottom: 12px; padding: 12px; align-items: center;
}
.news-thumb {
    width: 110px; height: 110px; flex-shrink: 0;
    border-radius: 10px; overflow: hidden; background: var(--surface-2);
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card .body { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.news-card .title {
    font-size: 15px; color: var(--text); margin: 0 0 5px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card .excerpt {
    font-size: 13px; color: var(--text-dim); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card .meta { font-size: 12px; color: var(--text-mut); margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.news-card .meta .more { color: var(--secondary); font-weight: 500; }
.news-card .meta .meta-date { color: var(--text-mut); }

/* Eigener Beitrag mit großem Bild */
.post-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
.post-card img { width: 100%; max-height: 300px; object-fit: cover; display: block; }
.post-card .body { padding: 16px 18px; }
.post-card .title { font-size: 18px; color: var(--text); margin: 0 0 6px; }
.post-card .date { font-size: 12px; color: var(--text-mut); margin-bottom: 10px; }
.post-card .text { font-size: 14px; color: var(--text-dim); line-height: 1.6; white-space: pre-wrap; }

/* ---------- Member-Kacheln (Sidebar) ---------- */
.member-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    margin-bottom: 20px;
}
.member-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px; text-align: center;
    height: 145px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden;
}
.member-card .role-badge {
    font-size: 10px; color: var(--text-dim);
    background: var(--surface-2); padding: 2px 8px; border-radius: 8px;
    margin-top: 6px; max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-card .avatar {
    width: 40px; height: 40px; border-radius: 50%;
    margin: 0 auto 6px; display: block;
}
.member-card .name { font-size: 12px; color: var(--text); word-break: break-word; line-height: 1.3; }
.member-card .status { font-size: 10px; margin: 3px 0; }
.member-card .activity { font-size: 10px; color: var(--text-dim); display:flex; align-items:center; justify-content:center; gap:4px; }
.member-card .activity img { width: 14px; height: 14px; border-radius: 3px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.dot.online { background: var(--online); } .dot.idle { background: var(--idle); }
.dot.dnd { background: var(--dnd); } .dot.offline { background: var(--offline); }

/* ---------- Twitch-Liste (Sidebar) ---------- */
.twitch-item {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 9px 11px; margin-bottom: 7px;
}
.twitch-item .av { width: 34px; height: 34px; border-radius: 50%; position: relative; flex-shrink: 0; }
.twitch-item.live .info .name { color: var(--text); font-size: 13px; }
.twitch-item .info .game { color: var(--text-dim); font-size: 11px; }
.twitch-item .info { min-width: 0; flex: 1; }
.live-badge { font-size: 9px; background: var(--live); color: var(--text); padding: 2px 6px; border-radius: 6px; }
.twitch-divider { border-top: 1px solid var(--border); margin: 12px 0 10px; }
.twitch-item.offline { opacity: 0.55; padding: 8px 11px; border: none; background: none; }
.twitch-item.offline .name { color: var(--text-dim); font-size: 13px; flex: 1; }
.twitch-item.offline .off { color: var(--text-mut); font-size: 11px; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 16px 24px; display: flex; justify-content: space-between;
    align-items: center; color: var(--text-mut); font-size: 12px;
}
.footer-links a { margin-left: 14px; }
.footer-links a:hover { color: var(--text); }

/* ---------- Mobil ---------- */
@media (max-width: 850px) {
    .layout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .site-header { flex-wrap: wrap; padding: 12px 16px; }
    .nav-toggle { display: block; }
    .site-nav {
        display: none; width: 100%; flex-direction: column;
        align-items: stretch; margin-top: 10px;
    }
    body.nav-open .site-nav { display: flex; }
    .nav-link { padding: 10px 12px; }
    .site-main { padding: 16px; }
    .news-card { flex-direction: row; }
    .news-thumb { width: 90px; height: 90px; }
}

/* ---------- Discord-Seite ---------- */
.discord-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; gap: 16px;
}
.discord-join {
    background: var(--accent); color: #fff; font-size: 14px; font-weight: 500;
    padding: 9px 16px; border-radius: 8px; display: inline-flex;
    align-items: center; gap: 8px; white-space: nowrap;
}
.discord-join:hover { opacity: 0.9; }

.discord-grid {
    display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start;
}

/* Channel-Liste */
.channel-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px;
}
.channel-category {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-mut); margin: 12px 0 6px; font-weight: 500;
}
.channel-category:first-child { margin-top: 0; }
.channel-item {
    display: flex; align-items: center; gap: 7px;
    color: var(--text-dim); font-size: 14px; padding: 4px 6px; border-radius: 6px;
}
.channel-item i { font-size: 16px; color: var(--text-mut); }
.channel-item .ch-name { color: var(--text-dim); }
.voice-members {
    display: flex; flex-direction: column; gap: 3px;
    margin: 2px 0 6px 26px;
}
.voice-user {
    font-size: 12px; color: var(--accent);
    display: flex; align-items: center; gap: 6px;
}
.voice-avatar { width: 18px; height: 18px; border-radius: 50%; }

/* Online-User */
.discord-member-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.d-member-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px; text-align: center;
    height: 190px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden;
}
.d-member-card .avatar { width: 52px; height: 52px; border-radius: 50%; margin-bottom: 8px; }
.d-member-card .name { font-size: 13px; color: var(--text); word-break: break-word; line-height: 1.3; }
.d-member-card .status { font-size: 11px; margin: 4px 0; }
.d-member-card .activity { font-size: 11px; color: var(--text-dim); display:flex; align-items:center; justify-content:center; gap:4px; }
.d-member-card .activity img { width: 15px; height: 15px; border-radius: 3px; }
.d-member-card .role-badge {
    font-size: 10px; color: var(--text-dim);
    background: var(--surface-2); padding: 2px 8px; border-radius: 8px;
    margin-top: 6px; max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 850px) {
    .discord-grid { grid-template-columns: 1fr; }
}

/* ---------- Light-Mode Feinschliff ---------- */
.post-card, .news-card, .member-card, .d-member-card,
.channel-box, .discord-chat, .twitch-item:not(.offline) {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.brand-name { letter-spacing: 0.5px; }

/* =========================================================
   PEPP – Glow, Hover, Puls, Gradients
   ========================================================= */

/* Gradient + Glow auf Beitreten-Button */
.discord-join {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    color: #04121f !important;
    border: none;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.discord-join:hover {
    opacity: 1;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
    transform: translateY(-1px);
}

/* Aktiver Menüpunkt mit Gradient-Unterstrich-Look */
.nav-link.active {
    background: var(--surface-2);
    color: var(--secondary);
    box-shadow: inset 0 -2px 0 var(--secondary);
}

/* LIVE-Badge mit Glow + sanftem Pulsieren */
.live-badge {
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.6);
    animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 6px rgba(248, 113, 113, 0.4); }
    50%      { box-shadow: 0 0 14px rgba(248, 113, 113, 0.8); }
}

/* Karten heben sich an und Rand leuchtet cyan beim Hover */
.post-card, .news-card, .member-card, .d-member-card {
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.post-card:hover, .news-card:hover, .member-card:hover, .d-member-card:hover {
    transform: translateY(-2px);
    border-color: var(--secondary);
    box-shadow: 0 4px 18px rgba(34, 211, 238, 0.18);
}

/* Twitch-Item (live) Hover */
.twitch-item.live {
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.twitch-item.live:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(169, 112, 255, 0.35);
}

/* Pulsierender Online-Punkt */
.dot.online {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: onlinePulse 2s ease-out infinite;
}
@keyframes onlinePulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Header: feiner Blau→Cyan-Akzentstreifen unten */
.site-header {
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 0 rgba(64, 106, 228, 0.0);
    position: relative;
}
.site-header::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--secondary), transparent);
    animation: headerPulse 3s ease-in-out infinite;
}
@keyframes headerPulse {
    0%, 100% { opacity: 0.45; box-shadow: 0 0 4px rgba(34, 211, 238, 0.3); }
    50%      { opacity: 0.9;  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6); }
}

/* Section-Labels: Icon in Cyan */
.section-label i { color: var(--secondary); }

/* Brand-Name pulsiert langsam und weich mit Cyan-Glow */
.brand-name {
    animation: brandPulse 10s ease-in-out infinite;
}
@keyframes brandPulse {
    0%, 100% {
        color: var(--text);
        text-shadow: 0 0 0 rgba(34, 211, 238, 0);
    }
    50% {
        color: var(--secondary);
        text-shadow: 0 0 12px rgba(34, 211, 238, 0.7);
    }
}
.discord-join i { color: inherit; }

/* ---------- Formatierter News-Text (WYSIWYG) ---------- */
.post-card .text h2, .post-card .text h3, .post-card .text h4 { color: var(--text); margin: 14px 0 6px; line-height: 1.3; }
.post-card .text h2 { font-size: 18px; }
.post-card .text h3 { font-size: 16px; }
.post-card .text h4 { font-size: 15px; }
.post-card .text p { margin: 8px 0; }
.post-card .text ul, .post-card .text ol { margin: 8px 0; padding-left: 22px; }
.post-card .text li { margin: 3px 0; }
.post-card .text a { color: var(--secondary); text-decoration: underline; }
.post-card .text blockquote {
    border-left: 3px solid var(--accent); margin: 10px 0; padding: 4px 14px;
    color: var(--text-dim); background: var(--surface-2); border-radius: 0 8px 8px 0;
}
.post-card .text strong { color: var(--text); }

/* ---------- Twitch-Overlay (schwebender Player) ---------- */
.twitch-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
    padding: 20px;
}
.twitch-overlay.open { display: flex; animation: overlayFade 0.2s ease; }
@keyframes overlayFade { from { opacity: 0; } to { opacity: 1; } }

.twitch-modal {
    width: 75vw; max-width: 1400px;
    background: var(--surface); border: 1px solid var(--secondary);
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.35), 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex; flex-direction: column;
    animation: modalPop 0.22s ease;
}
@keyframes modalPop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.twitch-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.twitch-modal-head span { font-size: 15px; font-weight: 500; color: var(--text); }
.twitch-close {
    background: none; border: none; color: var(--text-dim);
    font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.twitch-close:hover { color: var(--text); }

.twitch-player {
    width: 100%; aspect-ratio: 16 / 9; background: #000;
}
.twitch-player iframe { display: block; width: 100%; height: 100%; }

.twitch-modal-foot {
    padding: 12px 16px; text-align: center; border-top: 1px solid var(--border);
}
.twitch-modal-foot a {
    color: var(--twitch); font-size: 14px;
    display: inline-flex; align-items: center; gap: 6px;
}
.twitch-modal-foot a:hover { color: var(--secondary); }

@media (max-width: 850px) {
    .twitch-modal { width: 95vw; }
}

/* ---------- Mobil: RSS-Bilder ausblenden, mehr Text ---------- */
@media (max-width: 600px) {
    .news-card { height: auto; }
    .news-thumb { display: none; }          /* RSS-Vorschaubild weg */
    .news-card .body { padding: 14px 16px; }
    .news-card .title { -webkit-line-clamp: 3; }   /* mehr Titel */
    .news-card .excerpt { -webkit-line-clamp: 5; }  /* mehr Anrisstext */
}

/* ---------- Header-Text auf Banner lesbar machen ---------- */
.brand-name {
    text-shadow: 0 1px 4px rgba(0,0,0,0.85), 0 0 2px rgba(0,0,0,0.9);
}
.brand-slogan {
    color: #c8d2e0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}
.site-nav .nav-link {
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ---------- Rechtsseiten (Impressum/Datenschutz) ---------- */
.legal { max-width: 820px; }
.legal h1 { font-size: 26px; margin: 0 0 18px; color: var(--text); }
.legal h2 { font-size: 17px; margin: 26px 0 8px; color: var(--text); }
.legal p { font-size: 14px; line-height: 1.7; color: var(--text-dim); margin: 8px 0; }
.legal ul { margin: 8px 0; padding-left: 22px; }
.legal li { font-size: 14px; line-height: 1.6; color: var(--text-dim); margin: 4px 0; }
.legal a { color: var(--secondary); text-decoration: underline; word-break: break-word; }
.legal code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 13px; color: var(--secondary); }
.legal .legal-hint {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--warn-acc); border-radius: 8px;
    padding: 10px 14px; font-size: 13px; color: var(--text-dim);
}
.legal .legal-updated { margin-top: 28px; font-size: 13px; color: var(--text-mut); }

/* ---------- Consent-Banner ---------- */
.consent-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2000;
    background: var(--surface); border: 1px solid var(--secondary);
    border-radius: 14px; padding: 16px 20px;
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.25), 0 10px 40px rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    max-width: 1000px; margin: 0 auto;
}
.consent-text strong { color: var(--text); font-size: 15px; }
.consent-text p { color: var(--text-dim); font-size: 13px; line-height: 1.5; margin: 6px 0 0; }
.consent-text a { color: var(--secondary); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-btn {
    border: none; border-radius: 8px; padding: 10px 20px;
    font-size: 14px; cursor: pointer; white-space: nowrap;
}
.consent-btn.accept { background: var(--accent); color: #fff; font-weight: 500; }
.consent-btn.accept:hover { background: var(--accent-dim); }
.consent-btn.decline { background: var(--surface-2); color: var(--text-dim); }
.consent-btn.decline:hover { color: var(--text); }

/* Platzhalter für gesperrte externe Inhalte */
.consent-placeholder {
    background: var(--surface-2); border: 1px dashed var(--border);
    border-radius: 10px; padding: 20px; text-align: center;
    color: var(--text-dim); font-size: 13px;
}
.consent-placeholder .ph-icon { font-size: 28px; color: var(--text-mut); display: block; margin-bottom: 8px; }
.consent-placeholder button {
    margin-top: 10px; background: var(--accent); color: #fff; border: none;
    border-radius: 8px; padding: 8px 16px; font-size: 13px; cursor: pointer;
}
.consent-placeholder button:hover { background: var(--accent-dim); }

@media (max-width: 700px) {
    .consent-banner { flex-direction: column; align-items: stretch; text-align: left; }
    .consent-actions { justify-content: flex-end; }
}

/* ---------- The Core (Member-Übersicht) ---------- */
.core-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 22px;
    align-items: stretch;
}
.core-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    display: grid; grid-template-columns: 120px 1fr 100px; gap: 20px; align-items: center;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    height: 100%;
}
.core-card:hover {
    transform: translateY(-2px); border-color: var(--secondary);
    box-shadow: 0 0 24px rgba(34,211,238,0.18);
}
.core-photo { width: 120px; height: 120px; border-radius: 14px; overflow: hidden; background: var(--surface-2); flex-shrink: 0; }
.core-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.core-photo-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-mut); font-size: 48px; }
.core-info { min-width: 0; }
.core-nick { font-size: 21px; font-weight: 600; color: var(--text); margin-bottom: 10px; word-break: break-word; }
.core-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 15px; color: var(--text-dim); margin-bottom: 12px; }
.core-meta i { color: var(--secondary); margin-right: 4px; }
.core-games { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.game-tag {
    background: var(--surface-2); color: var(--secondary);
    border: 1px solid var(--border); border-radius: 7px;
    padding: 4px 11px; font-size: 13px;
}
.core-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 15px; }
.core-link { color: var(--text-dim); display: inline-flex; align-items: center; gap: 5px; }
.core-link i { color: var(--secondary); }
a.core-link:hover { color: var(--secondary); }
.core-map { width: 100px; flex-shrink: 0; }
.core-map svg { width: 100%; height: auto; display: block; }

@media (max-width: 600px) {
    .core-grid { grid-template-columns: 1fr; }
    .core-card {
        grid-template-columns: 90px 1fr;
        gap: 14px 16px; padding: 18px;
    }
    .core-photo { width: 90px; height: 90px; }
    .core-map { display: none; }
}

/* ---------- Menü-Sortierung (Drag & Drop) ---------- */
.sortable-row { transition: background .15s ease; }
.drag-handle {
    cursor: grab; color: var(--text-mut); font-size: 18px;
    padding: 0 10px 0 2px; display: flex; align-items: center;
}
.drag-handle:active { cursor: grabbing; }
.drag-handle:hover { color: var(--secondary); }
.sortable-ghost { opacity: 0.4; background: var(--surface-2); }

/* ---------- Karten-Picker im Admin ---------- */
.map-picker {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px;
}
.map-picker svg .de-shape,
.map-picker svg path { transition: fill .1s ease; }

/* ---------- Discord: Letzte Nachrichten ---------- */
.discord-messages-col { margin-top: 26px; }
.msg-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px;
    display: flex; flex-direction: column;
}
.msg-item {
    padding: 10px 12px; border-radius: 8px;
}
.msg-item:nth-child(odd) { background: var(--surface-2); }
.msg-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 3px; }
.msg-author { font-weight: 600; color: var(--secondary); font-size: 14px; }
.msg-time { font-size: 12px; color: var(--text-mut); }
.msg-text { font-size: 14px; color: var(--text-dim); line-height: 1.5; word-break: break-word; }

/* ---------- Discord-Nachrichten: Medien ---------- */
.msg-media { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.msg-img {
    max-width: 240px; max-height: 200px; border-radius: 8px;
    background: var(--surface-2); display: block; object-fit: cover;
}
.msg-link {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 8px; padding: 6px 10px; font-size: 13px;
    color: var(--text-dim); max-width: 320px;
}
.msg-link:hover { color: var(--secondary); border-color: var(--secondary); }
.msg-link img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.msg-link span { display: inline-flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-link i { color: var(--secondary); }
/* Gesperrte Medien vor Consent: leerer Platzhalter */
.consent-locked[data-consent-src] {
    min-width: 120px; min-height: 80px;
    background: var(--surface-2) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="%236F7A8C" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M21 15l-5-5L5 21"/></svg>') center / 24px no-repeat;
}

/* ---------- The Core: Steam-Status ---------- */
.core-playing {
    font-size: 14px; color: var(--text-dim); margin-bottom: 8px;
    display: flex; align-items: center; gap: 7px;
}
.core-playing strong { color: var(--text); }
.play-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--ok, #4ade80); flex-shrink: 0;
    box-shadow: 0 0 8px var(--ok, #4ade80);
}
.core-recent {
    font-size: 13px; color: var(--text-mut); margin-bottom: 10px;
    display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
}
.recent-label { color: var(--text-dim); }
.recent-label i { color: var(--secondary); margin-right: 2px; }
.recent-game { color: var(--text-dim); }
.recent-game:not(:last-child)::after { content: "·"; margin-left: 6px; color: var(--text-mut); }
.recent-game em { color: var(--secondary); font-style: normal; font-size: 12px; }

/* ---------- Star Citizen: Schiffe ---------- */
.ship-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ship-search, .ship-filters select {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); padding: 9px 12px; font-size: 14px;
}
.ship-search { flex: 1; min-width: 200px; }
.ship-count { font-size: 13px; color: var(--text-mut); margin: 0 0 16px; }

.ship-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.ship-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    display: flex; flex-direction: column;
}
.ship-card:hover { transform: translateY(-3px); border-color: var(--secondary); box-shadow: 0 0 22px rgba(34,211,238,0.18); }
.ship-img { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.ship-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ship-img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-mut); font-size: 36px; }
.ship-info { padding: 12px 14px; }
.ship-name { font-size: 16px; font-weight: 600; color: var(--text); }
.ship-mfr { font-size: 13px; color: var(--text-mut); margin: 2px 0 8px; }
.ship-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ship-tags span {
    font-size: 12px; color: var(--secondary); background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px;
}

.back-link { color: var(--text-dim); font-size: 14px; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 16px; }
.back-link:hover { color: var(--secondary); }

.ship-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.ship-detail-img { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 16/9; }
.ship-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ship-detail-head h1 { font-size: 30px; margin: 0 0 4px; color: var(--text); }
.ship-detail-mfr { font-size: 16px; color: var(--text-mut); margin-bottom: 12px; }
.ship-detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.ship-detail-tags span { font-size: 13px; color: var(--secondary); background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 3px 10px; }
.ship-detail-tags .prod { color: var(--ok, #4ade80); }
.ship-price { font-size: 20px; font-weight: 600; color: var(--text); }

.ship-desc { margin-top: 22px; font-size: 15px; line-height: 1.7; color: var(--text-dim); white-space: pre-line; }

.ship-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.stat-label { display: block; font-size: 12px; color: var(--text-mut); margin-bottom: 3px; }
.stat-val { font-size: 17px; font-weight: 600; color: var(--text); }

.ship-weapons { display: flex; flex-direction: column; gap: 6px; }
.weapon-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-dim); }
.weapon-dps { color: var(--secondary); font-size: 13px; }

.ship-source { margin-top: 22px; font-size: 12px; color: var(--text-mut); }

@media (max-width: 640px) {
    .ship-detail { grid-template-columns: 1fr; }
}

/* =========================================================
   UNIVERSELLE KARTEN-GRIDS (für alle künftigen Seiten)
   Nutzung: <div class="c80-grid"> <a class="c80-card">…</a> </div>
   ========================================================= */
.c80-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    align-items: stretch;
}
.c80-grid.cols-wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.c80-grid.cols-narrow { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.c80-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    height: 100%;
}
.c80-card:hover {
    transform: translateY(-3px);
    border-color: var(--secondary);
    box-shadow: 0 0 22px rgba(34,211,238,0.18);
}
.c80-card-img { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; flex-shrink: 0; }
.c80-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c80-card-img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-mut); font-size: 36px; }
.c80-card-body { padding: 12px 14px; }
.c80-card-title { font-size: 16px; font-weight: 600; color: var(--text); }
.c80-card-sub { font-size: 13px; color: var(--text-mut); margin: 2px 0 8px; }
.c80-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.c80-tags span { font-size: 12px; color: var(--secondary); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }

/* ---------- Star Citizen: Status-Badge ---------- */
.c80-card-img { position: relative; }
.ship-status-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(8,11,18,0.82); color: var(--text-dim);
    border: 1px solid var(--border); border-radius: 6px;
    padding: 3px 9px; font-size: 11px; font-weight: 500;
    backdrop-filter: blur(4px);
}
.ship-status-badge.is-ready {
    color: #4ade80; border-color: rgba(74,222,128,0.4);
}

/* ---------- Navigation: Dropdown-Menü ---------- */
.nav-dropdown { position: relative; display: inline-flex; }
.nav-dropdown-toggle {
    cursor: default; display: inline-flex; align-items: center; gap: 4px;
}
.nav-dropdown-toggle i { font-size: 14px; transition: transform .15s ease; }
.nav-dropdown:hover .nav-dropdown-toggle i { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute; top: 100%; left: 50%;
    background: var(--surface); border: 1px solid rgba(34,211,238,0.35);
    border-radius: 10px; padding: 5px;
    min-width: 160px; display: flex; flex-direction: column; gap: 2px;
    opacity: 0; visibility: hidden; transform: translate(-50%, 2px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 0 18px rgba(34,211,238,0.15);
    z-index: 100;
}
/* unsichtbare Brücke, damit der Hover beim Runterfahren nicht abreißt */
.nav-dropdown::after {
    content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 6px;
}
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1; visibility: visible; transform: translate(-50%, 6px);
}
.site-nav .nav-dropdown-menu .nav-dropdown-link {
    color: var(--secondary); font-size: 14px;
    padding: 8px 12px; border-radius: 7px; white-space: nowrap;
    display: block; text-shadow: none;
}
.site-nav .nav-dropdown-menu .nav-dropdown-link:hover { background: var(--surface-2); color: var(--secondary); }
.site-nav .nav-dropdown-menu .nav-dropdown-link.active { background: var(--surface-2); color: var(--secondary); }

/* Mobile: Dropdown immer aufgeklappt anzeigen */
@media (max-width: 720px) {
    .nav-dropdown { flex-direction: column; align-items: flex-start; width: 100%; }
    .nav-dropdown-menu {
        position: static; left: auto; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: none; background: transparent; padding: 0 0 0 16px;
        min-width: 0;
    }
    .nav-dropdown:hover .nav-dropdown-menu { transform: none; }
    .nav-dropdown::after { display: none; }
    .nav-dropdown:hover .nav-dropdown-toggle i { transform: none; }
}

/* ---------- Paginierung ---------- */
.pagination-wrap { margin-top: 26px; }
.c80-pagination {
    display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; align-items: center;
}
.c80-page {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 11px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-dim); font-size: 14px;
    text-decoration: none; transition: border-color .15s ease, color .15s ease;
}
.c80-page:hover { border-color: var(--secondary); color: var(--secondary); }
.c80-page.active {
    background: var(--surface-2); color: var(--secondary); border-color: var(--secondary);
    font-weight: 600;
}
.c80-page.disabled { opacity: 0.35; }
.c80-page.dots { border: none; background: transparent; min-width: 20px; }
.c80-page i { font-size: 16px; }
.c80-page-info { text-align: center; font-size: 13px; color: var(--text-mut); margin-top: 12px; }

/* ---------- Item: Typ-Icon statt Bild (Tech-Kachel) ---------- */
.item-icon-ph {
    position: relative;
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px;
    background:
        linear-gradient(135deg, rgba(64,106,228,0.18), rgba(34,211,238,0.10)),
        var(--surface-2);
    overflow: hidden;
}
/* feines Tech-Raster */
.item-icon-ph::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(34,211,238,0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,211,238,0.10) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 78%);
}
/* Glow hinter dem Icon */
.item-icon-ph::after {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: 90px; height: 90px; transform: translate(-50%, -60%);
    background: radial-gradient(circle, rgba(34,211,238,0.35), transparent 70%);
    filter: blur(6px);
}
.item-icon-ph i {
    position: relative; z-index: 1;
    font-size: 46px; color: var(--secondary);
    width: 84px; height: 84px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(34,211,238,0.4); border-radius: 16px;
    background: rgba(8,11,18,0.55);
    box-shadow: inset 0 0 16px rgba(34,211,238,0.15);
}
.item-icon-ph span {
    position: relative; z-index: 1;
    font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase;
    color: var(--text-dim);
}
/* Detailseite: größer */
.ship-detail-img .item-icon-ph i { font-size: 64px; width: 120px; height: 120px; }
.ship-detail-img .item-icon-ph span { font-size: 14px; }

/* ---------- Item: Bezugsquellen-Tabelle ---------- */
.shop-table {
    display: flex; flex-direction: column; gap: 4px;
    border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.shop-row {
    display: grid; grid-template-columns: 2fr 2fr 1fr auto; gap: 12px;
    padding: 10px 14px; align-items: center; font-size: 14px;
    background: var(--surface);
}
.shop-row.shop-head {
    background: var(--surface-2); color: var(--text-mut);
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.shop-price { text-align: right; color: var(--secondary); font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) {
    .shop-row { grid-template-columns: 1fr 1fr; gap: 6px; }
    .shop-row span:nth-child(3) { display: none; } /* System auf Mobile ausblenden */
    .shop-row.shop-head span:nth-child(3) { display: none; }
}

/* ---------- Item-Filter: Checkbox ---------- */
.item-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 14px; color: var(--text-dim); cursor: pointer;
    padding: 0 6px; white-space: nowrap;
}
.item-toggle input { accent-color: var(--secondary); width: 16px; height: 16px; cursor: pointer; }

/* ---------- Starmap: Planeten & Monde ---------- */
.c80-tags span.is-ready { color: #4ade80; border-color: rgba(74,222,128,0.4); }

.body-list { display: flex; flex-direction: column; gap: 12px; }
.body-planet {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px 18px;
}
.body-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.body-icon {
    width: 34px; height: 34px; flex: 0 0 34px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); border-radius: 9px;
    border: 1px solid rgba(34,211,238,0.3);
}
.body-icon i { font-size: 18px; color: var(--secondary); }
.body-name { font-size: 16px; font-weight: 600; color: var(--text); }
.body-type, .body-faction {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
    padding: 2px 8px; border-radius: 5px; background: var(--surface-2); color: var(--text-dim);
}
.body-desc { margin: 10px 0 0; font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.body-moons { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 44px; }
.body-moon {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; color: var(--text-dim);
    background: var(--surface-2); border-radius: 6px; padding: 4px 10px;
}
.body-moon i { font-size: 13px; color: var(--secondary); opacity: 0.8; }
@media (max-width: 600px) {
    .body-moons { padding-left: 0; }
}

/* ---------- Starmap: System-Profil-Balken ---------- */
.sys-bars { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.sys-attr { display: grid; grid-template-columns: 120px 1fr 48px; gap: 12px; align-items: center; }
.sys-attr-label { font-size: 13px; color: var(--text-dim); }
.sys-attr-val { font-size: 14px; color: var(--secondary); font-weight: 600; }
.sys-bar { height: 8px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.sys-bar-fill { display: block; height: 100%; background: var(--secondary); border-radius: 5px; }
.sys-bar-fill.is-danger { background: #f87171; }
.sys-attr-num { font-size: 13px; color: var(--text-dim); text-align: right; }

/* ---------- Starmap: Orte ---------- */
.loc-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; padding-left: 44px; }
.loc-item {
    background: var(--surface-2); border-radius: 8px; padding: 8px 12px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
}
.loc-head { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.loc-head > i { color: var(--secondary); font-size: 16px; }
.loc-name { font-size: 14px; font-weight: 600; color: var(--text); }
.loc-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-mut); }
.loc-moon { font-size: 11px; color: var(--text-mut); }
.loc-moon::before { content: "Mond: "; }
.loc-services { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.loc-svc {
    font-size: 11px; color: var(--text-dim);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 5px; padding: 2px 7px;
}
@media (max-width: 600px) {
    .loc-list { padding-left: 0; }
    .sys-attr { grid-template-columns: 90px 1fr 40px; }
}

/* ---------- Starmap: Filterleiste (System-Detail) ---------- */
.map-filters {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.map-filters select {
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); border-radius: 8px; padding: 8px 12px; font-size: 14px;
}
.map-filters select:focus { outline: none; border-color: var(--secondary); }

/* ---------- Admin: Bearbeiten-Button auf Detailseiten ---------- */
.edit-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent); color: #fff;
    border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 500;
    text-decoration: none; margin: 0 0 16px auto; float: right;
}
.edit-btn:hover { filter: brightness(1.1); }
.edit-btn i { font-size: 16px; }

/* ---------- Override-Formular ---------- */
.admin-form label { display: block; margin-bottom: 14px; font-size: 14px; color: var(--text-dim); }
.admin-form input[type=text], .admin-form input[type=url], .admin-form textarea {
    width: 100%; margin-top: 5px; padding: 9px 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-size: 14px;
}
.admin-form textarea { resize: vertical; }
.admin-fieldset {
    border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 16px 0;
}
.admin-fieldset legend { padding: 0 8px; color: var(--secondary); font-size: 13px; }
.override-img-preview img {
    max-width: 280px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 8px;
}
.admin-actions { margin-top: 16px; }
.admin-danger-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- Admin: Star-Citizen-Verwaltung ---------- */
.sc-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-top: 8px; flex-wrap: wrap; }
.sc-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; color: var(--text-dim); text-decoration: none;
    border-bottom: 2px solid transparent; font-size: 14px;
}
.sc-tab:hover { color: var(--secondary); }
.sc-tab.active { color: var(--secondary); border-bottom-color: var(--secondary); }
.sc-tab i { font-size: 16px; }

.sc-search-row { display: flex; gap: 8px; margin: 18px 0 12px; }
.sc-search {
    flex: 1; max-width: 360px; padding: 9px 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-size: 14px;
}
.sc-search:focus { outline: none; border-color: var(--secondary); }

.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.sc-chip {
    font-size: 13px; padding: 6px 13px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
    text-decoration: none; transition: all .12s ease;
}
.sc-chip:hover { border-color: var(--secondary); color: var(--secondary); }
.sc-chip.active { background: var(--secondary); border-color: var(--secondary); color: #06121a; font-weight: 600; }

.sc-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.sc-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.sc-card:hover {
    transform: translateY(-3px); border-color: var(--secondary);
    box-shadow: 0 8px 22px rgba(34,211,238,0.15);
}
.sc-card-img { position: relative; aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.sc-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sc-card-icon {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(64,106,228,0.18), rgba(34,211,238,0.10)), var(--surface-2);
}
.sc-card-icon i { font-size: 38px; color: var(--secondary); opacity: 0.7; }
.sc-card-edited {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 26px; height: 26px; border-radius: 7px;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.sc-card-edited i { font-size: 14px; }
.sc-card-overlay {
    position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: rgba(8,11,18,0.72); color: var(--secondary);
    font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .12s ease;
}
.sc-card:hover .sc-card-overlay { opacity: 1; }
.sc-card-body { padding: 10px 12px; }
.sc-card-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
.sc-card-sub { font-size: 12px; color: var(--text-mut); margin-top: 2px; }

/* ---------- Admin: Navigations-Gruppen ---------- */
.admin-nav-group {
    display: block;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-mut); opacity: 0.65;
    padding: 16px 14px 6px;
    font-weight: 600;
}
.admin-nav-group:first-of-type { padding-top: 10px; }

/* ---------- Körper-Seite (System/Planet/Mond) mit Infobox ---------- */
.body-page { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.body-main { min-width: 0; }
.body-title { font-size: 30px; margin: 0 0 4px; }
.body-subtitle { color: var(--text-mut); font-size: 14px; margin-bottom: 18px; }

.body-infobox {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden; position: sticky; top: 20px;
}
.body-infobox-img { aspect-ratio: 16/10; background: var(--surface-2); }
.body-infobox-img img { width: 100%; height: 100%; object-fit: cover; }
.infobox-title {
    font-size: 18px; font-weight: 700; padding: 12px 16px 6px; color: var(--text);
}
.infobox-section {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--secondary); padding: 12px 16px 4px; font-weight: 600;
}
.infobox-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.infobox-table th, .infobox-table td { text-align: left; padding: 5px 16px; vertical-align: top; }
.infobox-table th { color: var(--text-mut); font-weight: 500; width: 45%; }
.infobox-table td { color: var(--text); }
.infobox-table tr:nth-child(odd) { background: rgba(255,255,255,0.02); }
.infobox-wiki {
    display: block; text-align: center; padding: 12px; margin-top: 6px;
    color: var(--secondary); font-size: 13px; border-top: 1px solid var(--border);
}

/* Körper-Kacheln (Planeten im System) */
.body-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.body-tile {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; text-decoration: none; transition: transform .12s ease, border-color .12s ease;
}
.body-tile:hover { transform: translateY(-3px); border-color: var(--secondary); }
.body-tile-img { aspect-ratio: 1/1; background: var(--surface-2); }
.body-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.body-tile-body { padding: 9px 11px; }
.body-tile-name { font-size: 14px; font-weight: 600; color: var(--text); }
.body-tile-sub { font-size: 11px; color: var(--text-mut); margin-top: 2px; }

/* Orts-Chips */
.loc-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.loc-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    padding: 7px 12px; font-size: 13px; color: var(--text-dim); text-decoration: none;
}
.loc-chip:hover { border-color: var(--secondary); color: var(--secondary); }
.loc-chip i { font-size: 15px; color: var(--secondary); }

@media (max-width: 820px) {
    .body-page { grid-template-columns: 1fr; }
    .body-infobox { position: static; max-width: 360px; }
}

/* ---------- Ort-Seite: Service-Karten & Orts-Liste ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.svc-card {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px;
}
.svc-card i { font-size: 22px; color: var(--secondary); }
.svc-card span { font-size: 14px; color: var(--text); }

.loc-list-full { display: flex; flex-direction: column; gap: 8px; }
.loc-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; text-decoration: none; transition: border-color .12s ease;
}
.loc-row:hover { border-color: var(--secondary); }
.loc-row-head { display: inline-flex; align-items: center; gap: 9px; }
.loc-row-head > i { font-size: 18px; color: var(--secondary); }
.loc-row-name { font-size: 15px; font-weight: 600; color: var(--text); }
.loc-row-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-mut); }

/* ---------- Schiffsvergleich (Drag & Drop, Neon) ---------- */
.cmp-hero { margin-bottom: 20px; }
.cmp-intro { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

.cmp-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.cmp-slot {
    border-radius: 14px; min-height: 210px;
    border: 1.5px dashed rgba(34,211,238,0.25);
    background: rgba(34,211,238,0.03);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    display: flex; flex-direction: column; overflow: hidden;
}
.cmp-slot.filled { border-style: solid; border-color: var(--border); background: var(--surface); }
.cmp-slot.drop-hover {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(34,211,238,0.25), 0 0 26px rgba(34,211,238,0.35);
    background: rgba(34,211,238,0.08);
}
.cmp-slot-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; flex: 1; color: var(--text-mut); text-align: center; padding: 10px;
}
.cmp-slot-placeholder i { font-size: 30px; color: rgba(34,211,238,0.5); }
.cmp-slot-placeholder span { font-size: 12px; }

.cmp-slot-card { width: 100%; display: flex; flex-direction: column; }
.cmp-slot-img { position: relative; aspect-ratio: 16/10; background: var(--surface-2); overflow: hidden; }
.cmp-slot-img img { width: 100%; height: 100%; object-fit: cover; }
.cmp-slot-x {
    position: absolute; top: 7px; right: 7px;
    width: 26px; height: 26px; border-radius: 7px; border: none; cursor: pointer;
    background: rgba(8,11,18,0.75); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.cmp-slot-x:hover { background: #f87171; }
.cmp-slot-name { font-size: 15px; font-weight: 700; padding: 9px 12px 0; }
.cmp-slot-mfr { font-size: 12px; color: var(--text-mut); padding: 0 12px 12px; }

.cmp-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp-table th, .cmp-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: none; }
.cmp-table th { color: var(--text-mut); font-weight: 500; width: 190px; background: var(--surface-2); }
.cmp-table td { color: var(--text); }
.cmp-best { color: #22D3EE !important; font-weight: 700; text-shadow: 0 0 12px rgba(34,211,238,0.5); }
.cmp-best::after { content: " ★"; font-size: 11px; }
.cmp-empty-cell { background: rgba(255,255,255,0.015); }

.cmp-bar-group { margin-bottom: 18px; }
.cmp-bar-label { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; font-weight: 600; }
.cmp-bars { display: flex; flex-direction: column; gap: 7px; }
.cmp-bar-row { display: grid; grid-template-columns: 170px 1fr 96px; gap: 10px; align-items: center; }
.cmp-bar-ship { font-size: 13px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-bar-track { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.cmp-bar-fill { display: block; height: 100%; border-radius: 7px; transition: width .4s ease; }
.cmp-bar-val { font-size: 13px; color: var(--text); text-align: right; white-space: nowrap; }

.cmp-gallery-search {
    width: 100%; max-width: 360px; margin-bottom: 14px; padding: 9px 13px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
    color: var(--text); font-size: 14px;
}
.cmp-gallery-search:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 2px rgba(34,211,238,0.15); }
.cmp-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
    max-height: 340px; overflow-y: auto; padding: 4px;
}
.cmp-gal-item {
    display: flex; align-items: center; gap: 9px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
    padding: 9px 12px; font-size: 13px; color: var(--text-dim);
    cursor: grab; transition: border-color .14s ease, color .14s ease, box-shadow .14s ease;
    user-select: none;
}
.cmp-gal-item:hover { border-color: var(--secondary); color: var(--secondary); box-shadow: 0 0 14px rgba(34,211,238,0.18); }
.cmp-gal-item:active { cursor: grabbing; }
.cmp-gal-item i { font-size: 16px; color: var(--secondary); flex-shrink: 0; }
.cmp-gal-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 720px) {
    .cmp-slots { grid-template-columns: repeat(2, 1fr); }
    .cmp-bar-row { grid-template-columns: 100px 1fr 70px; }
    .cmp-table th { width: 130px; }
}

/* ---------- Vergleich: ausgewählte Galerie-Items ---------- */
.cmp-gal-item { text-decoration: none; }
.cmp-gal-item.is-selected { border-color: var(--secondary); color: var(--secondary); opacity: 0.55; cursor: default; }
.cmp-gal-item.is-selected i { color: var(--secondary); }
.cmp-gallery-search:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Vergleich: Tabellen-Abschnitte ---------- */
.cmp-section-row th {
    background: var(--surface-2) !important;
    color: var(--secondary) !important;
    font-size: 12px !important; text-transform: uppercase; letter-spacing: 0.6px;
    font-weight: 700 !important; width: auto !important;
    padding-top: 14px; padding-bottom: 8px;
}

/* ---------- Fitting / Ausrüsten ---------- */
.fit-shipform { margin-bottom: 22px; }
.fit-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.fit-shipcol { position: sticky; top: 20px; }
.fit-shipcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.fit-shipimg { aspect-ratio: 16/10; background: var(--surface-2); }
.fit-shipimg img { width: 100%; height: 100%; object-fit: cover; }
.fit-shipname { font-size: 17px; font-weight: 700; padding: 10px 14px 2px; }
.fit-shipmfr { font-size: 12px; color: var(--text-mut); padding: 0 14px 12px; }

.fit-dpsbox {
    background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(64,106,228,0.08)), var(--surface);
    border: 1px solid rgba(34,211,238,0.35); border-radius: 14px; padding: 16px 18px; text-align: center;
}
.fit-dps-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); }
.fit-dps-value { font-size: 38px; font-weight: 800; color: var(--secondary); text-shadow: 0 0 18px rgba(34,211,238,0.5); line-height: 1.1; margin: 4px 0; }
.fit-dps-sub { display: flex; justify-content: center; gap: 16px; font-size: 12px; color: var(--text-dim); }
.fit-dps-sub strong { color: var(--text); }

.fit-slots { display: flex; flex-direction: column; gap: 10px; }
.fit-slot { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.fit-slot-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; gap: 4px; }
.fit-slot-name { font-size: 14px; font-weight: 600; color: var(--text); }
.fit-slot-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-mut); }
.fit-weapon-select {
    width: 100%; padding: 9px 12px; font-size: 14px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
}
.fit-weapon-select:focus { outline: none; border-color: var(--secondary); }

@media (max-width: 760px) {
    .fit-layout { grid-template-columns: 1fr; }
    .fit-shipcol { position: static; }
}
