/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5865F2;
    --primary-hover: #4752C4;
    --primary-light: #7983F5;
    --accent-color: #EB459E;
    --accent-hover: #D93B8A;
    --success-color: #57F287;
    --danger-color: #ED4245;
    --warning-color: #FEE75C;
    --bg-color: #1a1a1a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: #2a2a2a;
    --text-primary: #FFFFFF;
    --text-secondary: #C0C0C0;
    --text-muted: #999999;
    --border-color: #333333;
    --border-hover: #444444;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 12px rgba(88, 101, 242, 0.3);
    --gradient-primary: linear-gradient(135deg, #5865F2 0%, #7983F5 100%);
    --gradient-accent: linear-gradient(135deg, #EB459E 0%, #F78FB3 100%);
    --gradient-bg: linear-gradient(180deg, #1a1a1a 0%, #1a1a1a 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    flex-shrink: 0;
    margin-right: auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    transition: all 0.2s ease;
    position: relative;
    gap: 0;
}

.logo:hover {
    color: var(--primary-color);
    opacity: 0.8;
}

.logo-text {
    color: var(--text-primary);
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
    transition: opacity 0.2s ease;
}

.logo-icon {
    font-size: 2rem;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 50px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.user-info:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.user-avatar-link {
    text-decoration: none;
    line-height: 0;
}

.user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.user-name:hover {
    color: var(--primary-light);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    flex: 1;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-auth-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.btn-auth-text:hover {
    color: var(--text-primary);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(108, 99, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 101, 132, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input, .form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
    background: var(--bg-tertiary);
}

.login-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: var(--primary-color);
}

/* Alert */
.alert {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fca5a5;
}

.auth-error {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fca5a5;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* Forum Header */
.forum-header {
    text-align: left;
    margin-bottom: 2rem;
    padding: 1.5rem 0 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.forum-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.forum-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Categories Grid */
.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.75rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 90px;
}

.category-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.category-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
}

.category-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.category-emoji {
    font-size: 32px;
    line-height: 1;
}

.category-icon-svg {
    width: 32px;
    height: 32px;
}

.category-info {
    flex: 1;
}

.category-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--text-primary);
}

.category-stats {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

.category-arrow {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-arrow svg {
    stroke: var(--text-muted);
    transition: all 0.2s;
}

.category-card:hover .category-arrow svg {
    stroke: var(--text-secondary);
    transform: translateX(3px);
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.category-title {
    display: flex;
    align-items: center;
}

.category-title h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Topics List */
.topics-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.topic-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.topic-item:hover {
    background: var(--bg-tertiary);
}

.topic-status {
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
}

.status-На-рассмотрении, .status-на-рассмотрении {
    background: rgba(254, 231, 92, 0.2);
    color: #C4A000;
}

.status-Одобрено, .status-одобрено {
    background: rgba(87, 242, 135, 0.2);
    color: #2D9D4E;
}

.status-Отказано, .status-отказано {
    background: rgba(237, 66, 69, 0.2);
    color: #C12A2D;
}

.status-Важно, .status-важно {
    background: rgba(235, 69, 158, 0.2);
    color: #D93B8A;
}

.topic-content {
    flex: 1;
}

.topic-content h3, .topic-content h4 {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.topic-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
}

.topic-closed {
    color: var(--danger-color);
    font-weight: 700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px dashed var(--border-color);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
    font-weight: 500;
}

/* Online Users Section */
.online-section {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.online-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.online-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.online-user {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.online-user:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.online-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .online-section {
        grid-template-columns: 1fr;
    }
}

/* Topic View */
.topic-view {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.topic-view-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.topic-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.topic-title-section {
    flex: 1;
}

.topic-title-with-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.topic-title-with-status h1 {
    font-size: 1.75rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.topic-prefix {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gradient-accent);
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 101, 132, 0.3);
}

.topic-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.topic-author-link {
    text-decoration: none;
}

.topic-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.topic-author-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.topic-author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.topic-author-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.topic-author-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.topic-author-name:hover {
    color: var(--primary-light);
}

.topic-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.topic-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.status-select {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.status-select:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

/* Post */
.post {
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.post:hover {
    border-color: var(--border-hover);
}

.main-post {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
    background: var(--bg-card);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.author-avatar-link {
    text-decoration: none;
    line-height: 0;
}

.author-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.author-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.author-name:hover {
    color: var(--primary-light);
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.post-content {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Replies Section */
.replies-section {
    margin-top: 3rem;
}

.replies-section h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Reply Form */
.reply-form-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.reply-form-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Topic Closed Message */
.topic-closed-message {
    margin-top: 3rem;
    padding: 1.75rem;
    background: rgba(244, 63, 94, 0.1);
    border: 2px solid rgba(244, 63, 94, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.topic-closed-message svg {
    width: 28px;
    height: 28px;
    color: var(--danger-color);
    flex-shrink: 0;
}

.topic-closed-message p {
    color: var(--danger-color);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

/* Rich Editor */
.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 16px 16px 0 0;
    border: 2px solid var(--border-color);
    border-bottom: none;
    flex-wrap: wrap;
}

.editor-toolbar button {
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.9rem;
}

.editor-toolbar button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.editor-toolbar input[type="color"] {
    width: 48px;
    height: 42px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.editor-toolbar input[type="color"]:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.rich-editor {
    min-height: 220px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0 0 16px 16px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    line-height: 1.8;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s;
}

.rich-editor:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

.rich-editor[placeholder]:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    opacity: 0.7;
}

/* Create Topic Form */
.create-topic-form {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.create-topic-form h1 {
    margin-bottom: 0.75rem;
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-description {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Auth Modal */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-modal-box {
    background: var(--bg-card);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
}

.auth-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.auth-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: rotate(90deg);
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 12px;
}

.auth-tab {
    flex: 1;
    padding: 0.875rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.auth-form-section {
    display: none;
}

.auth-form-section.active {
    display: block;
}

/* Admin Panel */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.user-admin-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.user-admin-avatar, .user-admin-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-admin-avatar-placeholder {
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.user-admin-info h3 {
    margin: 0;
    font-size: 1rem;
}

.user-admin-info h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.user-admin-info h3 a:hover {
    color: var(--primary-color);
}

.user-admin-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.role-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.role-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .user-admin-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .user-admin-controls {
        flex-direction: column;
    }
}
.admin-panel {
    background: var(--bg-card);
    border-radius: 24px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.admin-header {
    padding: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.admin-header h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.admin-content {
    display: flex;
    min-height: 600px;
}

.admin-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 2px solid var(--border-color);
    padding: 1.5rem 0;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 12px;
    font-weight: 600;
    position: relative;
}

.admin-menu-item svg {
    width: 22px;
    height: 22px;
}

.admin-menu-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.admin-menu-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.admin-main {
    flex: 1;
    padding: 2.5rem;
    background: var(--bg-color);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
}

.search-box {
    position: relative;
    width: 320px;
}

.search-box svg {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1.25rem 0.875rem 3.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.user-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
}

.user-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(108, 99, 255, 0.2);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-tertiary);
}

.user-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.user-card-avatar-link {
    text-decoration: none;
}

.user-card-avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.user-card-info {
    flex: 1;
}

.user-card-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.user-card-info h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.user-card-info h3 a:hover {
    color: var(--primary-light);
}

.user-id {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.user-card-status {
    flex-shrink: 0;
}

.user-card-body {
    padding: 1.75rem;
}

.user-card-field {
    margin-bottom: 0;
}

.user-card-field label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-card-footer {
    padding: 1.25rem 1.75rem;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(108, 99, 255, 0.2);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.stat-icon svg {
    width: 36px;
    height: 36px;
    color: rgba(0, 0, 0, 0.8);
}

.stat-info {
    position: relative;
    z-index: 1;
}

.stat-info h3 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1.25rem 1.75rem;
    border-radius: 16px;
    font-weight: 600;
    z-index: 9999;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 2px solid rgba(74, 222, 128, 0.3);
}

.notification-error {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 2px solid rgba(244, 63, 94, 0.3);
}

/* Role Select */
.role-select {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.role-select:hover {
    border-color: var(--border-hover);
}

.role-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

/* Status Badge */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 2px solid rgba(74, 222, 128, 0.3);
}

.status-banned {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 2px solid rgba(244, 63, 94, 0.3);
}

/* Recent Topics */
.recent-topics {
    margin-top: 4rem;
}

.recent-topics h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer */
.main-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 1.5rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-container p {
    margin: 0.25rem 0;
}

.footer-links {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

/* Responsive */
@media (max-width: 768px) {

    /* === CONTAINER === */
    .container {
        padding: 1rem;
    }

    /* === HEADER === */
    .header-container {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-left {
        flex: 1;
    }

    .header-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        gap: 0.25rem;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .header-nav::-webkit-scrollbar { display: none; }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
        white-space: nowrap;
    }

    .nav-link svg { display: none; }

    .header-right {
        gap: 0.5rem;
        margin-left: 0;
    }

    .user-info {
        padding: 0.35rem 0.6rem;
        gap: 0.5rem;
    }

    .user-details { display: none; }

    .user-avatar, .user-avatar-img {
        width: 32px;
        height: 32px;
    }

    .btn-secondary.btn-sm {
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
    }

    /* === УВЕДОМЛЕНИЯ === */
    .notif-dropdown {
        right: -60px;
        width: calc(100vw - 24px);
        max-width: 360px;
    }

    .notif-dropdown::before { display: none; }

    /* === ФОРУМ — КАТЕГОРИИ === */
    .forum-header h1 { font-size: 1.3rem; }

    .category-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .category-icon-box {
        width: 40px;
        height: 40px;
    }

    .category-icon-img {
        width: 36px;
        height: 36px;
    }

    .category-info h3 { font-size: 0.95rem; }
    .category-stats { font-size: 0.8rem; }

    /* === ОНЛАЙН === */
    .online-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* === ТОПИК — ЗАГОЛОВОК === */
    .topic-header-new {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .topic-title-row { flex-wrap: wrap; }

    .topic-title-new {
        font-size: 1rem;
        white-space: normal;
    }

    .btn-reply-top {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* === ТОПИК — ОСНОВНОЙ ПОСТ === */
    .topic-main-content {
        flex-direction: column;
        min-height: auto;
    }

    .topic-author-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
        border-right: none;
        border-bottom: 1px solid #2a2a2a;
    }

    .author-label { display: none; }

    .author-info-sidebar {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.75rem;
    }

    .author-avatar-sidebar,
    .author-avatar-placeholder-sidebar {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .author-details-sidebar {
        align-items: flex-start;
        gap: 0.1rem;
    }

    .author-name-sidebar { font-size: 0.9rem; }
    .author-role-text { font-size: 0.72rem; }
    .author-date-sidebar { font-size: 0.65rem; }
    .role-badge-sidebar { height: 20px; margin-top: 0; }

    .topic-actions-sidebar {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        margin-left: auto;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem;
        width: auto;
    }

    .action-select,
    .action-btn {
        width: auto;
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .action-btn span { display: none; }

    .main-post-new {
        padding: 1rem;
        min-height: 150px;
        width: 100%;
    }

    /* === ОТВЕТЫ === */
    .topic-reply-content { flex-direction: column; }

    .reply-author-sidebar-small {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 0.6rem 1rem;
        gap: 0.6rem;
        border-right: none;
        border-bottom: 1px solid #2a2a2a;
    }

    .author-label-small { display: none; }

    .author-avatar-small,
    .author-avatar-placeholder-small {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .author-details-small {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.05rem;
    }

    .author-name-small { font-size: 0.82rem; }
    .author-role-text-small { font-size: 0.68rem; }
    .author-date-small { font-size: 0.62rem; margin-top: 0; }
    .role-badge-small { height: 16px; }

    .delete-reply-small {
        width: auto;
        margin-top: 0;
        margin-left: auto;
        padding: 0.4rem 0.6rem;
    }

    .reply-post-content {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    /* === ФОРМА ОТВЕТА === */
    .reply-form-wrapper { flex-direction: column; }

    .reply-author-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 0.6rem 1rem;
        gap: 0.6rem;
        border-right: none;
        border-bottom: 1px solid #2a2a2a;
    }

    .reply-editor-section { padding: 0.75rem 1rem; }

    .editor-toolbar {
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 0.6rem;
    }

    .editor-toolbar button {
        padding: 0.4rem 0.6rem;
        font-size: 0.82rem;
    }

    .color-picker-btn,
    .tpl-picker-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.78rem;
    }

    .color-dropdown,
    .tpl-dropdown {
        position: fixed;
        left: 12px;
        right: 12px;
        width: auto;
        top: auto;
        bottom: 70px;
    }

    .rich-editor { min-height: 120px; }

    /* === СОЗДАНИЕ ТЕМЫ === */
    .create-topic-form {
        padding: 1rem;
        border-radius: 8px;
    }

    .create-topic-form h1 { font-size: 1.3rem; }

    /* === КАТЕГОРИЯ / ТЕМЫ === */
    .category-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .topic-item {
        flex-wrap: wrap;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .topic-status { font-size: 0.68rem; }
    .topic-content h3 { font-size: 0.88rem; }
    .topic-meta { font-size: 0.72rem; flex-wrap: wrap; gap: 0.4rem; }

    /* === ПРОФИЛЬ === */
    .profile-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 1rem 1rem;
        margin-top: -40px;
    }

    .profile-avatar-big { width: 80px; height: 80px; }
    .profile-avatar-letter { font-size: 2rem; }

    .profile-username-row {
        justify-content: center;
        flex-wrap: wrap;
    }

    .profile-username-text { font-size: 1.3rem; }

    .profile-stats-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .profile-banner-actions { padding-top: 0.5rem; }

    .profile-body { flex-direction: column; }
    .profile-sidebar { width: 100%; }

    /* === АДМИН === */
    .admin-content { flex-direction: column; }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 0;
    }

    .admin-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 0.5rem;
        gap: 0.25rem;
    }

    .admin-menu-item {
        white-space: nowrap;
        padding: 0.6rem 0.8rem;
        font-size: 0.82rem;
    }

    .admin-menu-item svg { display: none; }
    .admin-main { padding: 1rem; }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .search-box { width: 100%; }
    .users-grid { grid-template-columns: 1fr; }

    /* === ФОРМЫ === */
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; text-align: center; }

    /* === BREADCRUMB === */
    .breadcrumb {
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-bottom: 1rem;
    }

    /* === AUTH MODAL === */
    .auth-modal-box {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
}

/* Profile Page - LEGACY (replaced by new profile design below) */
.profile-page { }
.profile-header { }
.profile-avatar-large { }
.profile-avatar-large img { }
.avatar-placeholder { }
.profile-info { }
.profile-info h1 { }
.profile-role { }
.profile-meta { }
.profile-content { }
.profile-content h2 { }

/* Landing Page */
.landing-hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(108, 99, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 101, 132, 0.15) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.landing-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.landing-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-sub {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 500;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.landing-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.landing-btns .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 16px;
}

@media (max-width: 768px) {
    .landing-title {
        font-size: 2.5rem;
    }
    
    .landing-sub {
        font-size: 1.2rem;
    }
    
    .landing-btns {
        flex-direction: column;
        width: 100%;
    }
    
    .landing-btns .btn {
        width: 100%;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    width: 90%;
    max-width: 540px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 800;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-body p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.avatar-preview {
    margin-top: 1.5rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-preview img {
    max-width: 220px;
    max-height: 220px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
}

.error-text {
    color: var(--danger-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 2rem;
    border-top: 2px solid var(--border-color);
    justify-content: flex-end;
    background: var(--bg-secondary);
}

/* Role Badges */
.role-badge-img {
    display: inline-block;
    height: 24px;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Responsive Profile */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* New Topic View Design */
.topic-view-new {
    background: var(--bg-color);
    width: 100%;
}

.topic-header-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #ff8800;
}

.topic-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    flex-wrap: nowrap;
    overflow: hidden;
}

.topic-prefix-new {
    color: #ffffff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 18px;
    font-weight: 700;
    align-self: center;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prefix-important {
    background: #cc2200;
    box-shadow: 0 2px 6px rgba(204, 34, 0, 0.35);
}

.prefix-review {
    background: #ff8800;
    box-shadow: 0 2px 6px rgba(255, 136, 0, 0.35);
}

.prefix-accepted {
    background: #00aa55;
    box-shadow: 0 2px 6px rgba(0, 170, 85, 0.35);
}

.prefix-rejected {
    background: #cc2200;
    box-shadow: 0 2px 6px rgba(204, 34, 0, 0.35);
}

.topic-title-new {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Topic Main Content (Author Sidebar + Post) */
.topic-main-content {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid #2a2a2a;
    border-bottom: none;
    margin-bottom: 0;
    width: 100%;
    min-height: 500px;
}

.topic-author-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #1e1e1e;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    border-right: 1px solid #2a2a2a;
    align-self: stretch;
}

.author-label {
    font-size: 0.65rem;
    color: #888;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    align-self: flex-start;
}

.author-info-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    width: 100%;
}

.author-avatar-sidebar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff8800;
    box-shadow: 0 0 12px rgba(255, 136, 0, 0.25);
}

.author-avatar-placeholder-sidebar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ff8800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    border: 2px solid #ff8800;
    box-shadow: 0 0 12px rgba(255, 136, 0, 0.25);
}

.author-details-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
}

.author-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-name-sidebar {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.author-name-sidebar:hover {
    color: #ff8800;
}

.author-role-text {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.1rem;
}

.role-badge-sidebar {
    height: 26px;
    margin-top: 0.25rem;
}

.author-date-sidebar {
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.35rem;
    text-align: center;
    line-height: 1.4;
}

.topic-actions-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #2a2a2a;
    width: 100%;
}

.action-select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid #333;
    border-radius: 4px;
    background: #252525;
    color: #ccc;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s;
    outline: none;
}

.action-select:hover,
.action-select:focus {
    border-color: #ff8800;
}

.action-btn {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    transition: all 0.15s;
    background: #252525;
}

.action-btn:hover {
    filter: brightness(1.2);
}

.btn-pin {
    background: #ff8800;
    color: #000;
}

.btn-warning {
    background: #e67e00;
    color: #fff;
}

.btn-warning:hover {
    background: #ff8800;
}

.btn-success {
    background: #00aa55;
    color: #fff;
}

.btn-success:hover {
    background: #00cc66;
}

.btn-danger {
    background: #cc2200;
    color: #fff;
}

.btn-danger:hover {
    background: #e02200;
}

.btn-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.main-post-new {
    flex: 1;
    background: #1a1a1a;
    padding: 1.5rem;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    min-height: 500px;
}

.post-content-new {
    color: #ccc;
    line-height: 1.7;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-content-new * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: none !important;
    background-color: transparent !important;
}

.post-content-new img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.75rem 0;
}

.post-content-new ol,
.post-content-new ul {
    padding-left: 2rem;
    margin: 0.5rem 0;
}

.post-content-new li {
    margin: 0.25rem 0;
}

/* REPLIES */
.topic-reply-content {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid #2a2a2a;
    border-top: none;
}

.reply-author-sidebar-small {
    width: 250px;
    flex-shrink: 0;
    background: #1e1e1e;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    border-right: 1px solid #2a2a2a;
    align-self: stretch;
}

.author-label-small {
    font-size: 0.65rem;
    color: #888;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    align-self: flex-start;
}

.author-avatar-small {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff8800;
    box-shadow: 0 0 12px rgba(255, 136, 0, 0.25);
}

.author-avatar-placeholder-small {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ff8800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: 700;
    color: #000;
    border: 2px solid #ff8800;
}

.author-details-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
}

.author-name-small {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s;
}

.author-name-small:hover {
    color: #ff8800;
}

.author-role-text-small {
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

.role-badge-small {
    height: 30px;
    margin-top: 0.25rem;
}

.author-date-small {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    text-align: center;
    line-height: 1.4;
}

.delete-reply-small {
    width: 100%;
    padding: 0.4rem;
    border: none;
    border-radius: 4px;
    background: #cc2200;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
    transition: background 0.15s;
}

.delete-reply-small:hover {
    background: #e02200;
}

.delete-reply-small svg {
    width: 13px;
    height: 13px;
}

.reply-post-content {
    flex: 1;
    background: #1a1a1a;
    padding: 1.25rem 1.5rem;
    color: #ccc;
    line-height: 1.8;
    font-size: 1.05rem;
    min-width: 0;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

.reply-post-content::first-letter {
    text-transform: uppercase;
}

.reply-post-content * {
    max-width: 100%;
    background: none !important;
    background-color: transparent !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.reply-post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.5rem 0;
}

/* Reply Form Wrapper */
.reply-form-wrapper {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid #2a2a2a;
    border-top: none;
    margin-top: 0;
}

.reply-author-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #1e1e1e;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    border-right: 1px solid #2a2a2a;
}

.reply-editor-section {
    flex: 1;
    background: #1a1a1a;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.reply-submit-container {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.25rem;
}

.btn-reply-top {
    padding: 0.55rem 1.25rem;
    border: none;
    border-radius: 4px;
    background: #ff8800;
    color: #000;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-reply-top:hover {
    background: #ffaa00;
}

.status-select-new:hover {
    border-color: var(--primary-color);
}

.status-select-new:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 136, 0, 0.2);
}

.btn-action-new {
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-action-new:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-action-new:active {
    transform: translateY(0);
}

.btn-open {
    background: var(--success-color);
    color: white;
}

.btn-open:hover {
    background: #059669;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.topic-author-section {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.author-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.author-info-new {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar-new {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-placeholder-new {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #000000;
}

.author-details-new {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-name-new {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.author-name-new:hover {
    color: var(--primary-color);
}

.author-date-new {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.topic-main-content-REMOVED {
    display: flex;
}

.post-content-new {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.post-content-new * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: none !important;
    background-color: transparent !important;
}

.post-content-new img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.5rem 0;
}

.post-content-new ol,
.post-content-new ul {
    padding-left: 2rem;
    margin: 0.5rem 0;
}

.post-content-new li {
    margin: 0.25rem 0;
}

.post-author-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.author-avatar-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-placeholder-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #000000;
}

.author-name-mini {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.author-name-mini:hover {
    color: var(--primary-color);
}

.post-date-mini {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.topic-author-sidebar {
    background: var(--bg-secondary);
    padding: 1.5rem 1rem;
    border-radius: 0;
    width: 250px;
    flex-shrink: 0;
    min-height: 400px;
    border: none;
}

.author-info-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-avatar-sidebar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.author-avatar-placeholder-sidebar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2.5rem;
    color: #000000;
    margin-bottom: 1rem;
}

.author-details-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.author-name-sidebar {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.author-name-sidebar:hover {
    color: var(--primary-color);
}

.role-badge-sidebar {
    height: 32px;
    margin: 0.5rem 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.main-post-new-REMOVED {
    background: var(--bg-secondary);
}

.reply-post-new {
    background: var(--bg-secondary);
    border: none;
    border-radius: 0;
    padding: 1.25rem;
    margin-bottom: 1rem;
    overflow: hidden;
    max-width: 100%;
}

.author-role-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.author-date-sidebar {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.post-author-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.author-avatar-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-placeholder-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #000000;
}

.author-name-mini {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.author-name-mini:hover {
    color: var(--primary-color);
}

.post-date-mini {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.replies-header-new {
    margin: 3rem 0 2rem 0;
}

.replies-header-new h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.replies-count {
    color: var(--primary-color);
}

.reply-post-new {
    background: var(--bg-secondary);
    border: none;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.reply-post-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.reply-form-new {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.reply-form-new h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* New Topics List Design */
.topics-list-new {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.topic-card-new {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: background 0.2s;
}

.topic-card-new:hover {
    background: #202020;
}

.topic-avatar-link {
    text-decoration: none;
    flex-shrink: 0;
}

.topic-avatar-new {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.topic-avatar-placeholder {
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #000000;
}

.topic-main-info {
    flex: 1;
    min-width: 0;
}

.topic-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.topic-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-important {
    background: #ee0f0f;
    color: #ffffff;
}

.badge-rejected {
    background: #ee0f0f;
    color: #ffffff;
}

.badge-accepted {
    background: #00cc66;
    color: #ffffff;
}

.topic-title-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

.topic-title-link:hover {
    color: var(--primary-color);
}

.topic-meta-new {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.topic-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-stats-new {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-color);
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Topic Actions in Sidebar */
.topic-actions-sidebar {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.action-select:hover {
    border-color: var(--primary-color);
}

.action-btn {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.btn-pin {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-pin:hover {
    background: var(--primary-hover);
}

.btn-warning {
    background: #ff8800;
    color: #ffffff;
}

.btn-warning:hover {
    background: #ff9922;
}

.btn-success {
    background: #00cc66;
    color: #ffffff;
}

.btn-success:hover {
    background: #00dd77;
}

.btn-danger {
    background: #ff3333;
    color: #ffffff;
}

.btn-danger:hover {
    background: #ff4444;
}

/* Delete Reply Button */
.post-author-mini {
    position: relative;
}

.delete-reply-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.delete-reply-btn:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
}

/* Reply Button Top */
.btn-reply-top {
    background: var(--primary-color);
    color: #000000;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reply-top:hover {
    background: var(--primary-hover);
}

.reply-form-new h3 {
    display: none;
}

/* Reply Submit Button Container */
.reply-submit-container {
    margin-top: 1rem;
}

/* Button Emoji Style */
.btn-emoji {
    font-size: 1.1rem;
    margin-right: 0.25rem;
}

/* ==================== NEW PROFILE DESIGN ==================== */
.profile-banner {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.profile-banner-bg {
    height: 150px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-bottom: 2px solid var(--primary-color);
}

.profile-banner-content {
    padding: 0 2rem 1.5rem 2rem;
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-top: -60px;
    position: relative;
}

.profile-avatar-wrap {
    flex-shrink: 0;
}

.profile-avatar-big {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
    object-fit: cover;
}

.profile-avatar-letter {
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: #000000;
}

.profile-banner-info {
    flex: 1;
    padding-top: 1rem;
}

.profile-username-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profile-username-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-role-badge {
    height: 32px;
    vertical-align: middle;
}

.profile-role-tag {
    padding: 0.4rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-stats-row {
    display: flex;
    gap: 2rem;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-stat-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-banner-actions {
    padding-top: 1rem;
    flex-shrink: 0;
}

.profile-action-btn {
    padding: 0.7rem 1.25rem;
    border: 2px solid var(--primary-color);
    border-radius: 0;
    background: transparent;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.profile-action-btn svg {
    width: 18px;
    height: 18px;
}

.profile-action-btn:hover {
    background: var(--primary-color);
    color: #000000;
}

.profile-action-btn-active {
    background: var(--primary-color);
    color: #000000;
}

.profile-body {
    display: flex;
    gap: 1.5rem;
}

.profile-sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-sidebar-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 1.25rem;
}

.profile-sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-key {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.profile-info-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.text-success {
    color: #00cc66 !important;
}

.text-danger {
    color: #ff3333 !important;
}

.profile-sidebar-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-subscribers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.profile-sub-avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s;
}

.profile-sub-avatar:hover {
    transform: scale(1.1);
}

.profile-sub-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-sub-letter {
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
}

.profile-main {
    flex: 1;
}

.profile-main-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 1.25rem;
}

@media (max-width: 768px) {
    .profile-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 1rem 1rem 1rem;
    }
    
    .profile-username-row {
        justify-content: center;
    }
    
    .profile-stats-row {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-body {
        flex-direction: column;
    }
    
    .profile-sidebar {
        width: 100%;
    }
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

/* Reply Form Wrapper */
.reply-form-wrapper {
    display: flex;
    gap: 0;
    margin-top: 2rem;
    align-items: flex-start;
    background: var(--bg-secondary);
}

.reply-author-sidebar {
    background: var(--bg-secondary);
    padding: 1.5rem 1rem;
    border-radius: 0;
    width: 250px;
    flex-shrink: 0;
    border: none;
}

.reply-editor-section {
    background: var(--bg-secondary);
    border: none;
    border-radius: 0;
    padding: 1.5rem;
    flex: 1;
    overflow: hidden;
    max-width: calc(100% - 250px);
    min-width: 0;
}

/* Compact Reply Format */
.reply-compact {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    margin-bottom: 0.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
}

.reply-avatar-link {
    text-decoration: none;
    flex-shrink: 0;
}

.reply-avatar-compact {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.reply-avatar-placeholder-compact {
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #000000;
}

.reply-main-content {
    flex: 1;
    min-width: 0;
}

.reply-header-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.reply-author-name-compact {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.reply-author-name-compact:hover {
    color: var(--primary-color);
}

.role-badge-compact {
    height: 16px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.reply-date-compact {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.reply-text-compact {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.reply-text-compact * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: none !important;
    background-color: transparent !important;
}

.delete-reply-compact {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.delete-reply-compact svg {
    width: 16px;
    height: 16px;
}

.delete-reply-compact:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
}

/* Reply Action Button */
.reply-action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ===== LANDING PAGE ===== */
.landing-hero {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.landing-content {
    max-width: 600px;
    padding: 2rem;
}

.landing-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.landing-sub {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.landing-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.landing-btns .btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    border-radius: 0;
}

/* ===== МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ ===== */
.btn-auth-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.btn-auth-text:hover {
    color: var(--text-primary);
}

.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.auth-modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.auth-modal-close:hover {
    color: var(--text-primary);
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form-section {
    margin-top: 1rem;
}

.auth-error {
    padding: 0.75rem;
    background: #330000;
    border: 1px solid #ff3333;
    color: #ff3333;
    border-radius: 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}


/* Дополнительные анимации и эффекты */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Улучшенные тени для карточек */
.category-card,
.topic-item,
.user-card,
.stat-card {
    will-change: transform, box-shadow;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Кастомная полоса прокрутки */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Выделение текста */
::selection {
    background: rgba(108, 99, 255, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(108, 99, 255, 0.3);
    color: var(--text-primary);
}

/* Анимация появления элементов */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card,
.topic-item,
.user-card {
    animation: fadeIn 0.5s ease-out;
}

.category-card:nth-child(1) { animation-delay: 0.05s; }
.category-card:nth-child(2) { animation-delay: 0.1s; }
.category-card:nth-child(3) { animation-delay: 0.15s; }
.category-card:nth-child(4) { animation-delay: 0.2s; }
.category-card:nth-child(5) { animation-delay: 0.25s; }
.category-card:nth-child(6) { animation-delay: 0.3s; }

/* Эффект при клике на кнопку */
.btn:active {
    transform: scale(0.96);
}

/* Улучшенные фокус-стили для доступности */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Пульсирующая анимация для важных элементов */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(108, 99, 255, 0);
    }
}

.nav-link.active {
    animation: pulse-glow 2s infinite;
}

/* Улучшенный стиль для форм при ошибке */
.form-group input.error,
.form-control.error {
    border-color: var(--danger-color);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Загрузка с анимацией */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Плавающие элементы декора */
.floating-decoration {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.floating-decoration::before,
.floating-decoration::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    opacity: 0.03;
}

.floating-decoration::before {
    background: var(--gradient-primary);
    top: -150px;
    left: -150px;
    animation: float 20s ease-in-out infinite;
}

.floating-decoration::after {
    background: var(--gradient-accent);
    bottom: -150px;
    right: -150px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Градиентная граница для премиум элементов */
.premium-border {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
}

.premium-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    padding: 2px;
    background: var(--gradient-primary);
    -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;
}

/* Стиль для кодовых блоков */
pre, code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 0.2rem 0.5rem;
    font-size: 0.9em;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

/* Улучшенный стиль таблиц */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-tertiary);
    font-weight: 700;
    color: var(--text-primary);
}

tr:hover {
    background: var(--bg-tertiary);
}

/* Стиль для цитат */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-tertiary);
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 0 12px 12px 0;
}

/* Улучшенные ссылки в контенте */
.post-content a,
.reply-post-content a {
    color: var(--primary-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.post-content a:hover,
.reply-post-content a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Стиль для списков в контенте */
.post-content ul,
.post-content ol {
    padding-left: 2rem;
    margin: 1rem 0;
}

.post-content li {
    margin: 0.5rem 0;
    line-height: 1.8;
}

/* ТОЛЬКО ответы по центру */
.reply-post-content ul,
.reply-post-content ol {
    padding-left: 2rem;
    margin: 1rem auto;
    text-align: center;
    list-style-position: inside;
}

.reply-post-content li {
    margin: 0.5rem 0;
    line-height: 1.8;
    text-align: center;
}

/* Hover эффект для аватаров */
.user-avatar,
.user-avatar-img,
.author-avatar,
.author-avatar-img,
.topic-author-avatar,
.user-card-avatar,
.user-card-avatar-img {
    transition: all 0.3s ease;
}

.user-avatar:hover,
.user-avatar-img:hover,
.author-avatar:hover,
.author-avatar-img:hover,
.topic-author-avatar:hover,
.user-card-avatar:hover,
.user-card-avatar-img:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(108, 99, 255, 0.6);
}

/* Эффект печатной машинки для заголовков (опционально) */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Плавный переход между страницами */
.page-transition {
    animation: pageIn 0.4s ease-out;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стиль для badge/метки */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary-light);
    border: 2px solid rgba(108, 99, 255, 0.3);
}

.badge-success {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 2px solid rgba(74, 222, 128, 0.3);
}

.badge-danger {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 2px solid rgba(244, 63, 94, 0.3);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 2px solid rgba(251, 191, 36, 0.3);
}

/* Тултипы */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: var(--bg-card);
    color: var(--text-primary);
    text-align: center;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    border: 2px solid var(--border-color);
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Финальные штрихи */
.container {
    animation: pageIn 0.5s ease-out;
}


/* Анимации для иконок кнопок */
.action-btn svg,
.delete-reply-small svg {
    transition: all 0.3s ease;
}

.action-btn:hover svg {
    transform: scale(1.15);
}

.btn-danger:hover svg {
    animation: shake-delete 0.5s ease;
}

@keyframes shake-delete {
    0%, 100% { transform: rotate(0deg) scale(1.15); }
    25% { transform: rotate(-5deg) scale(1.15); }
    75% { transform: rotate(5deg) scale(1.15); }
}

.btn-pin:hover svg {
    animation: pin-rotate 0.6s ease;
}

@keyframes pin-rotate {
    0%, 100% { transform: rotate(0deg) scale(1.15); }
    50% { transform: rotate(20deg) scale(1.2); }
}

.btn-warning:hover svg,
.btn-success:hover svg {
    animation: lock-jiggle 0.4s ease;
}

@keyframes lock-jiggle {
    0%, 100% { transform: scale(1.15); }
    25% { transform: translateY(-2px) scale(1.15); }
    75% { transform: translateY(2px) scale(1.15); }
}

/* Плавная анимация для иконок категорий */
.category-icon-svg {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-card:hover .category-icon-svg {
    animation: icon-bounce 0.6s ease;
}

@keyframes icon-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15) rotate(5deg); }
}

/* Пульсация для лого */
.logo-icon {
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Hover эффект для nav иконок */
@keyframes nav-icon-spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.nav-link:hover svg {
    animation: nav-icon-spin 0.6s ease;
}


/* Кнопка добавления тега (маленькая) */
.tag-button-wrapper {
    margin: 0.5rem 0 1rem 0;
}

.btn-add-tag-mini {
    background: transparent;
    color: #FFA500;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.btn-add-tag-mini:hover {
    background: rgba(255, 165, 0, 0.1);
}

.btn-add-tag-mini svg {
    width: 12px;
    height: 12px;
}

/* Модальное окно тегов */
.tag-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.tag-modal-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.tag-modal-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333;
}

.tag-modal-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tag-modal-button {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    border: 1px solid #444;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-modal-button:hover:not(:disabled) {
    background: #2a2a2a;
    border-color: #555;
    transform: translateX(4px);
}

.tag-modal-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tag-modal-save {
    width: 100%;
    padding: 1rem;
    background: #FFA500;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-modal-save:hover {
    background: #FF8C00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

/* Notification Bell & Dropdown */
.notif-wrap {
    position: relative;
}

.notif-bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    margin-right: 0.5rem;
}

.notif-bell-btn:hover {
    background: rgba(255, 136, 0, 0.12);
}

.notif-bell-svg {
    width: 26px;
    height: 26px;
    display: block;
    transition: transform 0.25s ease, filter 0.25s ease;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.15));
}

.notif-bell-btn:hover .notif-bell-svg {
    transform: rotate(-12deg) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}

.notification-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(244,63,94,0.5);
    animation: pulse-badge 2s infinite;
    border: 2px solid var(--bg-card);
    pointer-events: none;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 2px 6px rgba(244,63,94,0.5); }
    50% { box-shadow: 0 2px 12px rgba(244,63,94,0.85); }
}

/* Dropdown panel */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: -10px;
    width: 360px;
    background: #1e1e1e;
    border: 1px solid rgba(255,136,0,0.2);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.notif-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: #1e1e1e;
    border-left: 1px solid rgba(255,136,0,0.2);
    border-top: 1px solid rgba(255,136,0,0.2);
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
}

.notif-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.notif-dropdown-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ff8800;
    letter-spacing: 0.2px;
}

.notif-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.notif-close-btn svg {
    width: 22px;
    height: 22px;
}

.notif-close-btn:hover {
    transform: rotate(90deg) scale(1.1);
}

.notif-close-btn:hover svg line {
    stroke: #fff;
}

/* List */
.notif-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,136,0,0.3) transparent;
}

.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255,136,0,0.3); border-radius: 4px; }

/* Empty state */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    color: #666;
    font-size: 0.875rem;
}

/* Notification item */
.notif-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
    position: relative;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: rgba(255,255,255,0.04);
}

.notif-item.notif-unread {
    background: rgba(255, 136, 0, 0.06);
}

.notif-item.notif-unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--notif-color, #ff8800);
    border-radius: 0 2px 2px 0;
}

.notif-item.notif-unread:hover {
    background: rgba(255, 136, 0, 0.1);
}

.notif-item-icon {
    flex-shrink: 0;
}

.notif-status-icon {
    width: 28px;
    height: 28px;
    display: block;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-msg {
    font-size: 0.82rem;
    color: #ddd;
    line-height: 1.4;
    font-weight: 500;
    word-break: break-word;
}

.notif-item.notif-unread .notif-item-msg {
    color: #fff;
    font-weight: 600;
}

.notif-item-time {
    font-size: 0.72rem;
    color: #666;
    margin-top: 3px;
}

/* Delete btn */
.notif-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    opacity: 0;
}

.notif-item:hover .notif-del-btn {
    opacity: 1;
}

.notif-del-btn:hover {
    color: #e74c3c;
    background: rgba(231,76,60,0.12);
}

.notif-trash-svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Убираем старые стили badge */
.notification-bell { display: none; }

/* ===== Custom Color Picker ===== */
.color-picker-wrap {
    position: relative;
    display: inline-flex;
}

.color-picker-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.color-picker-btn:hover {
    border-color: #ff8800;
    background: var(--bg-tertiary);
}

.color-preview-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    display: inline-block;
    flex-shrink: 0;
}

.color-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 10px;
    z-index: 9999;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.swatch {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.swatch:hover {
    transform: scale(1.2);
    border-color: #fff;
}

.swatch-saved {
    border-color: #ff8800;
}

.color-custom-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.color-custom-row input[type=color] {
    width: 36px;
    height: 32px;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: #252525;
    flex-shrink: 0;
}

.color-save-btn {
    flex: 1;
    padding: 0.4rem 0.6rem;
    background: #ff8800;
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.color-save-btn:hover {
    background: #ffaa00;
}

.color-saved-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 0;
}

/* ===== Template Picker ===== */
.tpl-picker-wrap {
    position: relative;
    display: inline-flex;
}

.tpl-picker-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #aa66ff;
    border-radius: 10px;
    background: rgba(170, 102, 255, 0.1);
    color: #aa66ff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.tpl-picker-btn:hover {
    background: rgba(170, 102, 255, 0.2);
    border-color: #cc88ff;
    color: #cc88ff;
}

.tpl-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    z-index: 9999;
    min-width: 240px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.tpl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: #ccc;
    transition: background 0.15s;
    border-bottom: 1px solid #2a2a2a;
}

.tpl-item:last-child {
    border-bottom: none;
}

.tpl-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.tpl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== BURGER MENU ===== */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
    order: 2;
}

.burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ccc;
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}

.burger-btn:hover { background: rgba(255,255,255,0.08); }

.burger-btn.burger-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger-btn.burger-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger-btn.burger-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .burger-btn { display: flex; }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1e1e1e;
        border-top: 1px solid #2a2a2a;
        border-bottom: 1px solid #2a2a2a;
        padding: 0.5rem;
        flex-direction: column;
        gap: 0.25rem;
        z-index: 999;
        order: 10;
    }

    .header-nav.nav-open { display: flex; }

    .main-header { position: relative; }

    .nav-link {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        font-size: 0.9rem;
    }

    .nav-link svg { display: inline-block !important; }
}

/* ===== Replies Divider ===== */
.replies-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 0 0;
}

.replies-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff8800 50%, transparent);
    opacity: 0.35;
}

.replies-divider-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ff8800;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.85;
}

.replies-divider-label svg {
    opacity: 0.8;
}
