:root {
    --bg: #080f1d;
    --bg-light: #0d1728;
    --panel: #101b2d;
    --panel-light: #142238;
    --border: #223451;

    --text: #f4f7fb;
    --muted: #94a3b8;

    --blue: #1683ff;
    --blue-dark: #0864d1;
    --blue-light: #38a3ff;

    --green: #22c55e;
    --orange: #f59e0b;
    --purple: #8b5cf6;
    --red: #ef4444;

    --radius: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            circle at top left,
            #12233d 0,
            var(--bg) 40%
        );

    color: var(--text);

    min-height: 100vh;
}

body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(22, 131, 255, 0.08),
            transparent 30%
        );
}

/* -----------------------------------
   Allgemein
----------------------------------- */

a {
    color: var(--blue-light);
    text-decoration: none;
}

a:hover {
    color: #fff;
}

.container {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
}

main {
    min-height: calc(100vh - 160px);
    padding: 30px 0 60px;
}

/* -----------------------------------
   Header
----------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(7, 14, 27, 0.94);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;

    color: #fff;

    font-size: 25px;
    font-weight: 800;

    letter-spacing: -0.7px;
}

.logo:hover {
    color: #fff;
}

.logo-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #1d9aff,
            #0759d5
        );

    box-shadow:
        0 0 25px rgba(22, 131, 255, 0.35);
}

.logo-blue {
    color: var(--blue-light);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    color: #b8c4d5;

    padding: 10px 14px;

    border-radius: 8px;

    font-size: 14px;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    color: #c4cedd;

    font-size: 19px;
}

.header-icon:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 9px;

    padding-left: 12px;
    margin-left: 5px;

    border-left: 1px solid var(--border);
}

.avatar-small {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #216dd0,
            #15498e
        );

    font-weight: 700;
}

/* -----------------------------------
   Hero
----------------------------------- */

.hero {
    position: relative;

    min-height: 280px;

    display: flex;
    align-items: center;

    padding: 50px;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 13px;

    background:
        linear-gradient(
            90deg,
            rgba(4, 14, 29, .98),
            rgba(6, 24, 48, .82),
            rgba(6, 19, 39, .6)
        );

    margin-bottom: 20px;
}

.hero::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 80% 30%,
            rgba(25, 126, 255, .25),
            transparent 30%
        );

    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 650px;
}

.hero-eyebrow {
    color: #2ea0ff;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 4px;

    margin-bottom: 10px;
}

.hero h1 {
    margin: 0 0 10px;

    font-size: clamp(38px, 5vw, 58px);

    line-height: 1;

    letter-spacing: -2px;
}

.hero h1 span {
    color: var(--blue);
}

.hero p {
    color: #c2cede;

    font-size: 17px;
    line-height: 1.6;

    margin: 0 0 25px;
}

.hero-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* -----------------------------------
   Layout
----------------------------------- */

.forum-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        340px;

    gap: 20px;
}

.content-column,
.sidebar {
    min-width: 0;
}

/* -----------------------------------
   Panels
----------------------------------- */

.panel {
    background:
        linear-gradient(
            145deg,
            rgba(16, 27, 45, .98),
            rgba(10, 20, 36, .98)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);

    overflow: hidden;

    margin-bottom: 20px;
}

.panel-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 18px 20px;

    border-bottom: 1px solid var(--border);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0;

    font-size: 18px;
}

.panel-title-icon {
    color: var(--blue);
}

.panel-body {
    padding: 15px;
}

/* -----------------------------------
   Kategorien
----------------------------------- */

.category-item {
    display: grid;

    grid-template-columns:
        55px
        minmax(0, 1fr)
        110px
        110px
        25px;

    align-items: center;

    gap: 15px;

    padding: 17px 10px;

    border-bottom: 1px solid rgba(34, 52, 81, .7);

    transition: .2s ease;
}

.category-item:last-child {
    border-bottom: 0;
}

.category-item:hover {
    background: rgba(255,255,255,.025);
}

.category-icon {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #147ff0;

    font-size: 21px;
}

.category-icon.green {
    background: #269d45;
}

.category-icon.orange {
    background: #e88900;
}

.category-icon.purple {
    background: #743bdd;
}

.category-info h3 {
    margin: 0 0 5px;

    font-size: 16px;
}

.category-info p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
}

.category-stat {
    text-align: center;
}

.category-stat strong {
    display: block;

    font-size: 17px;
}

.category-stat span {
    color: var(--muted);

    font-size: 12px;
}

.category-arrow {
    font-size: 22px;
    color: #8190a5;
}

/* -----------------------------------
   Threads
----------------------------------- */

.thread-item {
    display: grid;

    grid-template-columns:
        45px
        minmax(0, 1fr)
        100px
        150px;

    align-items: center;

    gap: 15px;

    padding: 15px;

    border-bottom: 1px solid rgba(34, 52, 81, .7);
}

.thread-item:last-child {
    border-bottom: 0;
}

.thread-item:hover {
    background: rgba(255,255,255,.025);
}

.thread-avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #216dd0;

    font-weight: 700;
}

.thread-info {
    min-width: 0;
}

.thread-info h3 {
    margin: 0 0 5px;

    font-size: 15px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thread-meta {
    color: var(--muted);
    font-size: 12px;
}

.thread-stat {
    color: var(--muted);
    text-align: center;
}

.thread-last {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--muted);

    font-size: 12px;
}

.thread-last .avatar-small {
    flex-shrink: 0;
}

/* -----------------------------------
   Buttons
----------------------------------- */

.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    border: 0;
    border-radius: 7px;

    padding: 11px 17px;

    background:
        linear-gradient(
            135deg,
            #168cff,
            #0964d3
        );

    color: #fff;

    font-size: 14px;
    font-weight: 650;

    cursor: pointer;

    box-shadow:
        0 5px 20px rgba(8, 100, 210, .18);

    transition: .2s ease;
}

