/* ==========================================================================
   AN Manager – AuroraNetworks Design System
   Entspricht forum.auroranetworks.de
   ========================================================================== */

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

/* --------------------------------------------------------------------------
   1. Variables (AuroraNetworks offiziell)
   -------------------------------------------------------------------------- */
:root {
    --bg: #060608;
    --surface: #161820;
    --surface-alt: #202430;
    --accent: #5A96FF;
    --accent-hover: #6EAAFF;
    --accent-dim: rgba(90, 150, 255, 0.2);
    --gold: #FFD700;
    --success: #50C878;
    --danger: #E14B4B;
    --text-primary: #EBEBF0;
    --text-dim: #8C9BAF;
    --text-muted: #505A6E;
    --divider: #282C38;
    --card: #121218;
    --font: 'Roboto', sans-serif;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   3. Layout – Gaming-Dashboard (Sidebar + Main-Wrapper)
   -------------------------------------------------------------------------- */

/* App-Layout: Grid mit fester Sidebar links */
.app-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--surface-alt);
    border-right: 1px solid var(--divider);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar__logo {
    padding: 0 1.25rem 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.15s ease;
}

.sidebar__logo:hover {
    color: var(--accent);
}

.sidebar__nav-group {
    padding: 0 0.75rem;
}

.sidebar__nav-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0.5rem;
}

.sidebar__nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar__nav-list li {
    margin: 0;
}

.sidebar__nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar__nav-link:hover,
.sidebar__nav-link:focus {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar__nav-link--active {
    color: var(--accent);
    background: var(--accent-dim);
}

.sidebar__nav-link i {
    width: 1.25rem;
    text-align: center;
    opacity: 0.9;
}

/* Server-Status + Connect in der Sidebar (nur Mobile) */
.sidebar__server-mobile {
    display: none;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-height: 100vh;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    background-color: var(--surface-alt);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--divider);
}

.topbar__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.topbar__burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1.25rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.topbar__burger:hover,
.topbar__burger:focus {
    color: var(--accent);
    background: var(--accent-dim);
}

.topbar__breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__breadcrumbs a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
}

.topbar__breadcrumbs a:hover {
    color: var(--accent);
}

.topbar__breadcrumbs-sep {
    margin: 0 0.35rem;
    color: var(--text-muted);
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Server-Status + Connect in der Topbar (Desktop) */
.topbar__server {
    display: flex;
    align-items: center;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
}

.topbar__server-status {
    display: flex;
    align-items: center;
    gap: 0.25rem 0.5rem;
    color: var(--text-dim);
}

.topbar__server-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.topbar__server-dot--online {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.topbar__server-dot--offline {
    background: var(--danger);
}

.topbar__server-label {
    color: var(--text-muted);
}

.topbar__server-value {
    font-weight: 600;
    color: var(--text-primary);
}

.topbar__server-value--online {
    color: var(--success);
}

.topbar__server-value--offline {
    color: var(--danger);
}

.topbar__server-sep {
    margin: 0 0.15rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.topbar__connect {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.topbar__connect i {
    font-size: 1rem;
}

.topbar__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    background: var(--divider);
}

.topbar__avatar-placeholder {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--divider);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.topbar__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1.125rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.topbar__logout:hover,
.topbar__logout:focus {
    color: var(--danger);
    background: rgba(225, 75, 75, 0.15);
}

.content-area {
    flex: 1;
    padding: 1.5rem;
    background: var(--bg);
    overflow-y: auto;
}

.content-area .page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Footer */
.app-footer {
    padding: 0.75rem 1.5rem;
    background: var(--surface-alt);
    border-top: 1px solid var(--divider);
    margin-top: auto;
}

.app-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.app-footer__brand {
    font-weight: 600;
    color: var(--text-dim);
}

.app-footer__sep {
    opacity: 0.6;
}

.app-footer__link {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
}

.app-footer__link:hover {
    color: var(--accent);
}

.app-footer__copy {
    color: var(--text-muted);
}

/* Sidebar Backdrop (Mobile) */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

body.sidebar-open .sidebar-backdrop {
    pointer-events: auto;
    opacity: 1;
}

/* Responsive: Sidebar als Drawer */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
    }

    .topbar__burger {
        display: flex;
    }

    .topbar__server {
        display: none;
    }

    .sidebar__server-mobile {
        display: block;
        padding: 0 1rem 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--divider);
    }

    .sidebar__server-mobile-status {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.25rem 0.5rem;
        font-size: 0.8125rem;
        color: var(--text-dim);
        margin-bottom: 0.5rem;
    }

    .sidebar__server-mobile-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .sidebar__server-mobile-dot--online {
        background: var(--success);
    }

    .sidebar__server-mobile-dot--offline {
        background: var(--danger);
    }

    .sidebar__server-mobile-sep {
        margin: 0 0.15rem;
        opacity: 0.7;
    }

    .sidebar__server-mobile-connect {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.5rem 0.75rem;
        background: var(--accent-dim);
        color: var(--accent);
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.875rem;
        text-decoration: none;
        transition: background 0.15s ease, color 0.15s ease;
    }

    .sidebar__server-mobile-connect:hover {
        background: var(--accent);
        color: #fff;
    }

    .content-area {
        padding: 1rem;
    }

    .app-footer {
        padding: 0.5rem 1rem;
    }

    .app-footer__inner {
        font-size: 0.75rem;
    }
}

