:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);
    --transition-premium: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    min-height: 100vh;
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-glow);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-steam {
    background: #171a21;
    color: #c7d5e0;
    border: 1px solid #66c0f4;
}

.btn-steam:hover {
    background: #2a475e;
    color: white;
    box-shadow: 0 0 15px rgba(102, 192, 244, 0.3);
    transform: translateY(-2px);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Admin & Premium Form Styles */
.admin-label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.admin-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.admin-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Custom Select Styling */
.custom-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    cursor: pointer;
}

.custom-select optgroup {
    background: #0f172a;
    color: var(--primary-color);
    font-style: normal;
    font-weight: 800;
    padding: 10px;
}

.custom-select option {
    background: #1e293b;
    color: white;
    padding: 10px;
}

/* Admin Layout & Wide Pages */
.admin-container, .rules-container {
    max-width: 1600px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Page de règlement "Plein Écran" */
.rules-container-full {
    max-width: 95% !important;
}

.markdown-body {
    font-size: 1.15rem;
}

/* Rules Page Typography */
.markdown-body {
    line-height: 1.8;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}
.markdown-body p {
    margin-bottom: 1.2rem;
}
.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}
.markdown-body li {
    margin-bottom: 0.8rem;
}
.markdown-body strong {
    color: var(--secondary-color);
}

/* ==========================================================================
   SimpleMDE Customization (Dark Theme)
   ========================================================================== */
.editor-toolbar {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px 12px 0 0 !important;
    opacity: 1 !important;
    padding: 0 10px !important;
}

.editor-toolbar a {
    color: #ffffff !important; /* Pure white */
    transition: all 0.2s !important;
    border: none !important;
    opacity: 1 !important;
}

.editor-toolbar a:before {
    color: #ffffff !important;
}

.editor-toolbar a:hover, 
.editor-toolbar a.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.editor-toolbar i.separator {
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.CodeMirror {
    background: rgba(0, 0, 0, 0.4) !important; /* Darker background (less white) */
    color: white !important;
    border: 1px solid var(--glass-border) !important;
    border-top: none !important;
    border-radius: 0 0 12px 12px !important;
    font-family: 'Inter', sans-serif !important;
    padding: 10px !important;
}

.CodeMirror-cursor {
    border-left: 2px solid white !important;
}

.editor-statusbar {
    color: var(--text-muted) !important;
    padding: 10px 0 !important;
    font-size: 0.8rem !important;
}

.CodeMirror-placeholder {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* Fix for full screen mode if used */
.editor-toolbar.fullscreen,
.CodeMirror-fullscreen {
    z-index: 10000 !important;
}
/* Hero Section */
.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-btn-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0 6rem;
}

/* Responsive Queries */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 3%;
    }
    
    .nav-links {
        display: none; /* Mobile menu needed later */
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-btn-group {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        padding: 1rem;
    }

    .container {
        margin: 1rem auto;
    }

    .admin-container {
        padding: 0 1rem;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    div[style*="grid-template-columns: 250px 1fr"] {
        grid-template-columns: 1fr !important;
    }
}


/* Premium Forum Section (Neutral/Premium Theme) */
.category-header-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary-color);
}

.category-header-premium i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* Status Badges */
.status-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}

.badge-pending {
    background: #f59e0b;
    color: white;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.badge-accepted {
    background: #10b981;
    color: white;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.badge-rejected {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.badge-hold {
    background: #6366f1;
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.badge-interview {
    background: #3b82f6;
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.badge-tutorial {
    background: #ec4899;
    color: white;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

/* Premium Board Items */
.board-item-premium {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px 220px;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.board-item-premium:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 1.8rem;
}

.board-icon-circle {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.board-item-premium:hover .board-icon-circle {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.board-stats-premium {
    text-align: center;
}

.board-stats-premium .count {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
}

.board-stats-premium .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.last-post-premium {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.last-post-premium img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
}

.last-post-info p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}
