/*
Theme Name: Blitzstars Game Community Theme
Theme URI: https://example.com/blitzstars-theme
Description: O temă WordPress personalizată inspirată din interfața Discord, cu suport pentru forum, profiluri de utilizatori, upload de replay-uri .wotbreplay și clasament Top DMG.
Version: 1.0.0
Author: Community Developer
Text Domain: blitzstars-theme
*/

/* 1. Variabile Globale de Design (Implicit: Dark Theme) */
:root {
    --bg-darkest: #1e1f22;     /* Fundalul barei stângi de servere și al listei de membri din dreapta */
    --bg-dark: #2b2d31;        /* Fundalul listei de canale/activități din stânga */
    --bg-chat: #313338;        /* Fundalul central pentru forum și conținut */
    --bg-modifier-selected: #35373c; /* Fundal element selectat/activ */
    --bg-input: #383a40;       /* Fundal pentru câmpurile de text/inputuri */
    
    --text-normal: #dbdee1;    /* Culoarea textului principal */
    --text-muted: #949ba4;     /* Culoarea textului secundar/ajutător */
    --text-link: #00a8fc;      /* Culoarea link-urilor standard */
    
    --brand-accent: #e09e19;   /* Galben/Portocaliu Blitzstars */
    --brand-accent-hover: #ffc107;
    --status-online: #23a55a;  /* Verde pentru membrii online */
    --status-offline: #80848e; /* Gri pentru offline */
    
    --font-main: 'gg sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --sidebar-left-width-1: 72px;
    --sidebar-left-width-2: 240px;
    --sidebar-right-width: 260px;
}

/* 2. SUPRASCRIERE PENTRU TEMA LUMINOASĂ CU PRIORITATE MAXIMĂ (:root) */
:root.light-theme {
    --bg-darkest: #f2f3f5;     /* Fundal foarte deschis pentru Coloana 1 și Coloana 4 */
    --bg-dark: #e3e5e8;        /* Fundal gri deschis pentru Coloana 2 (canale) */
    --bg-chat: #ffffff;        /* Alb pur pentru zona centrală (Coloana 3) */
    --bg-modifier-selected: #cbd0d6; /* Gri mai pronunțat pentru elemente active */
    --bg-input: #e3e5e8;       /* Câmpuri de text deschise */
    
    --text-normal: #2e3338;    /* Text principal închis la culoare */
    --text-muted: #4f5660;     /* Text secundar închis */
    --text-link: #0066cc;      /* Link-uri albastre clasice */
}

/* 3. Resetare și Stiluri Generale (Inclusiv Tranziție fluidă între teme) */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-chat);
    color: var(--text-normal);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Aplicăm tranziție fluidă pe toate containerele pentru efectul de fade-in/fade-out la schimbarea temei */
body, aside, main, header, footer, input, select, textarea, .channel-item, .member-card, .tank-card-item, .chat-message, table, td, th {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

a {
    color: var(--brand-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-accent-hover);
}

/* Structura principală tip Grid (4 Coloane) */
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-left-width-1) var(--sidebar-left-width-2) 1fr var(--sidebar-right-width);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Coloana 1: Activități / Server list (Stânga extremă) */
.sidebar-activities {
    background-color: var(--bg-darkest);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
    overflow-y: auto;
}

.activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-radius 0.2s, background-color 0.2s;
    position: relative;
    color: var(--text-normal);
    font-weight: bold;
}

.activity-icon:hover, .activity-icon.active {
    border-radius: 16px;
    background-color: var(--brand-accent);
    color: #000;
}

.activity-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: #f23f43;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 3px solid var(--bg-darkest);
}

/* Coloana 2: Canale și Camere de Discuții (Stânga secundar) */
.sidebar-channels {
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 12px 16px;
    font-weight: bold;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
}

.channel-category {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-muted);
    padding: 8px 8px 4px 8px;
}

.channel-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    margin-bottom: 2px;
    transition: background-color 0.1s, color 0.1s;
}

.channel-item:hover, .channel-item.active {
    background-color: var(--bg-modifier-selected);
    color: var(--text-normal);
}

.channel-item i {
    margin-right: 6px;
    color: var(--text-muted);
}

/* User footer în Sidebar-ul stâng (Sebas, setări, etc.) */
.sidebar-user-footer {
    background-color: rgba(0, 0, 0, 0.12);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-footer-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-footer-avatar {
    position: relative;
    width: 32px;
    height: 32px;
}

.user-footer-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}

.status-dot.online { background-color: var(--status-online); }
.status-dot.offline { background-color: var(--status-offline); }

/* Coloana 3: Zona Centrală (Conținut/Forum/Articole) */
.main-content {
    background-color: var(--bg-chat);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-header {
    height: 48px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-weight: bold;
}

.content-body {
    padding: 16px;
    flex: 1;
}

/* Stiluri pentru Forum & Chat */
.forum-topic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic-row {
    background-color: var(--bg-dark);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--brand-accent);
}

.topic-title {
    font-size: 16px;
    font-weight: bold;
}

.topic-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Coloana 4: Membrii (Dreapta) */
.sidebar-members {
    background-color: var(--bg-darkest);
    display: flex;
    flex-direction: column;
    padding: 16px 8px;
    overflow-y: auto;
}

.member-group-title {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-left: 8px;
}

.member-card {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    gap: 10px;
    transition: background-color 0.2s;
}

.member-card:hover {
    background-color: var(--bg-modifier-selected);
}

.member-avatar {
    position: relative;
    width: 32px;
    height: 32px;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-weight: bold;
    font-size: 13px;
}

.member-activity {
    font-size: 11px;
    color: var(--text-muted);
}

/* Profil Utilizator (Facebook Style Cover + WoT Replays Grid) */
.profile-container {
    background-color: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.profile-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.profile-header-details {
    padding: 16px;
    display: flex;
    align-items: flex-end;
    margin-top: -60px;
    gap: 16px;
    border-bottom: 1px solid var(--bg-chat);
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
    object-fit: cover;
    background-color: var(--bg-chat);
}

.profile-username-section h2 {
    font-size: 24px;
    font-weight: bold;
}

/* Grila pentru fisierele .wotbreplay */
.replay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.replay-card {
    background-color: var(--bg-chat);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 150px;
}

/* Top DMG Leaderboard */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 12px 16px;
    text-align: left;
}

.leaderboard-table th {
    background-color: var(--bg-darkest);
    color: var(--brand-accent);
    font-weight: bold;
}

.leaderboard-table tr:nth-child(even) {
    background-color: var(--bg-chat);
}

/* Formulare (Login, Înregistrare, Setări) */
.form-container {
    max-width: 450px;
    margin: 40px auto;
    background-color: var(--bg-dark);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 10px;
    color: var(--text-normal);
    font-family: inherit;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-accent);
}

.form-btn {
    width: 100%;
    background-color: var(--brand-accent);
    color: #000;
    font-weight: bold;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.2s;
}

.form-btn:hover {
    background-color: var(--brand-accent-hover);
}