/* Legacy topbar/logo/nav (wenn ohne .app-layout verwendet) */
.topbar__logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.15s ease;
}

.topbar__logo:hover {
    color: var(--accent);
}

.topbar__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 1rem;
}

.topbar__nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.15s ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus {
    color: var(--accent);
}

.main {
    flex: 1;
    padding: 1.5rem;
}

.page-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Legacy: .header / .nav (falls noch verwendet) */
.header { background-color: var(--surface-alt); padding: 1rem 2rem; border-bottom: 1px solid var(--divider); }
.header h1 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.nav { margin-top: 0.5rem; }
.nav a { color: var(--text-dim); text-decoration: none; margin-right: 1rem; font-weight: 500; transition: color 0.15s ease; }
.nav a:hover, .nav a:focus { color: var(--accent); }

/* Login-Seite: zentriertes Formular (nur für Gäste) */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 2rem;
}

.login-form-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--card);
    border: 1px solid var(--divider);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    text-align: center;
}

.login-form-card__brand {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.login-form-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.login-form-card__text {
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-dim);
}

.login-form-card__btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-size: 1rem;
}

/* Startseite für Gäste – Logo + Willkommen + Anmelden */
.start-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 2rem;
}

.start-page__hero {
    width: 100%;
    max-width: 480px;
    text-align: center;
    padding: 2.5rem 2rem;
}

.start-page__brand {
    margin-bottom: 1.5rem;
}

.start-page__logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.start-page__title {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.start-page__text {
    margin: 0 0 1.75rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-dim);
}

.start-page__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.start-page__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-width: 220px;
}

.start-page__link {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s ease;
}

.start-page__link:hover {
    color: var(--accent);
}

/* Minimal layout (Wartungsseite) */
body.layout-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    padding: 2rem;
}

.minimal__content {
    text-align: center;
    max-width: 420px;
}

/* Error-Seiten (404 / 500) */
.error-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.error-card__title {
    margin: 0 0 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.error-card__text {
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-dim);
}

.error-card__btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.15s ease;
}

