* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Header */
header {
    background: #1a1a1a;
    border-bottom: 2px solid #cc0000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(204, 0, 0, 0.3);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #cc0000;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.logo:hover {
    color: #ff0000;
}

.user-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-info span {
    color: #e0e0e0;
    font-weight: 500;
}

.admin-badge {
    background: #cc0000;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Buttons */
button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #cc0000;
    color: white;
    border: 1px solid #cc0000;
}

.btn-primary:hover {
    background: #ff0000;
    border-color: #ff0000;
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.5);
}

.btn-secondary {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
}

.btn-secondary:hover {
    background: #3a3a3a;
    border-color: #4a4a4a;
}

.btn-danger {
    background: #8b0000;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

.btn-danger:hover {
    background: #a00000;
}

/* Main Layout with Ads */
.page-wrapper {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    gap: 1.5rem;
    padding: 2rem 1rem;
}

/* Sidebar Ads */
.ad-sidebar {
    width: 160px;
    flex-shrink: 0;
}

.ad-sidebar.left {
    order: 1;
}

.ad-sidebar.right {
    order: 3;
}

.ad-box {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 1rem;
    margin-bottom: 1.5rem;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.8rem;
    text-align: center;
    position: sticky;
    top: 2rem;
}

/* Main Content */
.main-content {
    flex: 1;
    order: 2;
    min-width: 0;
}

/* Container - legacy support */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Top Banner Ad */
.ad-banner-top {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 1rem;
    margin-bottom: 1.5rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.85rem;
}

/* Categories Grid */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.category-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-left: 4px solid #cc0000;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.category-card:hover {
    background: #222;
    border-left-color: #ff0000;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.2);
}

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #cc0000;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-desc {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.category-stats {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Card */
.card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Breadcrumb */
.breadcrumb {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #2a2a2a;
}

.breadcrumb a {
    color: #cc0000;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #ff0000;
}

/* Thread Item */
.thread-item {
    border-bottom: 1px solid #2a2a2a;
    padding: 1.2rem 0;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    margin-left: -1rem;
}

.thread-item:hover {
    background: rgba(204, 0, 0, 0.05);
    border-left-color: #cc0000;
    padding-left: 1.5rem;
}

.thread-item:last-child {
    border-bottom: none;
}

.thread-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.thread-meta {
    font-size: 0.85rem;
    color: #666;
}

/* Forms */
input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-family: inherit;
    background: #0f0f0f;
    color: #e0e0e0;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #cc0000;
    box-shadow: 0 0 5px rgba(204, 0, 0, 0.3);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Post */
.post {
    background: #0f0f0f;
    padding: 1.2rem;
    border-left: 3px solid #cc0000;
    margin-bottom: 1rem;
    position: relative;
}

.post-author {
    font-weight: 700;
    color: #cc0000;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.post-date {
    font-size: 0.75rem;
    color: #666;
    margin-left: 0.5rem;
    font-weight: 400;
    text-transform: none;
}

.post-content {
    color: #d0d0d0;
    line-height: 1.7;
}

.post-actions {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5rem;
}

/* Utility Classes */
.hidden {
    display: none;
}

.new-thread-form {
    margin-bottom: 2rem;
}

.auth-container {
    max-width: 450px;
    margin: 3rem auto;
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.auth-toggle a {
    color: #cc0000;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-toggle a:hover {
    color: #ff0000;
}

h2 {
    margin-bottom: 1.5rem;
    color: #e0e0e0;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #cc0000;
    padding-bottom: 0.5rem;
}

h3 {
    color: #cc0000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-state {
    text-align: center;
    color: #666;
    padding: 3rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 1200px) {
    .ad-sidebar {
        display: none;
    }
    
    .page-wrapper {
        padding: 2rem 1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #cc0000;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff0000;
}

/* Selection */
::selection {
    background: #cc0000;
    color: white;
}