/* static/css/base.css - Core Underground Forum Theme - Production Ready */

/* ========================================
   CSS VARIABLES - UNDERGROUND THEME
   ======================================== */
:root {
    /* Primary Colors */
    --primary: #1a1a1a;
    --secondary: #2d3748;
    --accent: #e53e3e;
    --success: #38a169;
    --warning: #dd6b20;
    --info: #3182ce;
    --danger: #e53e3e;
    
    /* Background Colors */
    --dark-bg: #0f0f0f;
    --card-bg: #1e1e1e;
    --border: #4a5568;
    
    /* Text Colors */
    --text-light: #e2e8f0;
    --text-muted: #a0aec0;
    
    /* Special Effects */
    --shadow-primary: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(229, 62, 62, 0.3);
    --transition: all 0.3s ease;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--dark-bg), var(--primary));
    color: var(--text-light);
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar { 
    width: 8px; 
}

::-webkit-scrollbar-track { 
    background: var(--primary); 
}

::-webkit-scrollbar-thumb { 
    background: var(--accent); 
    border-radius: 4px; 
}

::-webkit-scrollbar-thumb:hover { 
    background: #c53030; 
}

/* Selection Styling */
::selection {
    background: rgba(229, 62, 62, 0.3);
    color: var(--text-light);
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */
.navbar {
    background: linear-gradient(90deg, var(--primary), var(--secondary)) !important;
    border-bottom: 2px solid var(--accent);
    box-shadow: var(--shadow-glow);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: bold;
    color: var(--accent) !important;
    text-shadow: 0 0 10px rgba(229, 62, 62, 0.5);
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--accent) !important;
    text-shadow: 0 0 5px rgba(229, 62, 62, 0.7);
}

/* ========================================
   CARD COMPONENTS
   ======================================== */
.forum-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
}

.forum-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.card-header {
    background: var(--secondary) !important;
    color: var(--text-light) !important;
    border-bottom: 1px solid var(--accent);
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.card-body { 
    padding: 1rem; 
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn-primary {
    background: linear-gradient(45deg, var(--accent), #c53030);
    border: none;
    transition: var(--transition);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #c53030, #9b2c2c);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(229, 62, 62, 0.3);
}

.login-required-btn {
    background: linear-gradient(45deg, var(--accent), #c53030);
    border: none;
    color: white !important;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    text-decoration: none;
    animation: pulse 2s infinite;
}

.login-required-btn:hover {
    background: linear-gradient(45deg, #c53030, #9b2c2c);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(229, 62, 62, 0.3);
    color: white !important;
    text-decoration: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-control {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-light);
    border-radius: 8px;
}

.form-control:focus {
    background: var(--card-bg);
    border-color: var(--accent);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(229, 62, 62, 0.25);
}

.form-control::placeholder { 
    color: var(--text-muted); 
}

.form-label {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ========================================
   CATEGORY AND THREAD STYLES
   ======================================== */
.category-item {
    padding: 0.875rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    color: var(--text-light);
}

.category-item:hover {
    background: rgba(229, 62, 62, 0.1);
    border-left: 4px solid var(--accent);
}

.category-item:last-child { 
    border-bottom: none; 
}

.thread-title {
    color: var(--text-light) !important;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.thread-title:hover {
    color: var(--accent) !important;
    text-shadow: 0 0 5px rgba(229, 62, 62, 0.5);
}

/* ========================================
   STATS AND BADGES
   ======================================== */
.stats {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 5px rgba(229, 62, 62, 0.3);
}

.premium-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    color: #1a1a1a !important;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    text-shadow: none;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* ========================================
   BREADCRUMB STYLES
   ======================================== */
.breadcrumb {
    background: var(--card-bg) !important;
    border: 1px solid var(--border);
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem !important;
    border-radius: 8px;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover { 
    color: var(--accent); 
}

.breadcrumb-item.active { 
    color: var(--accent) !important; 
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-muted { 
    color: var(--text-muted) !important; 
}

.terminal-text {
    font-family: 'Courier New', monospace;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

/* ========================================
   COMMON STATE CLASSES
   ======================================== */
.loading-state {
    text-align: center;
    padding: 3rem 2rem;
}

.error-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 12px;
    box-shadow: var(--shadow-glow);
}

.access-denied {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 12px;
    box-shadow: var(--shadow-glow);
}

.access-icon {
    font-size: 4rem;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(229, 62, 62, 0.5);
    margin-bottom: 1.5rem;
}

/* ========================================
   MATRIX BACKGROUND EFFECT
   ======================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, rgba(229, 62, 62, 0.08), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(229, 62, 62, 0.04), transparent);
    background-repeat: repeat;
    background-size: 80px 80px;
    pointer-events: none;
    z-index: -1;
}

/* ========================================
   CONTAINER AND LAYOUT
   ======================================== */
.container { 
    max-width: 1600px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.navbar .container {
    padding-left: 25px !important;
    padding-right: 25px !important;
}

/* ========================================
   FOOTER STYLES
   ======================================== */
footer {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 2px solid var(--accent);
}

footer .container {
    padding-left: 25px !important;
    padding-right: 25px !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .stats { 
        font-size: 1.2rem; 
    }
    
    .forum-card { 
        margin-bottom: 1rem; 
    }
    
    .category-item { 
        padding: 0.75rem; 
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .container {
        max-width: 720px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .navbar .container,
    footer .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 576px) {
    .stats {
        font-size: 1rem;
    }
    
    .category-item {
        padding: 0.5rem;
    }
    
    .card-header {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .container {
        max-width: 540px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1800px !important;
        padding-left: 25px !important;
        padding-right: 25px !important;
    }
}