.error-card__btn:hover {
    background: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   4. Components
   -------------------------------------------------------------------------- */

/* Flash messages */
.flash {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid;
}

.flash--success {
    background: rgba(80, 200, 120, 0.15);
    color: var(--success);
    border-color: var(--success);
}

.flash--error {
    background: rgba(225, 75, 75, 0.15);
    color: var(--danger);
    border-color: var(--danger);
}

.flash--info {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

/* Buttons (primär = Accent) */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-family: var(--font);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.btn--small {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

.btn--icon {
    padding: 0.4rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn--icon:hover {
    background-color: var(--accent-hover);
}

.auth-error {
    background: rgba(225, 75, 75, 0.15);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid var(--danger);
}

/* Card – Gaming-Dashboard: weiche Schatten, runde Ecken, kein dicker Header */
.card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border: none;
}

.card-body {
    padding: 1.25rem 1.5rem;
}

.card-header {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-dim);
    background: transparent;
    border-bottom: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-header:not(:last-child) {
    padding-bottom: 0.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--divider);
}

.refresh-form {
    display: inline-flex;
    align-items: center;
}
.refresh-form .btn--small {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

/* Legacy card parts (weiterhin unterstützt) */
.card__title {
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent);
    background-color: var(--bg);
    border-bottom: 1px solid var(--divider);
    border-top: 2px solid var(--accent);
}

.card__body {
    padding: 1rem;
    background-color: var(--surface);
}

/* Dashboard */
.dashboard {
    max-width: 900px;
    padding: 1.5rem;
}

.dashboard__error {
    background: rgba(225, 75, 75, 0.15);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--danger);
}

.dashboard__heading {
    font-size: 1.125rem;
    color: var(--text-dim);
    margin: 0 0 1rem;
    font-weight: 600;
}

.dashboard__server {
    margin-bottom: 1rem;
}

.dashboard__stats {
    margin-bottom: 1.5rem;
}

.dashboard__meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.dashboard__meta code {
    background: var(--surface);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    color: var(--text-dim);
}

.server-status {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.server-status__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.server-status__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.server-status__value {
    font-weight: 600;
    color: var(--text-primary);
}

.server-status__value--online {
    color: var(--success);
}

.server-status__value--offline {
    color: var(--danger);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

/* Deine Statistiken – neues Layout (Dashboard) */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-box {
    position: relative;
    overflow: hidden;
    background: var(--surface-alt);
    border: 1px solid var(--divider);
    border-radius: 8px;
    padding: 20px;
}

.stat-box__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 0.35rem 0;
}

.stat-box__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent);
}

.stat-box--gold .stat-box__value {
    color: var(--gold);
}

.stat-box .bg-icon {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 80px;
    color: var(--divider);
    opacity: 0.3;
    pointer-events: none;
}

.stat-box__value--rank {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.stat-box__rank-img,
.stat-box__rank-fa {
    flex-shrink: 0;
    color: var(--gold);
}

.stat-box__rank-fa--hidden {
    display: none;
}

@media (max-width: 480px) {
    .dashboard-stats-grid {
        gap: 12px;
    }
    .stat-box {
        padding: 16px;
    }
    .stat-box__value {
        font-size: 1.5rem;
    }
}

.stats-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    padding: 1rem;
    text-align: center;
    border: none;
}

.stats-card__label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stats-card__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gold);
}

.stats-card--money .stats-card__value {
    color: var(--gold);
}

.stats-card--accent .stats-card__value {
    color: var(--accent);
}

.stats-card__value--rank {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.stats-card__rank-img,
.stats-card__rank-fa {
    flex-shrink: 0;
    color: var(--gold);
}

.stats-card__rank-fa--hidden {
    display: none;
}

.rank-icon {
    vertical-align: middle;
    object-fit: contain;
}

/* Profile – Gaming-Dashboard Grid */
.profile-page {
    max-width: 100%;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.profile-widget-stats {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .profile-page {
        grid-template-columns: 1fr;
    }

    .profile-widget-stats {
        grid-column: span 1;
    }
}

.profile-page__meta {
    grid-column: 1 / -1;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 1rem 0 0;
}

.profile-page__meta code {
    background: var(--surface);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    color: var(--text-dim);
}

/* Widget 1: Nutzer-Karte (kompakt) */
.profile-widget-user {
    grid-column: span 1;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.profile-header__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--divider);
    flex-shrink: 0;
}

.profile-header__meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.profile-header__name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.profile-header__rank {
    font-size: 0.8125rem;
    color: var(--accent);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-header__rank .rank-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.profile-header__ulx {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.profile-header__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.profile-header__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-header__status-dot--online {
    background: var(--success);
}

.profile-header__status-dot--offline {
    background: var(--text-muted);
}

/* Widgets 2–5: Stat-Boxen mit Wasserzeichen-Icon */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }
}

.profile-stat-box {
    position: relative;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.profile-stat-box__icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    opacity: 0.15;
    color: var(--accent);
    pointer-events: none;
}

.profile-stat-box__icon--gold {
    color: var(--gold);
}

.profile-stat-box__label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: block;
}