.button:hover {
    color: #fff;

    transform: translateY(-1px);

    box-shadow:
        0 8px 25px rgba(8, 100, 210, .3);
}

.button.secondary {
    background: transparent;

    border: 1px solid var(--border);

    box-shadow: none;
}

.button.secondary:hover {
    background: rgba(255,255,255,.05);
}

.button.danger {
    background: var(--red);
}

/* -----------------------------------
   Sidebar
----------------------------------- */

.sidebar-card {
    padding: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(16, 27, 45, .98),
            rgba(10, 20, 36, .98)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);

    margin-bottom: 15px;
}

.profile-sidebar {
    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 20px;
}

.profile-avatar {
    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #2878dd,
            #164c93
        );

    font-size: 32px;
    font-weight: 700;
}

.profile-sidebar h3 {
    margin: 0 0 5px;
}

.role {
    display: inline-block;

    padding: 4px 8px;

    border-radius: 5px;

    background: rgba(22, 131, 255, .15);

    color: var(--blue-light);

    font-size: 12px;
}

.sidebar-stats {
    display: grid;
    gap: 12px;
}

.sidebar-stat {
    display: flex;
    justify-content: space-between;

    color: var(--muted);

    font-size: 14px;
}

.sidebar-stat strong {
    color: var(--text);
}

/* -----------------------------------
   Formulare
----------------------------------- */

.form-card {
    padding: 25px;

    background:
        linear-gradient(
            145deg,
            rgba(16, 27, 45, .98),
            rgba(10, 20, 36, .98)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);
}

.form-card label {
    display: block;

    margin-bottom: 7px;

    color: #dce4ef;

    font-weight: 600;
}

.form-card input,
.form-card textarea,
.form-card select {
    width: 100%;

    padding: 12px 13px;

    margin-bottom: 18px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: #0a1424;

    color: #fff;

    font: inherit;
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
    outline: none;

    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(22,131,255,.12);
}

.form-card textarea {
    min-height: 150px;

    resize: vertical;
}

/* -----------------------------------
   Posts
----------------------------------- */

.post {
    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(16, 27, 45, .98),
            rgba(10, 20, 36, .98)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);

    margin-bottom: 18px;
}

.post-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 15px 18px;

    border-bottom: 1px solid var(--border);

    background: rgba(255,255,255,.015);
}

.post-author {
    font-weight: 700;
}

.post-date {
    color: var(--muted);

    font-size: 12px;
}

.post-body {
    padding: 20px;

    color: #d4deeb;

    line-height: 1.75;

    white-space: pre-wrap;

    overflow-wrap: anywhere;
}

.post-actions {
    display: flex;

    gap: 8px;

    padding: 0 20px 18px;
}

/* -----------------------------------
   Alerts
----------------------------------- */

.alert {
    padding: 14px 17px;

    margin-bottom: 20px;

    border-radius: 8px;
}

.alert.success {
    background: rgba(34,197,94,.1);

    border: 1px solid rgba(34,197,94,.25);

    color: #86efac;
}

.alert.error {
    background: rgba(239,68,68,.1);

    border: 1px solid rgba(239,68,68,.25);

    color: #fca5a5;
}

.alert.info {
    background: rgba(22,131,255,.1);

    border: 1px solid rgba(22,131,255,.25);

    color: #93c5fd;
}

/* -----------------------------------
   Tabellen
----------------------------------- */

.table-wrapper {
    overflow-x: auto;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: var(--radius);
}

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 13px 15px;

    text-align: left;

    border-bottom: 1px solid var(--border);
}

th {
    color: var(--muted);

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: .04em;
}

/* -----------------------------------
   Stats
----------------------------------- */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;

    margin-bottom: 25px;
}

.stat-card {
    padding: 20px;

    background:
        linear-gradient(
            145deg,
            #111e32,
            #0b1626
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);
}

.stat-card strong {
    display: block;

    font-size: 27px;

    margin-bottom: 5px;
}

.stat-card span {
    color: var(--muted);
}

/* -----------------------------------
   Footer
----------------------------------- */

.site-footer {
    margin-top: 40px;

    padding: 28px 0;

    background: #060d19;

    border-top: 1px solid var(--border);

    color: var(--muted);
}

.footer-inner {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.footer-links {
    display: flex;

    gap: 20px;

    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted);

    font-size: 13px;
}

.footer-links a:hover {
    color: #fff;
}

/* -----------------------------------
   Responsive
----------------------------------- */

@media (max-width: 1000px) {

    .forum-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;

        grid-template-columns:
            repeat(2, 1fr);

        gap: 15px;
    }

    .sidebar-card {
        margin-bottom: 0;
    }

    .main-nav {
        display: none;
    }
}

@media (max-width: 700px) {

    .container {
        width: min(100% - 20px, 1400px);
    }

    .header-inner {
        min-height: 62px;
    }

    .hero {
        padding: 30px 25px;

        min-height: 250px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .category-item {
        grid-template-columns:
            45px
            1fr
            25px;
    }

    .category-stat {
        display: none;
    }

    .thread-item {
        grid-template-columns:
            40px
            1fr;
    }

    .thread-stat,
    .thread-last {
        display: none;
    }

    .sidebar {
        display: block;
    }

    .sidebar-card {
        margin-bottom: 15px;
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;

        align-items: flex-start;
    }
}

@media (max-width: 450px) {

    .logo {
        font-size: 20px;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
    }

    .header-right {
        gap: 2px;
    }

    .hero {
        padding: 25px 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 15px;
    }
}
/* Logout Button */
.logout-button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 9px 14px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--blue);
    color: #ffffff;
    transform: translateY(-1px);
}