/* ============================================================
   GTI7 Community Portal – Phase 2 CSS
   ============================================================ */

.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap;
}

/* ---- Hero ---- */
.hero { padding: 3rem 0 2.5rem; display: flex; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.hero__content { flex: 1; min-width: 280px; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 7px; font-size: 12px;
    background: rgba(74,158,255,.1); border: 1px solid rgba(74,158,255,.2);
    color: var(--c-accent); border-radius: 20px; padding: .25rem .875rem; margin-bottom: 1rem;
}
.hero__badge-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--c-green); box-shadow: 0 0 6px var(--c-green); animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.hero__title {
    font-family: var(--font-head); font-size: clamp(36px, 6vw, 58px);
    font-weight: 700; line-height: 1.05; margin-bottom: .75rem; color: var(--c-text);
}
.hero__title span { color: var(--c-accent); }
.hero__sub { color: var(--c-text2); font-size: 17px; line-height: 1.65; margin-bottom: 1.75rem; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn--lg { padding: .75rem 1.75rem; font-size: 16px; }

/* ---- Server-Status-Card ---- */
.server-status-card {
    background: var(--c-surface); border: 1px solid var(--c-border2);
    border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
    min-width: 220px; flex-shrink: 0; align-self: flex-start;
}
.server-status-card__header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: .875rem; padding-bottom: .875rem; border-bottom: 1px solid var(--c-border);
}
.server-status-card__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.server-status-card__dot--online  { background: var(--c-green); box-shadow: 0 0 7px var(--c-green); animation: blink 2s infinite; }
.server-status-card__dot--offline { background: var(--c-red); }
.server-status-card__label { flex: 1; font-family: var(--font-head); font-size: 16px; font-weight: 600; }
.server-status-card__state { font-size: 13px; font-weight: 600; }
.server-status-card__stat { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--c-text2); margin-bottom: .5rem; }
.server-status-card__stat i { color: var(--c-text3); width: 14px; text-align: center; }
.server-status-card__stat strong { color: var(--c-text); }

/* ---- Home-Grid ---- */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2rem 0; }

/* ---- Section-Header ---- */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.section-title { font-family: var(--font-head); font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--c-text); }
.section-title i { color: var(--c-accent); }

/* ---- TS3-Viewer ---- */
.ts3-loading { text-align: center; padding: 2rem 1rem; color: var(--c-text2); font-size: 14px; }
.ts3-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ts3-dot--online { background: var(--c-green); }
.ts3-dot--away   { background: var(--c-orange); }
.ts3-dot--muted  { background: var(--c-text3); }

/* ---- Leaderboard Rows (Home) ---- */
.lb-row { display: flex; align-items: center; gap: 10px; padding: .6rem .875rem; border-radius: var(--radius); transition: background var(--transition); color: var(--c-text); }
.lb-row:hover { background: var(--c-bg3); }
.lb-pos { width: 22px; font-family: var(--font-head); font-size: 16px; font-weight: 700; text-align: center; flex-shrink: 0; }
.lb-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent2));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-size: 14px; font-weight: 700; color: #fff;
}
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lb-info { flex: 1; min-width: 0; }
.lb-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-rank { font-size: 11px; }
.lb-points { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--c-accent); }

/* ============================================================
   BENTO GRID — Feature-Karten
   ============================================================ */

.bento-label {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: .01em;
}
.bento-label::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--c-accent);
    border-radius: 2px;
    margin-top: .5rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 230px 190px 190px;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Explizite Grid-Platzierung */
.bento-card--forum      { grid-column: 1;     grid-row: 1 / 3; }
.bento-card--chat       { grid-column: 2;     grid-row: 1; }
.bento-card--gameserver { grid-column: 3;     grid-row: 1; }
.bento-card--news       { grid-column: 2 / 4; grid-row: 2; }
.bento-card--rang       { grid-column: 1 / 3; grid-row: 3; }
.bento-card--vip        { grid-column: 3;     grid-row: 3; }

/* Basis-Karte */
.bento-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255,255,255,.07);
    transition: transform .2s ease, box-shadow .2s ease;
}
.bento-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(0,0,0,.55);
    border-color: rgba(255,255,255,.14);
}