.profile-stat-box__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.profile-stat-box__value--gold {
    color: var(--gold);
}

/* Widget 6: Spielzeit-Chart (Donut + Legende) */
.profile-widget-pclass .playtime-chart-container {
    min-height: 180px;
}

.profile-pclass__chart-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.profile-pclass__legend {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.profile-pclass__legend li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.profile-pclass__legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.profile-pclass__fav {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.profile-pclass__empty {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Spielzeit-Chart: Tab-Gruppe (premium) */
.chart-tabs {
    background: var(--bg);
    border-radius: 8px;
    padding: 4px;
    display: inline-flex;
    gap: 4px;
    margin-bottom: 20px;
}

.chart-tab-btn {
    border: none;
    background: transparent;
    color: var(--text-dim);
    border-radius: 6px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-tab-btn:hover {
    color: var(--text-primary);
}

.chart-tab-btn.active {
    background: var(--surface-alt);
    color: var(--accent);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.chart-tab-btn.active[aria-selected="true"] {
    outline: none;
}

/* Chart-Inhalt: Donut (CSS conic-gradient) + Legende */
.chart-content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.profile-pclass__pie.donut-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.donut-chart::after {
    content: '';
    position: absolute;
    width: 65%;
    height: 65%;
    background: var(--card);
    border-radius: 50%;
}

.chart-legend {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    background: var(--bg);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--divider);
    transition: border-color 0.2s;
}

.legend-item:hover {
    border-color: var(--accent);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

.legend-label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.legend-value {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.pie-chart-tooltip {
    position: fixed;
    z-index: 1000;
    padding: 0.6rem 0.9rem;
    font-size: 0.8125rem;
    font-family: var(--font);
    background: var(--card);
    color: var(--text-primary);
    border: 1px solid var(--divider);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    max-width: 260px;
}

.pie-chart-tooltip__title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--accent);
}

.pie-chart-tooltip__detail {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Chart-Widget in Profil-Grid */
.profile-widget-pclass .card-body {
    padding: 1.25rem 1.5rem;
}

.profile-widget-pclass .profile-pclass__fav {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.profile-widget-pclass .profile-pclass__fav strong {
    color: var(--accent);
}

/* Widget 7: Freischaltungen – kompakte Flex-Badges */
.profile-widget-unlockables .profile-unlockables {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-unlockables__group {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

.profile-unlockables__group-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
    padding: 0;
    background: transparent;
    border: none;
}

.profile-unlockables__group-body {
    padding: 0;
    background: transparent;
}

.profile-unlockables__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-unlockables__badge {
    display: inline-block;
    font-size: 0.6875rem;
    padding: 0.2rem 0.5rem;
    background: var(--surface-alt);
    color: var(--text-dim);
    border-radius: 6px;
    border: 1px solid var(--divider);
}

.profile-unlockables__empty {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Legacy profile (falls alte Klassen noch vorkommen) */
.profile-page__title {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.profile-section {
    margin-bottom: 0;
}

.profile-section__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--divider);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.profile-stats__item {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    padding: 0.75rem 1rem;
    border: none;
}

.profile-stats__label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.25rem;
}

.profile-stats__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
}

/* Team */
.team-page {
    max-width: 1000px;
    padding: 1.5rem;
}

.team-page__error {
    background: rgba(225, 75, 75, 0.15);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--danger);
}

.team-page__title {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.team-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    padding: 1rem;
    text-align: center;
    border: none;
}

.team-card__avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--divider);
}

.team-card__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card__name {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.team-card__rank {
    font-size: 0.8125rem;
    color: var(--accent);
    margin: 0 0 0.5rem;
}

.team-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.team-card__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.team-card__status-dot--online {
    background: var(--success);
}

.team-card__status-dot--offline {
    background: var(--text-muted);
}

.team-page__empty {
    color: var(--text-muted);
    padding: 2rem;
    text-align: center;
}

/* Leaderboard */
.leaderboard-page {
    max-width: 1100px;
}

.leaderboard-page__error .card-body {
    color: var(--danger);
}

.leaderboard-page__title {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.leaderboard-page__empty {
    color: var(--text-muted);
    padding: 2rem;
    text-align: center;
}

.leaderboard-filters__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.leaderboard-filters__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.leaderboard-filters__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--divider);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.leaderboard-filters__btn:hover {
    background: var(--surface-alt);
    color: var(--text-primary);
    border-color: var(--accent);
}

.leaderboard-filters__btn--active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

.leaderboard-table-wrap .card-body.p-0 {
    padding: 0;
}

.table-responsive {
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--divider);
}

.leaderboard-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.leaderboard-table__num {
    text-align: right;
    white-space: nowrap;
}

.leaderboard-table__rank {
    font-weight: 700;
    color: var(--gold);
    width: 2.5rem;
}

.leaderboard-table__player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.leaderboard-table__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--divider);
    flex-shrink: 0;
}

.leaderboard-table__name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

a.leaderboard-table__name:hover {
    color: var(--accent);
}

.leaderboard-table__ext {
    font-size: 0.7em;
    opacity: 0.8;
}

.leaderboard-table__badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--accent-dim);
    color: var(--accent);
}

