:root {
    --bg-overlay: rgba(15, 17, 23, 0.78);
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-bg-hover: rgba(255, 255, 255, 0.07);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.35);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.55);
    --rank-admin: #ff6b8a;
    --rank-mod: #6be8ff;
    --rank-tester: #00e5ff;
    --rank-media: #D6FF00;
    --rank-builder: #437AAB;
    --rank-player: #aaaaaa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body.forum-page {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding-bottom: 3rem;
    background: #0f1117;
    position: relative;
}

.site-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    width: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100lvh;
    pointer-events: none;
    overflow: hidden;
    background: #0f1117;
}

.site-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 1;
}

.site-backdrop img {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    max-width: none;
    transform: translate(-50%, -50%);
    user-select: none;
    -webkit-user-drag: none;
}

body.forum-page > :not(.site-backdrop) {
    position: relative;
    z-index: 1;
}

body.forum-page a {
    color: inherit;
}

body.forum-page ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.forum-page ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

body.forum-page ::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

body.forum-page ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.forum-site-header {
    padding: 18px 24px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    user-select: none;
    min-width: 0;
}

.brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.brand h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
}

.auth-block {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-auth {
    background: var(--accent);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-auth:hover {
    background: var(--accent-hover);
}

.btn-auth-ghost {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-auth-ghost:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    padding: 6px 16px 6px 6px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.user-profile:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

.user-name {
    font-weight: 600;
}

.forum-logout-form {
    display: inline;
    margin: 0;
}

.forum-shell {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 3rem;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.main-nav,
.forum-main-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    padding: 14px 32px;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 16px;
    transition: all 0.25s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: inherit;
}

.nav-btn:hover,
.nav-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search-input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    width: 160px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.header-search-input:focus {
    border-color: rgba(99, 102, 241, 0.6);
}

.header-search-btn {
    padding: 14px 18px;
}

/* legacy aliases used by older markup */
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
}

.header-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
    color: white;
}

.header-btn.user-logged {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    cursor: default;
}

.header-btn.user-logged:hover {
    transform: none;
}

        /* ???????? ??????????? */
        .auth-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 60vh;
        }

        .auth-card {
            background: var(--card-bg);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 2.5rem;
            width: 100%;
            max-width: 400px;
            text-align: center;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        .auth-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        .auth-subtitle {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
        }

        .form-group {
            margin-bottom: 1.2rem;
            text-align: left;
        }

        .form-label {
            display: block;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 6px;
        }

        .form-input {
            width: 100%;
            padding: 12px 16px;
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            color: white;
            font-size: 0.95rem;
            outline: none;
            transition: all 0.2s;
        }

        .form-input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 10px var(--accent-glow);
        }

        .btn-submit {
            width: 100%;
            padding: 12px;
            background: var(--accent);
            border: none;
            border-radius: 10px;
            color: white;
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s;
            margin-top: 0.5rem;
        }

        .btn-submit:hover {
            background: var(--accent-hover);
            box-shadow: 0 4px 20px var(--accent-glow);
        }

        /* ??????? ???????? (?????) */
        .forum-layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
            gap: 2rem;
            align-items: start;
            width: 100%;
        }

        .categories-column,
        .sidebar-column {
            min-width: 0;
        }

        @media (max-width: 900px) {
            .forum-layout {
                grid-template-columns: 1fr;
            }
        }

        /* ????? ????????? */
        .category-box {
            background: var(--card-bg);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        .category-header {
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 8px;
            padding-bottom: 0.8rem;
            border-bottom: 1px solid var(--border-color);
        }

        .category-header::before {
            content: '';
            width: 8px;
            height: 8px;
            background: var(--accent);
            border-radius: 50%;
            box-shadow: 0 0 8px var(--accent);
        }

        .topic-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .pinned-topics-box {
            border-color: rgba(170, 255, 136, 0.28);
            box-shadow:
                0 0 0 1px rgba(170, 255, 136, 0.08),
                0 0 32px rgba(170, 255, 136, 0.1);
            margin-bottom: 1.25rem;
        }

        .pinned-topics-header {
            color: #e8ffe0;
            border-bottom-color: rgba(170, 255, 136, 0.22);
        }

        .pinned-topics-header::before {
            background: #aaff88;
            box-shadow: 0 0 8px #aaff88;
        }

        .pinned-topics-header .fa-thumbtack {
            font-size: 0.9rem;
            margin-right: 0.15rem;
            color: #aaff88;
        }

        .regular-topics-box {
            margin-bottom: 1.5rem;
        }

        .pinned-topics-list,
        .regular-topics-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .topic-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            text-decoration: none;
            color: var(--text-main);
            transition: all 0.2s;
            min-width: 0;
        }

        .topic-item:hover {
            background: var(--card-bg-hover);
            border-color: var(--border-hover);
            transform: translateX(4px);
        }

        .topic-item-pinned {
            position: relative;
            border: none;
            background:
                linear-gradient(135deg, rgba(170, 255, 136, 0.1) 0%, rgba(255, 255, 255, 0.03) 55%, rgba(251, 191, 36, 0.06) 100%);
            box-shadow:
                0 0 0 1px rgba(170, 255, 136, 0.22),
                0 0 24px rgba(170, 255, 136, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
            overflow: hidden;
        }

        .topic-item-pinned::before {
            content: "";
            position: absolute;
            inset: 0;
            padding: 1.5px;
            border-radius: inherit;
            background: linear-gradient(
                120deg,
                rgba(170, 255, 136, 0.85),
                rgba(251, 191, 36, 0.65),
                rgba(170, 255, 136, 0.85)
            );
            background-size: 220% 220%;
            animation: pinned-topic-border 6s ease infinite;
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
        }

        .topic-item-pinned::after {
            content: "";
            position: absolute;
            top: 0;
            left: -30%;
            width: 45%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(170, 255, 136, 0.12), transparent);
            animation: pinned-topic-shine 7s ease-in-out infinite;
            pointer-events: none;
        }

        .topic-item-pinned:hover {
            background:
                linear-gradient(135deg, rgba(170, 255, 136, 0.14) 0%, rgba(255, 255, 255, 0.05) 55%, rgba(251, 191, 36, 0.08) 100%);
            box-shadow:
                0 0 0 1px rgba(170, 255, 136, 0.35),
                0 0 30px rgba(170, 255, 136, 0.16),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
            transform: translateX(4px);
        }

        .topic-item-pinned .topic-info,
        .topic-item-pinned .topic-count {
            position: relative;
            z-index: 1;
        }

        .topic-item-pinned .topic-info-title {
            color: #e8ffe0;
        }

        @keyframes pinned-topic-border {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        @keyframes pinned-topic-shine {
            0%, 100% { transform: translateX(0); opacity: 0.5; }
            50% { transform: translateX(220%); opacity: 1; }
        }

        a.topic-item {
            text-decoration: none;
        }

        .topic-item .topic-info-title {
            color: inherit;
            text-decoration: none;
            display: block;
        }

        .topic-item .topic-info-title:hover {
            color: var(--accent);
        }

        .topic-meta-sep {
            color: var(--text-muted);
        }

        .topic-info {
            min-width: 0;
            flex: 1;
            overflow: hidden;
        }

        .topic-info-head {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .topic-info-title {
            font-weight: 600;
            font-size: 0.95rem;
            min-width: 0;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .topic-count {
            flex-shrink: 0;
            white-space: nowrap;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .topic-meta {
            font-size: 0.75rem;
            color: var(--text-muted);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* ??????? ?????? (???????) */
        .sidebar-box {
            background: var(--card-bg);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 1.2rem;
            margin-bottom: 1.5rem;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        .sidebar-title {
            font-size: 0.95rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05rem;
            color: var(--text-muted);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .mini-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .mini-item {
            display: flex;
            flex-direction: row;
            align-items: flex-start;
            gap: 10px;
            font-size: 0.85rem;
            color: var(--text-main);
            min-width: 0;
            max-width: 100%;
        }

        a.mini-item {
            text-decoration: none;
        }

        .mini-item:hover .mini-title,
        .mini-item .mini-title:hover {
            color: var(--accent);
        }

        .mini-avatar {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            image-rendering: pixelated;
            flex-shrink: 0;
        }

        .mini-details {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 2px;
            overflow: hidden;
            min-width: 0;
            flex: 1 1 auto;
        }

        .mini-title {
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
            transition: color 0.2s;
            color: inherit;
            text-decoration: none;
            display: block;
        }

        .mini-sub {
            font-size: 0.75rem;
            color: var(--text-muted);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 100%;
            line-height: 1.3;
        }

        .mini-sub .nick-link {
            color: inherit;
        }

        .mini-sub-sep {
            color: var(--text-muted);
        }

        /* ?????? ??????? ?????? */
        .moderator-tag {
            font-size: 0.7rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 4px;
            text-transform: uppercase;
        }

        .rank-badge-img {
            display: inline-block;
            height: 22px; /* 11 px art x2: integer scale keeps letters crisp */
            width: auto;
            flex-shrink: 0;
            image-rendering: pixelated;
            vertical-align: middle;
        }

        .role-admin { background: rgba(99, 102, 241, 0.15); color: var(--rank-admin); border: 1px solid var(--rank-admin); }
        .role-mod { background: rgba(42, 245, 255, 0.15); color: var(--rank-mod); border: 1px solid var(--rank-mod); }
        .role-builder { background: rgba(67, 122, 171, 0.18); color: #437AAB; border: 1px solid #437AAB; }
        .role-media { background: rgba(214, 255, 0, 0.14); color: #D6FF00; border: 1px solid #D6FF00; }
        .role-tester { background: rgba(0, 229, 255, 0.15); color: var(--rank-tester); border: 1px solid #7b2cbf; }

        /* ???????? ???? (?????-?????) */
        .topic-page-header {
            margin-bottom: 1.5rem;
        }

        .topic-page-title {
            font-size: 1.8rem;
            font-weight: 800;
            margin-bottom: 0.4rem;
        }

        .posts-stack {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .post-card {
            background: var(--card-bg);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            display: grid;
            grid-template-columns: 200px 1fr;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        @media (max-width: 650px) {
            .post-card {
                grid-template-columns: 1fr;
            }
        }

        .post-author {
            background: rgba(0, 0, 0, 0.2);
            border-right: 1px solid var(--border-color);
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .mc-avatar {
            width: 80px;
            height: 80px;
            border-radius: 12px;
            image-rendering: pixelated;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
            margin-bottom: 0.8rem;
        }

        .author-nick {
            font-weight: 700;
            font-size: 1rem;
            margin-bottom: 0.4rem;
        }

        .post-content {
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .post-date {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .post-body {
            font-size: 0.95rem;
            line-height: 1.6;
            color: #dddddd;
        }

        .reply-box {
            margin-top: 2rem;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 1.5rem;
        }

        .reply-textarea {
            width: 100%;
            height: 100px;
            background: rgba(0,0,0,0.4);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 1rem;
            color: white;
            outline: none;
            resize: vertical;
            margin-bottom: 1rem;
        }
    
.page-shell { width: 100%; max-width: 1200px; padding: 2rem 1rem; }
.header-nav { display: flex; gap: 12px; align-items: center; }
.header-link { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.header-link:hover { color: var(--accent); }
.error-msg { background: rgba(99, 102, 241, 0.12); border: 1px solid var(--accent); color: #c7d2fe; padding: 10px 12px; border-radius: 10px; margin-bottom: 1rem; font-size: 0.9rem; }
.empty-state { color: var(--text-muted); padding: 1rem 0; }

.format-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.format-btn { background: rgba(255,255,255,0.06); border: 1px solid var(--border-color); color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 0.85rem; font-weight: 700; }
.format-btn:hover { border-color: var(--accent); color: var(--accent); }

.post-image { max-width: 100%; border-radius: 12px; margin: 12px 0; border: 1px solid var(--border-color); display: block; }
.image-upload-hint { margin-bottom: 0.5rem; }
.format-btn .fa-image { pointer-events: none; }

.status-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.status-badge.closed { background: rgba(255,42,75,0.15); color: #ff8fa3; border: 1px solid rgba(255,42,75,0.35); }
.status-badge.locked { background: rgba(255,180,42,0.12); color: #ffd27f; border: 1px solid rgba(255,180,42,0.35); }

.mod-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.mod-actions form { margin: 0; }
.btn-mod { background: rgba(255,255,255,0.06); border: 1px solid var(--border-color); color: #ddd; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.btn-mod:hover { border-color: var(--accent); color: #fff; }
.btn-mod.danger { border-color: rgba(255,42,75,0.45); color: #ff8fa3; }
.status-badge.pinned { background: rgba(170,255,136,0.12); color: #aaff88; border: 1px solid rgba(170,255,136,0.35); }

.category-header-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.section-admin-link { font-size: 0.85rem; }

.admin-hidden-list { display: flex; flex-direction: column; gap: 12px; padding: 1rem; }
.admin-hidden-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 12px; border: 1px solid var(--border-color); border-radius: 12px; }

.section-admin-panel { flex-direction: column; align-items: stretch; }
.rename-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rename-form .form-input { flex: 1; min-width: 180px; }

.post-delete-form { margin-top: 12px; }
.post-actions { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.edited-label { color: var(--text-muted); font-size: 0.85rem; margin-left: 6px; }
.nick-link { text-decoration: none; font-weight: 700; }
.nick-link:hover { text-decoration: underline; }


.profile-header-shell {
    margin-bottom: 1rem;
}

.profile-header-shell.profile-header-special {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 24px;
    overflow: hidden;
    isolation: isolate;
}

.profile-header-shell.profile-header-special .profile-header {
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    padding: 1.65rem 1.85rem;
    border-radius: 22px;
    background: rgba(8, 10, 18, 0.82);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.profile-header-shell.profile-header-special .profile-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
}

.profile-header-main {
    min-width: 0;
    flex: 1;
    position: relative;
    z-index: 1;
}

.profile-header-accent {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

.profile-header-accent::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.profile-header-accent::after {
    content: "";
    position: absolute;
    inset: 10% 8%;
    border-radius: 18px;
    opacity: 0.55;
    filter: blur(28px);
}

/* Scortum Team ? ??????????? ??????????? ????? */
.profile-header-accent-scortum-team::before {
    padding: 3px;
    background: linear-gradient(130deg, #7c3aed, #db2777, #f59e0b, #fde68a, #ec4899, #7c3aed);
    background-size: 360% 360%;
    animation: scortum-card-border 6s ease infinite;
}

.profile-header-accent-scortum-team::after {
    background: radial-gradient(circle at 30% 20%, rgba(219, 39, 119, 0.45), transparent 58%),
        radial-gradient(circle at 75% 80%, rgba(124, 58, 237, 0.35), transparent 55%);
    animation: scortum-card-glow 8s ease-in-out infinite;
}

.profile-header-scortum-team .profile-header {
    background:
        linear-gradient(155deg, rgba(24, 12, 48, 0.97) 0%, rgba(42, 10, 52, 0.95) 48%, rgba(14, 8, 30, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 56px rgba(124, 58, 237, 0.28),
        0 0 96px rgba(219, 39, 119, 0.16),
        0 24px 60px rgba(0, 0, 0, 0.5);
}

.profile-header-scortum-team .profile-header::before {
    background:
        radial-gradient(circle at 12% 0%, rgba(253, 230, 138, 0.14), transparent 42%),
        radial-gradient(circle at 88% 100%, rgba(219, 39, 119, 0.16), transparent 45%);
}

.profile-header-scortum-team .profile-avatar {
    width: 104px;
    height: 104px;
    border: 3px solid rgba(253, 230, 138, 0.78);
    box-shadow:
        0 0 32px rgba(219, 39, 119, 0.5),
        0 0 18px rgba(124, 58, 237, 0.38),
        0 12px 28px rgba(0, 0, 0, 0.55);
    animation: profile-avatar-scortum-pulse 4s ease-in-out infinite;
}

.profile-header-scortum-team .topic-page-title {
    text-shadow: 0 0 24px rgba(253, 186, 116, 0.35);
}

/* ??????????? */
.profile-header-accent-manager::before {
    background: linear-gradient(130deg, #f8fafc, #cbd5e1, #94a3b8, #e2e8f0, #f8fafc);
    background-size: 240% 240%;
    animation: profile-header-border 8s ease infinite;
}

.profile-header-accent-manager::after {
    background: radial-gradient(circle, rgba(226, 232, 240, 0.28), transparent 68%);
}

.profile-header-manager .profile-header {
    background: linear-gradient(155deg, rgba(28, 32, 42, 0.97) 0%, rgba(14, 16, 24, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 36px rgba(226, 232, 240, 0.12),
        0 18px 44px rgba(0, 0, 0, 0.42);
}

.profile-header-manager .profile-header::before {
    background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.08), transparent);
}

.profile-header-manager .profile-avatar {
    border: 2px solid rgba(241, 245, 249, 0.55);
    box-shadow: 0 0 22px rgba(226, 232, 240, 0.2), 0 10px 22px rgba(0, 0, 0, 0.45);
}

/* ??????????? */
.profile-header-accent-developer::before {
    background: linear-gradient(130deg, #2dd4bf, #0ea5e9, #22d3ee, #0ea5e9, #2dd4bf);
    background-size: 240% 240%;
    animation: profile-header-border 7s ease infinite;
}

.profile-header-accent-developer::after {
    background: radial-gradient(circle, rgba(45, 212, 191, 0.3), transparent 68%);
}

.profile-header-developer .profile-header {
    background: linear-gradient(155deg, rgba(8, 32, 36, 0.97) 0%, rgba(6, 18, 32, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(94, 234, 212, 0.08),
        0 0 34px rgba(45, 212, 191, 0.18),
        0 18px 44px rgba(0, 0, 0, 0.42);
}

.profile-header-developer .profile-header::before {
    background: linear-gradient(120deg, rgba(14, 165, 233, 0.1), transparent 55%);
}

.profile-header-developer .profile-avatar {
    border: 2px solid rgba(94, 234, 212, 0.58);
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.28), 0 10px 22px rgba(0, 0, 0, 0.45);
}

/* ??????? ????????????? */
.profile-header-accent-admin-team::before {
    background: linear-gradient(130deg, #f87171, #b91c1c, #ef4444, #b91c1c, #f87171);
    background-size: 240% 240%;
    animation: profile-header-border 7s ease infinite;
}

.profile-header-accent-admin-team::after {
    background: radial-gradient(circle, rgba(248, 113, 113, 0.32), transparent 68%);
}

.profile-header-admin-team .profile-header {
    background: linear-gradient(155deg, rgba(34, 10, 14, 0.97) 0%, rgba(18, 8, 10, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(254, 202, 202, 0.08),
        0 0 34px rgba(248, 113, 113, 0.2),
        0 18px 44px rgba(0, 0, 0, 0.42);
}

.profile-header-admin-team .profile-header::before {
    background: linear-gradient(120deg, rgba(248, 113, 113, 0.1), transparent 55%);
}

.profile-header-admin-team .profile-avatar {
    border: 2px solid rgba(252, 165, 165, 0.55);
    box-shadow: 0 0 22px rgba(248, 113, 113, 0.3), 0 10px 22px rgba(0, 0, 0, 0.45);
}

/* ??????? ?????? */
.profile-header-accent-forum-team::before {
    background: linear-gradient(130deg, #a78bfa, #7c3aed, #c4b5fd, #7c3aed, #a78bfa);
    background-size: 240% 240%;
    animation: profile-header-border 7s ease infinite;
}

.profile-header-accent-forum-team::after {
    background: radial-gradient(circle, rgba(167, 139, 250, 0.32), transparent 68%);
}

.profile-header-forum-team .profile-header {
    background: linear-gradient(155deg, rgba(24, 14, 46, 0.97) 0%, rgba(14, 10, 32, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(221, 214, 254, 0.08),
        0 0 34px rgba(167, 139, 250, 0.2),
        0 18px 44px rgba(0, 0, 0, 0.42);
}

.profile-header-forum-team .profile-header::before {
    background: linear-gradient(120deg, rgba(167, 139, 250, 0.1), transparent 55%);
}

.profile-header-forum-team .profile-avatar {
    border: 2px solid rgba(196, 181, 253, 0.58);
    box-shadow: 0 0 22px rgba(167, 139, 250, 0.28), 0 10px 22px rgba(0, 0, 0, 0.45);
}

/* ??????? ?????????? */
.profile-header-accent-builders-team::before {
    background: linear-gradient(130deg, #fb923c, #ea580c, #fdba74, #ea580c, #fb923c);
    background-size: 240% 240%;
    animation: profile-header-border 7s ease infinite;
}

.profile-header-accent-builders-team::after {
    background: radial-gradient(circle, rgba(251, 146, 60, 0.3), transparent 68%);
}

.profile-header-builders-team .profile-header {
    background: linear-gradient(155deg, rgba(34, 16, 8, 0.97) 0%, rgba(20, 10, 6, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(253, 186, 116, 0.08),
        0 0 32px rgba(251, 146, 60, 0.18),
        0 18px 44px rgba(0, 0, 0, 0.42);
}

.profile-header-builders-team .profile-header::before {
    background: linear-gradient(120deg, rgba(251, 146, 60, 0.1), transparent 55%);
}

.profile-header-builders-team .profile-avatar {
    border: 2px solid rgba(253, 186, 116, 0.58);
    box-shadow: 0 0 22px rgba(251, 146, 60, 0.26), 0 10px 22px rgba(0, 0, 0, 0.45);
}

.profile-header-special .topic-page-title {
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
}

.profile-header-special .profile-stats {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes profile-header-border {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes profile-avatar-scortum-pulse {
    0%, 100% {
        box-shadow:
            0 0 32px rgba(219, 39, 119, 0.5),
            0 0 18px rgba(124, 58, 237, 0.38),
            0 12px 28px rgba(0, 0, 0, 0.55);
    }
    50% {
        box-shadow:
            0 0 42px rgba(219, 39, 119, 0.62),
            0 0 28px rgba(124, 58, 237, 0.48),
            0 14px 32px rgba(0, 0, 0, 0.55);
    }
}

.profile-header { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1rem; }
.profile-avatar { width: 96px; height: 96px; border-radius: 16px; image-rendering: pixelated; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 10px; color: var(--text-muted); font-size: 0.9rem; }
.profile-restrictions { margin-top: 1rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: 12px; }

.mod-restrict { margin-top: 10px; }
.mod-restrict summary { cursor: pointer; color: var(--text-muted); }
.restrict-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.restrict-form label { color: var(--text-muted); font-size: 0.9rem; }

.author-nick { font-weight: 700; margin-top: 8px; }
.btn-inline { width: auto; display: inline-block; padding: 10px 25px; text-decoration: none; }

/* --- ????????? ????????? --- */
@media (max-width: 768px) {
    body.forum-page {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
        -webkit-text-size-adjust: 100%;
    }

    .forum-site-header {
        padding: 24px 16px 12px;
        gap: 12px;
    }

    .brand-logo {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }

    .brand h1 {
        font-size: 26px;
    }

    .forum-main-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-main-nav .nav-btn {
        justify-content: center;
        padding: 12px 18px;
    }

    .forum-main-nav .header-search {
        width: 100%;
    }

    .forum-main-nav .header-search-input {
        flex: 1;
        width: auto;
        min-width: 0;
        font-size: 16px;
    }

    .forum-shell {
        padding: 0 max(0.75rem, env(safe-area-inset-left)) max(2rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-right));
        gap: 18px;
    }

    .forum-layout {
        gap: 1.25rem;
    }

    .category-box,
    .sidebar-box,
    .reply-box,
    .auth-card {
        padding: 1rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }

    .category-header {
        font-size: 1rem;
    }

    .category-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .topic-page-title {
        font-size: 1.35rem;
        line-height: 1.3;
        word-break: break-word;
    }

    .topic-page-header .topic-meta {
        white-space: normal;
        line-height: 1.5;
    }

    .topic-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .topic-item:hover {
        transform: none;
    }

    .topic-item-pinned:hover {
        transform: none;
    }

    .topic-info-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .topic-info-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.35;
    }

    .topic-count {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 2px 8px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 999px;
    }

    .status-badge {
        margin-left: 0;
        margin-top: 4px;
        font-size: 0.62rem;
    }

    .post-card {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .post-author {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        text-align: left;
        gap: 12px;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .mc-avatar {
        width: 52px;
        height: 52px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .post-author .author-nick {
        margin-top: 0;
    }

    .post-content {
        padding: 1rem;
    }

    .post-body {
        font-size: 1rem;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    .post-date {
        font-size: 0.7rem;
        line-height: 1.4;
    }

    .post-actions,
    .mod-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .post-actions .header-link,
    .mod-actions .btn-mod,
    .mod-actions form,
    .post-delete-form {
        width: 100%;
    }

    .mod-actions .btn-mod,
    .post-delete-form .btn-mod {
        width: 100%;
        min-height: 44px;
    }

    .format-toolbar {
        gap: 6px;
    }

    .format-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 1rem;
    }

    .form-input,
    .reply-textarea {
        font-size: 16px;
    }

    .reply-textarea {
        min-height: 120px;
    }

    .btn-submit,
    .btn-inline {
        width: 100%;
        min-height: 48px;
        text-align: center;
        box-sizing: border-box;
    }

    .profile-header-shell.profile-header-special .profile-header,
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-header-main {
        width: 100%;
    }

    .profile-rank-row {
        justify-content: center;
    }

    .profile-stats {
        justify-content: center;
        font-size: 0.82rem;
        gap: 8px 14px;
    }

    .admin-hidden-item {
        flex-direction: column;
        align-items: stretch;
    }

    .rename-form {
        flex-direction: column;
        align-items: stretch;
    }

    .rename-form .form-input {
        min-width: 0;
        width: 100%;
    }

    .mini-avatar {
        width: 36px;
        height: 36px;
    }

    .mini-title,
    .mini-sub {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

@media (max-width: 400px) {
    body.forum-page .forum-header .header-btn span {
        display: none;
    }

    body.forum-page .forum-header .header-btn.user-logged span {
        display: inline;
        max-width: 72px;
    }

    .topic-page-title {
        font-size: 1.2rem;
    }
}

.appeal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.appeal-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.appeal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.appeal-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(167, 139, 250, 0.35);
}

.appeal-row-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.appeal-status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.appeal-status-awaiting_moderator {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.35);
}

.appeal-status-awaiting_admin {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.35);
}

.appeal-status-accepted {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.35);
}

.appeal-status-rejected,
.appeal-status-closed {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.35);
}

.appeal-deadline {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #fbbf24;
}

.appeal-detail {
    padding: 1.25rem;
}

.appeal-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
}

.appeal-fact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.95rem;
}

.appeal-fact > span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.45);
}

.appeal-fact code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #c4b5fd;
}

.appeal-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.appeal-section-moderator {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.4);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(96, 165, 250, 0.4);
}

.appeal-section-moderator .appeal-section-title {
    color: #93c5fd;
}

.appeal-section-admin {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(248, 113, 113, 0.4);
}

.appeal-section-admin .appeal-section-title {
    color: #fca5a5;
}

.appeal-inner-form {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 0.75rem;
}

.appeal-alert {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.45);
}

.appeal-alert-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
    font-size: 1rem;
}

.appeal-alert-title {
    font-weight: 700;
    color: #fecaca;
    margin-bottom: 0.25rem;
}

.appeal-alert-text {
    color: #fde8e8;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ddd;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.appeal-section-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.appeal-message-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.5rem;
}

.appeal-message-body {
    line-height: 1.6;
    white-space: pre-wrap;
}

.appeal-attachment-img {
    display: block;
    max-width: 100%;
    margin-top: 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.appeal-attachment-video {
    display: block;
    width: 100%;
    max-width: 640px;
    margin-top: 0.75rem;
    border-radius: 10px;
    background: #000;
}

.appeal-nick {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.appeal-decision {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.appeal-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
}

.appeal-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.appeal-inline-form .form-input {
    min-width: 200px;
}

.btn-mod.success {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.4);
    color: #4ade80;
}

@media (max-width: 768px) {
    .appeal-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .appeal-facts {
        grid-template-columns: 1fr;
    }

    .appeal-inline-form {
        width: 100%;
    }

    .appeal-inline-form .form-input {
        width: 100%;
        min-width: 0;
    }
}

.author-statuses,
.profile-statuses-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    margin-top: 0.55rem;
}

.profile-rank-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.profile-statuses-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    margin-top: 0;
    gap: 0.35rem;
}

.profile-rating-row {
    margin-top: 0.45rem;
}

.forum-auto-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.12rem 0.42rem;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.25;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    white-space: normal;
    text-align: center;
}

.forum-special-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    border: 1px solid transparent;
    white-space: normal;
    text-align: center;
}

.forum-special-statuses {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}

.auto-newbie,
.auto-participant,
.auto-familiar,
.auto-social,
.auto-active,
.auto-regular,
.auto-veteran,
.auto-expert,
.auto-master,
.auto-legend {
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.author-rating {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.3;
}

.author-rating-value {
    color: #d1d5db;
    font-weight: 700;
}

.post-votes {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.post-vote-form {
    display: inline;
    margin: 0;
}

.post-vote-btn,
.post-vote-count {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-size: 0.78rem;
    line-height: 1.2;
}

.post-vote-btn {
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.post-vote-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.post-vote-btn.like.active,
.post-vote-count.like {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
}

.post-vote-btn.dislike.active,
.post-vote-count.dislike {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
}

.admin-profile-settings {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-profile-settings-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.special-builders-team {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.18), rgba(234, 88, 12, 0.18));
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.45);
}

.special-forum-team {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(124, 58, 237, 0.18));
    color: #ddd6fe;
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.16);
}

.special-admin-team {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(185, 28, 28, 0.18));
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: 0 0 14px rgba(248, 113, 113, 0.14);
}

.special-developer {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(14, 165, 233, 0.18));
    color: #99f6e4;
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 0 14px rgba(45, 212, 191, 0.14);
}

.special-manager {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.16), rgba(148, 163, 184, 0.18));
    color: #f8fafc;
    border-color: rgba(226, 232, 240, 0.45);
    box-shadow: 0 0 16px rgba(226, 232, 240, 0.12);
}

.special-scortum-team {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 35%, #f59e0b 70%, #fde68a 100%);
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
            0 0 22px rgba(219, 39, 119, 0.35),
            0 0 36px rgba(124, 58, 237, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    animation: scortum-team-glow 3s ease-in-out infinite;
}

@keyframes scortum-team-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

.owner-status-panel {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-assign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
    margin: 0.85rem 0 1rem;
}

.status-assign-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
}

.status-assign-item input {
    flex-shrink: 0;
}

.post-card.post-card-scortum-team,
.post-card.post-card-admin-team {
    position: relative;
    overflow: hidden;
}

.post-card-accent {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.post-card-scortum-team > .post-author,
.post-card-scortum-team > .post-content,
.post-card-admin-team > .post-author,
.post-card-admin-team > .post-content {
    position: relative;
    z-index: 1;
}

.post-card.post-card-scortum-team {
    border: none;
    background:
        linear-gradient(155deg, rgba(18, 10, 38, 0.98) 0%, rgba(36, 8, 48, 0.96) 45%, rgba(12, 8, 28, 0.98) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 0 48px rgba(124, 58, 237, 0.28),
        0 0 80px rgba(219, 39, 119, 0.14),
        0 24px 60px rgba(0, 0, 0, 0.5);
    border-radius: 22px;
}

.post-card-accent-scortum::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(130deg, #7c3aed, #db2777, #f59e0b, #fde68a, #a855f7, #7c3aed);
    background-size: 320% 320%;
    animation: scortum-card-border 7s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.post-card-accent-scortum::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -20%;
    width: 70%;
    height: 140%;
    background: radial-gradient(circle, rgba(219, 39, 119, 0.22) 0%, transparent 68%);
    animation: scortum-card-glow 8s ease-in-out infinite;
}

.post-card-scortum-team .post-author {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.22) 0%, rgba(219, 39, 119, 0.1) 55%, rgba(0, 0, 0, 0.15) 100%);
    border-right: 1px solid rgba(253, 186, 116, 0.22);
}

.post-card-scortum-team .post-content {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, transparent 55%);
}

.post-card-scortum-team .mc-avatar {
    border: 2px solid rgba(253, 230, 138, 0.72);
    box-shadow:
        0 0 28px rgba(219, 39, 119, 0.45),
        0 0 12px rgba(124, 58, 237, 0.35),
        0 10px 24px rgba(0, 0, 0, 0.55);
}

.post-card-scortum-team .author-nick .nick-link {
    text-shadow: 0 0 18px rgba(253, 186, 116, 0.35);
}

.post-card-scortum-team .post-date {
    color: #f5d0fe;
}

.post-card-scortum-team .forum-special-status.special-scortum-team {
    animation: scortum-team-glow 3s ease-in-out infinite;
    transform: scale(1.02);
}

.post-card.post-card-admin-team {
    border: 1px solid rgba(248, 113, 113, 0.42);
    background:
        linear-gradient(155deg, rgba(28, 10, 12, 0.97) 0%, rgba(18, 8, 10, 0.98) 100%);
    box-shadow:
        0 0 28px rgba(248, 113, 113, 0.14),
        0 16px 40px rgba(0, 0, 0, 0.42);
    border-radius: 20px;
}

.post-card-accent-admin::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0%, rgba(248, 113, 113, 0.06) 45%, transparent 100%);
}

.post-card-admin-team .post-author {
    background: linear-gradient(180deg, rgba(185, 28, 28, 0.18) 0%, rgba(0, 0, 0, 0.22) 100%);
    border-right: 1px solid rgba(248, 113, 113, 0.28);
}

.post-card-admin-team .mc-avatar {
    border: 2px solid rgba(252, 165, 165, 0.45);
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.22), 0 8px 20px rgba(0, 0, 0, 0.45);
}

.post-card-admin-team .post-content {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.05) 0%, transparent 60%);
}

.post-card-admin-team .forum-special-status.special-admin-team {
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
}

@keyframes scortum-card-border {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes scortum-card-glow {
    0%, 100% { transform: translateX(0) scale(1); opacity: 0.75; }
    50% { transform: translateX(12%) scale(1.08); opacity: 1; }
}

@media (max-width: 650px) {
    .post-card-scortum-team .post-author,
    .post-card-admin-team .post-author {
        border-right: none;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}
.format-size-wrap {
    display: inline-flex;
    align-items: center;
}

.format-size-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.format-color-palette {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.format-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    cursor: pointer;
    padding: 0;
}

.format-color-custom {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.25);
    display: inline-flex;
}

.format-color-input {
    width: 40px;
    height: 40px;
    border: none;
    padding: 0;
    margin: -7px;
    cursor: pointer;
    background: transparent;
}

.nav-store-btn {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    position: relative;
    overflow: visible;
}

.nav-store-deal {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.45);
    background: rgba(15, 17, 23, 0.95);
    background-image: linear-gradient(90deg, #fbbf24, #f472b6, #22d3ee, #a78bfa, #fbbf24);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: store-deal-shine 3.5s linear infinite;
    pointer-events: none;
}

.nav-store-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@keyframes store-deal-shine {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* ================= Breadcrumbs ================= */
.forum-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    border-radius: 0;
    color: var(--text-muted);
}
.forum-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}
.forum-breadcrumbs a:hover {
    color: var(--text-main);
}
.forum-breadcrumbs .crumb-sep {
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
}
.forum-breadcrumbs .crumb-current {
    color: var(--text-main);
    font-weight: 600;
}

/* ================= Forum Welcome ================= */
.forum-welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 18px;
    margin-bottom: 8px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
}
.forum-welcome-badge {
    display: none;
}
.forum-welcome-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.forum-welcome-sub {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.45;
}
.btn-forum-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-forum-action:hover {
    background: var(--accent);
    border-color: var(--accent-hover);
}

/* ================= Appeal Stepper ================= */
.appeal-stepper-box {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
}
.appeal-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.stepper-step {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.stepper-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
}
.stepper-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}
.stepper-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.stepper-time {
    font-size: 11px;
    color: #10b981;
    margin-top: 2px;
}
.stepper-line {
    flex: 0 0 32px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}
.stepper-step.step-done .stepper-circle {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
}
.stepper-step.step-active .stepper-circle {
    background: rgba(99, 102, 241, 0.25);
    border-color: #6366f1;
    color: #a5b4fc;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    animation: stepper-glow 2s infinite ease-in-out;
}
.stepper-step.step-skipped .stepper-circle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
}
.stepper-step.step-verdict-accepted .stepper-circle {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.stepper-step.step-verdict-rejected .stepper-circle {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.stepper-step.step-verdict-closed .stepper-circle {
    background: rgba(107, 114, 128, 0.25);
    border-color: #6b7280;
    color: #9ca3af;
}
.stepper-pulse {
    color: #6366f1;
    font-weight: 600;
}
@keyframes stepper-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 22px rgba(99, 102, 241, 0.7); }
}

/* ================= Guidance Card ================= */
.appeal-guidance-card {
    padding: 18px 22px;
    margin-bottom: 20px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    backdrop-filter: blur(10px);
}
.guidance-title {
    font-size: 14px;
    font-weight: 700;
    color: #c7d2fe;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.guidance-list {
    margin: 0;
    padding-left: 20px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
}

/* ================= Quotes & Code Blocks ================= */
.forum-quote {
    margin: 14px 0;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.035);
    border-left: 4px solid var(--accent);
    border-radius: 4px 10px 10px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.forum-quote-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a5b4fc;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.forum-quote-body {
    font-size: 13.5px;
    color: #e2e8f0;
    font-style: italic;
    line-height: 1.5;
}
.forum-code-block {
    margin: 14px 0;
    padding: 14px 18px;
    background: #090b10;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #38bdf8;
}
.forum-inline-link {
    color: #818cf8;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}
.forum-inline-link:hover {
    color: #a5b4fc;
}

/* ================= Live Preview & Editor Enhancements ================= */
.forum-live-preview {
    display: none;
    padding: 16px;
    margin-top: 12px;
    background: rgba(15, 20, 30, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 10px;
    min-height: 80px;
}
.preview-header {
    font-size: 12px;
    font-weight: 700;
    color: #818cf8;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.format-preview-btn {
    margin-left: auto;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}
.format-preview-btn:hover,
.format-preview-btn.active {
    background: var(--accent);
    color: #ffffff;
}
.editor-drop-active {
    outline: 2px dashed var(--accent) !important;
    outline-offset: 4px;
    background: rgba(99, 102, 241, 0.08) !important;
}
.floating-quote-btn {
    position: absolute;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 6px;
    background: #4f46e5;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.5);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.floating-quote-btn:hover {
    background: #4338ca;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .appeal-stepper {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .stepper-line {
        display: none;
    }
    .forum-welcome-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .forum-site-header {
        flex-direction: column;
        align-items: center;
        padding: 16px 16px 8px;
    }
    .auth-block {
        justify-content: center;
    }
}


/* ================= Forum UX Redesign ================= */
.forum-shell {
    max-width: 1180px;
    gap: 18px;
    padding: 0 18px 3.5rem;
}

.forum-welcome-banner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 0 18px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.forum-welcome-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.forum-welcome-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 6px;
}

.forum-welcome-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
    max-width: 520px;
}

.forum-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.btn-forum-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-forum-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.btn-forum-action-primary {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.4);
    color: #fff;
}

.btn-forum-action-primary:hover {
    background: rgba(99, 102, 241, 0.28);
    border-color: rgba(99, 102, 241, 0.55);
}

.forum-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.categories-column,
.sidebar-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-column {
    position: sticky;
    top: 14px;
}

.category-box,
.sidebar-box {
    background: #12151c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.category-header-row {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.category-header {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-bottom: 0;
    border-bottom: none;
}

.category-header::before {
    display: none;
}

.topic-list,
.section-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.topic-item,
a.topic-item.section-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.topic-item:not(.section-item) {
    grid-template-columns: minmax(0, 1fr) auto;
}

.topic-item:hover,
a.topic-item.section-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: none;
}

.section-ico {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #a5b4fc;
    flex-shrink: 0;
}

.section-ico i {
    font-size: 14px;
}

.topic-info-title {
    font-size: 14px;
    font-weight: 700;
    color: #f3f4f6;
}

.topic-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-muted);
    white-space: normal;
}

.topic-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    min-width: 54px;
    flex-shrink: 0;
}

.topic-stat-value {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.topic-stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.topic-count {
    display: none;
}

.sidebar-title {
    margin-bottom: 12px;
    font-size: 11px;
    letter-spacing: 0.06em;
}

.sidebar-title i {
    color: #818cf8;
}

.mini-item {
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.mini-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.forum-admin-link {
    margin: 0;
    padding: 0 4px;
}

.forum-breadcrumbs {
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(18, 21, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.topic-page-header {
    padding: 16px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: #12151c;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.topic-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.topic-page-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.topic-page-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
    max-width: 640px;
}

.topic-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.topic-page-links {
    margin-top: 8px;
}

.posts-stack {
    gap: 12px;
}

.post-card {
    border-radius: 16px;
    background: #12151c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    grid-template-columns: 180px minmax(0, 1fr);
}

.post-author {
    padding: 16px 14px;
    background: rgba(0, 0, 0, 0.22);
}

.post-content {
    padding: 16px 18px;
}

.reply-box {
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    background: #12151c;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-submit.btn-inline {
    border-radius: 12px;
    padding: 10px 16px;
}

.pinned-topics-box,
.regular-topics-box {
    margin-bottom: 0;
}

@media (max-width: 980px) {
    .forum-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-column {
        position: static;
    }
}

@media (max-width: 700px) {
    .forum-welcome-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .forum-welcome-actions {
        justify-content: flex-start;
    }
    .forum-welcome-title {
        font-size: 24px;
    }
    .topic-item,
    a.topic-item.section-item {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .topic-item:not(.section-item) {
        grid-template-columns: minmax(0, 1fr);
    }
    .topic-stats {
        grid-column: 2;
        align-items: flex-start;
        flex-direction: row;
        gap: 6px;
        min-width: 0;
    }
    .post-card {
        grid-template-columns: 1fr;
    }
}