/* Individuelle Hintergrundfarben — kein CSS-Variable-Trick */
.bento-card--forum      { background: linear-gradient(145deg, #0f2a5c 0%, #1a4a99 60%, #2060cc 100%); }
.bento-card--chat       { background: linear-gradient(145deg, #0a3020 0%, #156640 60%, #1d8f55 100%); }
.bento-card--gameserver { background: linear-gradient(145deg, #3a0808 0%, #7a1515 60%, #b02020 100%); }
.bento-card--news       { background: linear-gradient(145deg, #3d1c00 0%, #8a3e00 60%, #c45800 100%); }
.bento-card--rang       { background: linear-gradient(145deg, #2e1f00 0%, #6b4800 60%, #a07000 100%); }
.bento-card--vip        { background: linear-gradient(145deg, #1e0838 0%, #4a1580 60%, #7030c0 100%); }

/* Glow-Kreis oben rechts — Farbe per class */
.bento-card__glow {
    position: absolute;
    top: -70px; right: -70px;
    width: 220px; height: 220px;
    border-radius: 50%;
    opacity: .18;
    transition: opacity .25s ease;
    pointer-events: none;
}
.bento-card:hover .bento-card__glow { opacity: .28; }

.bento-card--forum      .bento-card__glow { background: #4a9eff; }
.bento-card--chat       .bento-card__glow { background: #2ecc71; }
.bento-card--gameserver .bento-card__glow { background: #e74c3c; }
.bento-card--news       .bento-card__glow { background: #e67e22; }
.bento-card--rang       .bento-card__glow { background: #f1c40f; }
.bento-card--vip        .bento-card__glow { background: #9b59b6; }

/* Badge (LIVE, VIP) */
.bento-card__badge {
    position: absolute;
    top: 1rem; left: 1rem;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 4px;
    padding: 2px 8px;
    background: rgba(0,0,0,.25);
}

/* Großes Icon — halbtransparent im Hintergrund */
.bento-card__icon {
    position: absolute;
    top: .875rem; right: 1.125rem;
    font-size: 48px;
    color: rgba(255,255,255,.11);
    line-height: 1;
    transition: color .2s ease, transform .2s ease;
}
.bento-card--forum .bento-card__icon { font-size: 64px; top: 1.25rem; }
.bento-card:hover .bento-card__icon {
    color: rgba(255,255,255,.2);
    transform: scale(1.08) rotate(-5deg);
}

/* Inhalt unten */
.bento-card__content { position: relative; z-index: 1; }

.bento-card__title {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: .3rem;
    color: #fff;
}
.bento-card--forum .bento-card__title { font-size: 30px; }

.bento-card__desc {
    font-size: 13px;
    color: rgba(255,255,255,.6);
    line-height: 1.5;
    margin: 0;
}

/* Pfeil-Button — erscheint beim Hover */
.bento-card__arrow {
    position: absolute;
    bottom: 1.25rem; right: 1.25rem;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    color: rgba(255,255,255,.8);
    opacity: 0;
    transform: scale(.8);
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.bento-card:hover .bento-card__arrow {
    opacity: 1;
    transform: scale(1);
    background: rgba(255,255,255,.22);
}

/* ---- LEADERBOARD SEITE ---- */
.my-rank-badge { display: flex; flex-direction: column; align-items: center; background: var(--c-surface); border: 1px solid var(--c-border2); border-radius: var(--radius-lg); padding: .75rem 1.25rem; }
.my-rank-badge__num { font-family: var(--font-head); font-size: 28px; font-weight: 700; color: var(--c-accent); line-height: 1; }
.rank-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: 1.75rem; padding: .875rem 1.1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.rank-legend__item { display: flex; align-items: center; gap: 6px; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: .75rem; margin-bottom: .5rem; }
.podium__slot { display: flex; flex-direction: column; align-items: center; width: 110px; }
.podium__avatar { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--c-accent), var(--c-accent2)); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 22px; font-weight: 700; color: #fff; border: 3px solid; margin-bottom: .5rem; }
.podium__avatar img { width: 100%; height: 100%; object-fit: cover; }
.podium__name { font-size: 13px; font-weight: 500; text-align: center; margin-bottom: .2rem; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__points { font-size: 12px; color: var(--c-text2); margin-bottom: .5rem; }
.podium__bar { width: 100%; border-radius: var(--radius) var(--radius) 0 0; border: 1px solid; border-bottom: none; display: flex; align-items: center; justify-content: center; }
.podium__pos { font-family: var(--font-head); font-size: 28px; font-weight: 700; }
.lb-table-row { display: flex; align-items: center; gap: 12px; padding: .75rem 1.1rem; border-bottom: 1px solid var(--c-border); transition: background var(--transition); color: var(--c-text); }
.lb-table-row:last-child { border-bottom: none; }
.lb-table-row:hover { background: var(--c-bg2); }
.lb-table-row--me { background: rgba(74,158,255,.06) !important; border-left: 2px solid var(--c-accent); }
.lb-table-pos { width: 32px; text-align: center; font-family: var(--font-head); font-size: 16px; font-weight: 700; flex-shrink: 0; }
.lb-table-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg, var(--c-accent), var(--c-accent2)); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 16px; font-weight: 700; color: #fff; }
.lb-table-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lb-table-info { flex: 1; min-width: 0; }
.lb-table-name { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.lb-table-meta { font-size: 12px; margin-top: 2px; display: flex; gap: 6px; }
.lb-you-badge { font-size: 10px; background: rgba(74,158,255,.15); color: var(--c-accent); border-radius: 10px; padding: 1px 7px; font-weight: 600; flex-shrink: 0; }
.lb-table-streak { color: var(--c-text2); font-size: 13px; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.lb-table-points { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--c-accent); flex-shrink: 0; text-align: right; min-width: 80px; }

/* ---- DASHBOARD ---- */
.dash-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
.dash-header__avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--c-accent), var(--c-accent2)); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 22px; font-weight: 700; color: #fff; overflow: hidden; }
.dash-header__avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- QUICK-LINKS ---- */
.quick-link { display: flex; align-items: center; gap: 12px; padding: .875rem 1rem; background: var(--c-bg2); border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-text2); font-size: 14px; transition: all var(--transition); }
.quick-link:hover { background: var(--c-surface); border-color: var(--c-border2); color: var(--c-text); }
.quick-link i:first-child { color: var(--c-accent); font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.quick-link div { display: flex; flex-direction: column; gap: 1px; }
.quick-link strong { color: var(--c-text); font-size: 14px; }
.quick-link span { font-size: 11px; color: var(--c-text3); }
.quick-link--highlight { border-color: rgba(74,158,255,.3); background: rgba(74,158,255,.06); }
.quick-link--vip i:first-child { color: var(--c-gold); }
.quick-link--vip { border-color: rgba(241,196,15,.25); }
.quick-link--admin i:first-child { color: var(--c-orange); }
.quick-link--admin { border-color: rgba(230,126,34,.25); }

/* ---- ADMIN ---- */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; flex-shrink: 0; background: var(--c-bg2); border-right: 1px solid var(--c-border); padding: 1.5rem 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar-logo { padding: 0 1.25rem 1.5rem; font-family: var(--font-head); font-size: 20px; font-weight: 700; border-bottom: 1px solid var(--c-border); margin-bottom: 1rem; }
.admin-sidebar-logo span { color: var(--c-orange); }
.admin-nav-item { display: flex; align-items: center; gap: 10px; padding: .55rem 1.25rem; color: var(--c-text2); font-size: 14px; transition: all var(--transition); }
.admin-nav-item:hover, .admin-nav-item--active { background: var(--c-surface); color: var(--c-text); }
.admin-nav-item i { width: 18px; text-align: center; color: var(--c-text3); }
.admin-nav-item:hover i, .admin-nav-item--active i { color: var(--c-orange); }
.admin-main { flex: 1; padding: 2rem; overflow-x: auto; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .home-grid { grid-template-columns: 1fr; }
    .hero { flex-direction: column; }
    .server-status-card { width: 100%; }
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .bento-card--forum      { grid-column: 1 / 3; grid-row: auto; min-height: 200px; }
    .bento-card--chat       { grid-column: 1;     grid-row: auto; min-height: 160px; }
    .bento-card--gameserver { grid-column: 2;     grid-row: auto; min-height: 160px; }
    .bento-card--news       { grid-column: 1 / 3; grid-row: auto; min-height: 160px; }
    .bento-card--rang       { grid-column: 1;     grid-row: auto; min-height: 160px; }
    .bento-card--vip        { grid-column: 2;     grid-row: auto; min-height: 160px; }
}
@media (max-width: 768px) {
    .navbar__nav { display: none; flex-direction: column; }
    .navbar__nav.open { display: flex; }
    .navbar__mobile-toggle { display: block; }
    .navbar__online { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .auth-card { padding: 1.5rem; }
    .podium { gap: .4rem; }
    .podium__slot { width: 90px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .main-content { padding: 1.25rem 1rem; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card--forum,
    .bento-card--chat,
    .bento-card--gameserver,
    .bento-card--news,
    .bento-card--rang,
    .bento-card--vip { grid-column: 1; grid-row: auto; min-height: 150px; }
    .hero__title { font-size: 32px; }
    .podium { display: none; }
}