.leaderboard-table__badge--rank-member { background: rgba(90, 150, 255, 0.15); color: var(--accent); }
.leaderboard-table__badge--rank-stammspieler { background: rgba(80, 200, 120, 0.15); color: var(--success); }
.leaderboard-table__badge--rank-veteran { background: rgba(255, 215, 0, 0.15); color: var(--gold); }
.leaderboard-table__badge--rank-tdm-developer { background: rgba(90, 150, 255, 0.2); color: var(--accent); }
.leaderboard-table__badge--rank-tdm-admin { background: rgba(255, 215, 0, 0.2); color: var(--gold); }
.leaderboard-table__badge--rank-tdm-leitung { background: rgba(255, 100, 100, 0.15); color: var(--danger); }
.leaderboard-table__badge--rank-tdm-moderator { background: rgba(90, 150, 255, 0.2); color: var(--accent); }
.leaderboard-table__badge--rank-tdm-supporter { background: rgba(80, 200, 120, 0.15); color: var(--success); }

.leaderboard-table__muted {
    color: var(--text-muted);
}

.leaderboard-table__kd {
    font-weight: 600;
}

.leaderboard-pagination {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.leaderboard-pagination__info {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.leaderboard-pagination__list {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.leaderboard-pagination__link,
.leaderboard-pagination__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-dim);
    background: var(--surface-alt);
    border: 1px solid var(--divider);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.leaderboard-pagination__link:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

.leaderboard-pagination__current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    cursor: default;
}

/* Changelogs */
.changelog-page {
    max-width: 720px;
    padding: 1.5rem;
}

.changelog-page__title {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.changelog-timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--divider);
    margin-left: 0.5rem;
}

.changelog-timeline__item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.changelog-timeline__item::before {
    content: '';
    position: absolute;
    left: -1.625rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--divider);
}

.changelog-timeline__item:last-child {
    margin-bottom: 0;
}

.changelog-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    padding: 1rem 1.25rem;
    border: none;
}

.changelog-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.changelog-card__version {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.changelog-card__date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.changelog-card__badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.changelog-card__badge--feature {
    background: rgba(80, 200, 120, 0.2);
    color: var(--success);
}

.changelog-card__badge--update {
    background: var(--accent-dim);
    color: var(--accent);
}

.changelog-card__badge--fix {
    background: rgba(225, 75, 75, 0.2);
    color: var(--danger);
}

.changelog-card__badge--default {
    background: var(--surface-alt);
    color: var(--text-muted);
}

.changelog-card__list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.changelog-card__list li {
    margin-bottom: 0.25rem;
}

.changelog-card__list li:last-child {
    margin-bottom: 0;
}

.changelog-page__empty {
    color: var(--text-muted);
    padding: 2rem;
    text-align: center;
    margin: 0;
}

/* Maintenance */
.maintenance-box {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    border: none;
}

.maintenance-box__title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.maintenance-box__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   5. Utilities
   -------------------------------------------------------------------------- */
.home-page h1 {
    margin-top: 0;
}

