* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #050812;
    --card: rgba(255,255,255,.07);
    --card2: rgba(2,6,23,.62);
    --line: rgba(255,255,255,.12);
    --text: #fff;
    --muted: #94a3b8;
    --cyan: #67e8f9;
    --blue: #2563eb;
    --red: #fb7185;
    --green: #86efac;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 560px;
    height: 560px;
    border-radius: 999px;
    filter: blur(100px);
    pointer-events: none;
    z-index: -3;
}

body::before {
    top: -250px;
    left: 42%;
    background: rgba(34,211,238,.2);
}

body::after {
    right: -180px;
    bottom: -220px;
    background: rgba(37,99,235,.26);
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at top, rgba(255,255,255,.09), transparent 34%),
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: auto, 72px 72px, 72px 72px;
}

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

button,
input,
textarea,
select {
    font-family: inherit;
}

.topbar {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #020617;
    box-shadow: 0 18px 45px rgba(34,211,238,.22);
    font-size: 25px;
}

.brand b {
    display: block;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand small {
    display: block;
    color: rgba(186,230,253,.72);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .3em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav a {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
    padding: 12px 15px;
    border-radius: 13px;
    transition: .2s;
}

.nav a:hover {
    background: rgba(255,255,255,.08);
    color: var(--cyan);
}

.container {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 25px 0 80px;
}

.hero {
    padding: 34px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(103,232,249,.13), rgba(37,99,235,.14));
    border: 1px solid var(--line);
    box-shadow: 0 26px 80px rgba(0,0,0,.28);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1;
    letter-spacing: -.06em;
}

.hero p {
    color: #cbd5e1;
    margin-top: 14px;
    line-height: 1.7;
    max-width: 760px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 15px;
    padding: 14px 18px;
    font-weight: 900;
    cursor: pointer;
    transition: .2s;
}

.btn-primary {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    color: #020617;
}

.btn-ghost {
    background: rgba(255,255,255,.09);
    color: #fff;
    border: 1px solid var(--line);
}

.btn-danger {
    background: rgba(251,113,133,.12);
    color: #fecdd3;
    border: 1px solid rgba(251,113,133,.25);
}

.btn:hover {
    transform: translateY(-2px);
}

.grid {
    display: grid;
    gap: 16px;
}

.category-card,
.topic-card,
.post-card,
.form-card {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 24px;
    backdrop-filter: blur(18px);
    box-shadow: 0 22px 70px rgba(0,0,0,.2);
}

.category-card {
    padding: 22px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    transition: .2s;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(103,232,249,.42);
    background: rgba(255,255,255,.09);
}

.category-title {
    font-size: 21px;
    font-weight: 900;
}

.category-desc {
    color: var(--muted);
    margin-top: 7px;
    line-height: 1.5;
}

.category-stats {
    display: flex;
    gap: 12px;
}

.stat {
    min-width: 92px;
    text-align: center;
    padding: 13px;
    border-radius: 16px;
    background: rgba(2,6,23,.5);
    border: 1px solid var(--line);
}

.stat strong {
    display: block;
    font-size: 22px;
}

.stat span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 18px;
    font-size: 14px;
}

.breadcrumbs a {
    color: #cbd5e1;
}

.topic-card {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    transition: .2s;
}

.topic-card:hover {
    transform: translateY(-3px);
    border-color: rgba(103,232,249,.42);
}

.topic-title {
    font-size: 18px;
    font-weight: 900;
}

.topic-meta,
.post-meta {
    color: var(--muted);
    margin-top: 8px;
    font-size: 13px;
}

.topic-side {
    color: var(--muted);
    text-align: right;
    font-size: 13px;
}

.post-card {
    overflow: hidden;
}

.post-head {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    background: rgba(2,6,23,.48);
    border-bottom: 1px solid var(--line);
}

.post-author {
    font-weight: 900;
}

.post-content {
    padding: 22px;
    color: #e2e8f0;
    line-height: 1.75;
    white-space: pre-wrap;
}

.form-card {
    padding: 24px;
}

.form-card label {
    display: block;
    color: #cbd5e1;
    font-weight: 800;
    margin-bottom: 8px;
}

.input,
.textarea,
.select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(2,6,23,.55);
    color: #fff;
    border-radius: 15px;
    padding: 15px;
    outline: none;
    margin-bottom: 16px;
}

.textarea {
    min-height: 180px;
    resize: vertical;
}

.alert {
    padding: 15px 18px;
    border-radius: 15px;
    margin-bottom: 16px;
    background: rgba(251,113,133,.1);
    border: 1px solid rgba(251,113,133,.25);
    color: #fecdd3;
}

.empty {
    padding: 28px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 22px;
    text-align: center;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 28px 20px;
    text-align: center;
    color: #64748b;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        flex-wrap: wrap;
    }

    .category-card,
    .topic-card {
        grid-template-columns: 1fr;
    }

    .category-stats {
        width: 100%;
    }

    .stat {
        flex: 1;
    }

    .topic-side {
        text-align: left;
    }
}
