:root {
    --bg: #0e1015;
    --surface: #16181f;
    --surface2: #1c1f26;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(245,166,35,0.3);
    --text: #f0f0f5;
    --muted: #8b8d9b;
    --gold: #f5a623;
    --gold-dim: rgba(245,166,35,0.12);
    --red: #ef4444;
    --teal: #2dd4bf;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(14, 16, 21, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -1px;
}

.logo span {
    color: var(--gold);
}

.logout-btn {
    padding: 8px 18px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    transition: 0.3s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Forum Layout */
.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.forum-header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.forum-header p {
    color: var(--muted);
    margin-top: 8px;
}

.btn-new {
    background: var(--gold);
    color: #000;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    display: inline-block;
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--gold-dim);
}

.forum-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.forum-sidebar {
    flex: 0 0 260px;
}

.forum-content {
    flex: 1;
}

/* Sidebar Cards */
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-card h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 16px;
}

.category-list,
.rules-list {
    list-style: none;
}

.category-list li,
.rules-list li {
    margin-bottom: 12px;
}

.category-list a {
    color: var(--muted);
    text-decoration: none;
    padding: 6px 0;
    display: block;
    transition: 0.3s;
}

.category-list a:hover,
.category-list a.active {
    color: var(--gold);
}

.rules-list li {
    color: var(--muted);
    font-size: 13px;
    padding-left: 20px;
    position: relative;
}

.rules-list li::before {
    content: "•";
    color: var(--gold);
    position: absolute;
    left: 0;
}

/* Thread Cards */
.thread-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.thread-card:hover {
    border-color: var(--border-hover);
    background: var(--surface2);
    transform: translateX(4px);
}

.thread-card.pinned {
    border-left: 3px solid var(--gold);
}

.thread-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.thread-title:hover {
    color: var(--gold);
}

.thread-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

.pin-badge {
    font-size: 12px;
    color: var(--gold);
    margin-right: 10px;
}

.category {
    background: var(--gold-dim);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.thread-stats {
    text-align: right;
}

.stat {
    font-size: 13px;
    color: var(--muted);
    margin: 5px 0;
}

/* Thread Detail Page */
.thread-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 30px;
}

.thread-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.thread-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.thread-title-wrap h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.thread-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-badge,
.pinned-badge,
.locked-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.category-badge {
    background: var(--gold-dim);
    color: var(--gold);
}

.pinned-badge {
    background: rgba(45, 212, 191, 0.1);
    color: var(--teal);
}

.locked-badge {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

.thread-meta-info {
    display: flex;
    gap: 20px;
    color: var(--muted);
    font-size: 13px;
    flex-wrap: wrap;
}

/* Original Post & Replies */
.original-post,
.reply-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--surface);
    border-radius: 20px;
    margin-bottom: 20px;
}

.post-avatar,
.reply-avatar {
    width: 48px;
    height: 48px;
    background: var(--gold-dim);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: var(--gold);
    flex-shrink: 0;
}

.post-body,
.reply-body {
    flex: 1;
}

.post-author,
.reply-author {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gold);
}

.post-text,
.reply-text {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 10px;
}

.post-time,
.reply-time {
    font-size: 11px;
    color: var(--muted);
}

/* Replies Section */
.replies-section {
    margin: 30px 0;
}

.replies-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

/* Reply Form */
.reply-form {
    background: var(--surface);
    border-radius: 20px;
    padding: 28px;
    margin-top: 30px;
}

.reply-form h3 {
    margin-bottom: 20px;
}

.reply-form textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--gold);
}

/* Buttons */
.btn-submit {
    background: var(--gold);
    color: #000;
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--gold-dim);
}

.btn-cancel {
    background: transparent;
    color: var(--muted);
    padding: 12px 28px;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: 0.3s;
    display: inline-block;
}

.btn-cancel:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Form Pages */
.form-container {
    max-width: 700px;
    margin: 60px auto;
}

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px;
}

.form-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    transition: 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* Locked Message */
.locked-message {
    text-align: center;
    padding: 20px;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 16px;
    color: var(--red);
}

.no-replies {
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

/* Footer */
footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    color: var(--muted);
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrap {
        padding: 0 20px;
    }
    
    .forum-layout {
        flex-direction: column;
    }
    
    .forum-sidebar {
        flex: auto;
    }
    
    .thread-card {
        flex-direction: column;
        text-align: left;
        gap: 12px;
    }
    
    .thread-stats {
        text-align: left;
        display: flex;
        gap: 20px;
    }
    
    .original-post,
    .reply-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .form-card {
        padding: 24px;
    }
    
    .forum-header {
        flex-direction: column;
        text-align: center;
    }
    
    .thread-title-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .thread-meta {
        gap: 10px;
    }
    
    .thread-meta-info {
        gap: 12px;
    }
}
/* Post Actions */
.post-actions,
.reply-actions {
    flex-shrink: 0;
}

.delete-btn {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.02);
}

.original-post {
    position: relative;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.post-body {
    flex: 1;
}

@media (max-width: 768px) {
    .original-post {
        flex-direction: column;
    }
    
    .post-actions,
    .reply-actions {
        align-self: flex-end;
    }
}