/* ==========================================================================
   COLIGUA CLUB - ESTILOS PRINCIPALES (Réplica de Interfaz & Casillas)
   ========================================================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ================= VARIABLES DE TEMA GLOBAL (:root y data-theme) ================= */
:root {
    --theme-header-bg: linear-gradient(180deg, #3d60a2 0%, #254480 100%);
    --theme-primary: #3d60a2;
    --theme-primary-dark: #254480;
    --theme-search-bg: #6a8cce;
    --theme-search-border: #4a6fa8;
    --theme-search-focus: #7d9edd;
    --theme-stat-color: #3b5889;
    --theme-stat-num: #213c70;
    --theme-icon-color: #244177;
    --theme-avatar-bg: #395c9b;
    --theme-avatar-border: #234176;
    --theme-btn-primary: #3d60a2;
    --theme-btn-primary-hover: #4c73be;
    --theme-btn-border: #2b4577;
    --theme-accent-text: #1f3664;
}

/* 🟢 Tema Verde Esmeralda (VIP) */
[data-theme="esmeralda"] {
    --theme-header-bg: linear-gradient(180deg, #2e8b57 0%, #195333 100%);
    --theme-primary: #2e8b57;
    --theme-primary-dark: #195333;
    --theme-search-bg: #52a876;
    --theme-search-border: #3b875b;
    --theme-search-focus: #6ac490;
    --theme-stat-color: #267046;
    --theme-stat-num: #15452b;
    --theme-icon-color: #1a5c37;
    --theme-avatar-bg: #2a8050;
    --theme-avatar-border: #164f30;
    --theme-btn-primary: #2e8b57;
    --theme-btn-primary-hover: #3ca368;
    --theme-btn-border: #1e633d;
    --theme-accent-text: #195333;
}

/* 🔴 Tema Rojo Carmesí (Casino) */
[data-theme="carmesi"] {
    --theme-header-bg: linear-gradient(180deg, #b03a3a 0%, #751c1c 100%);
    --theme-primary: #b03a3a;
    --theme-primary-dark: #751c1c;
    --theme-search-bg: #cc6666;
    --theme-search-border: #a14545;
    --theme-search-focus: #e07b7b;
    --theme-stat-color: #8c2d2d;
    --theme-stat-num: #5c1818;
    --theme-icon-color: #7a2222;
    --theme-avatar-bg: #a13333;
    --theme-avatar-border: #691616;
    --theme-btn-primary: #b03a3a;
    --theme-btn-primary-hover: #c94c4c;
    --theme-btn-border: #822424;
    --theme-accent-text: #751c1c;
}

/* 🟣 Tema Morado Cyber (Neón) */
[data-theme="morado"] {
    --theme-header-bg: linear-gradient(180deg, #7e41b5 0%, #492070 100%);
    --theme-primary: #7e41b5;
    --theme-primary-dark: #492070;
    --theme-search-bg: #9c67cc;
    --theme-search-border: #72429e;
    --theme-search-focus: #b282e0;
    --theme-stat-color: #633091;
    --theme-stat-num: #3d1b5c;
    --theme-icon-color: #52247d;
    --theme-avatar-bg: #743aa6;
    --theme-avatar-border: #441c69;
    --theme-btn-primary: #7e41b5;
    --theme-btn-primary-hover: #9353cc;
    --theme-btn-border: #562980;
    --theme-accent-text: #492070;
}

/* 🟡 Tema Dorado Prestige (Oro) */
[data-theme="dorado"] {
    --theme-header-bg: linear-gradient(180deg, #b8860b 0%, #785602 100%);
    --theme-primary: #b8860b;
    --theme-primary-dark: #785602;
    --theme-search-bg: #d4a637;
    --theme-search-border: #a3760a;
    --theme-search-focus: #e6bc53;
    --theme-stat-color: #946b08;
    --theme-stat-num: #614502;
    --theme-icon-color: #7d5904;
    --theme-avatar-bg: #a6780a;
    --theme-avatar-border: #694a02;
    --theme-btn-primary: #b8860b;
    --theme-btn-primary-hover: #cf9b1d;
    --theme-btn-border: #805c03;
    --theme-accent-text: #785602;
}

/* ⚫ Tema Oscuro Carbón (Noche) */
[data-theme="carbon"] {
    --theme-header-bg: linear-gradient(180deg, #383838 0%, #1c1c1c 100%);
    --theme-primary: #383838;
    --theme-primary-dark: #1c1c1c;
    --theme-search-bg: #555555;
    --theme-search-border: #444444;
    --theme-search-focus: #6c6c6c;
    --theme-stat-color: #2b2b2b;
    --theme-stat-num: #141414;
    --theme-icon-color: #222222;
    --theme-avatar-bg: #333333;
    --theme-avatar-border: #1a1a1a;
    --theme-btn-primary: #383838;
    --theme-btn-primary-hover: #505050;
    --theme-btn-border: #242424;
    --theme-accent-text: #1c1c1c;
}

/* ================= CABECERA SUPERIOR (TOP HEADER) ================= */
.top-header {
    background: var(--theme-header-bg);
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
    cursor: pointer;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-text {
    color: #ffffff;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.header-center {
    flex: 1;
    max-width: 550px;
    margin: 0 30px;
}

.search-bar {
    background-color: var(--theme-search-bg);
    border: 1px solid var(--theme-search-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 3px 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.search-bar:focus-within {
    background-color: var(--theme-search-focus);
    border-color: #ffffff;
}

.search-icon {
    font-size: 14px;
    margin-right: 8px;
    opacity: 0.85;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ffffff;
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: 'Times New Roman', serif;
    font-size: 26px;
    color: var(--theme-stat-color);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease;
}

/* En la referencia los números "0 A" están en estilo serif clásico con tono azulado/oscuro */
.user-stats .stat-number {
    font-weight: 700;
    color: var(--theme-stat-num);
}

.user-stats .stat-symbol {
    font-weight: 400;
    color: var(--theme-stat-num);
    font-style: italic;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--theme-icon-color);
    transition: transform 0.15s ease, opacity 0.15s ease, color 0.2s ease;
}

.header-icon:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.user-avatar-top {
    background-color: var(--theme-avatar-bg);
    color: #ffffff;
    border: 2px solid var(--theme-avatar-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* ================= BARRA DE NAVEGACIÓN (PESTAÑAS) ================= */
.main-nav {
    background-color: #e0e0e0;
    border-bottom: 2px solid #bababa;
    padding: 6px 16px;
}

.nav-tabs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tab-item button {
    background: #d4d4d4;
    border: 1px solid #acacac;
    border-radius: 5px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #444444;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.tab-item button:hover {
    background: #e4e4e4;
    color: #111111;
    border-color: #888888;
}

.tab-item.active button {
    background: #bfbfbf;
    color: #1a1a1a;
    border: 1px solid #777777;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

/* ================= BANNER DE BIENVENIDA ================= */
.banner-section {
    position: relative;
    height: 125px;
    background-color: #1b161c;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-bottom: 2px solid #8c8c8c;
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado e ilustración simulando bloques de ciudad voxel de noche */
    background: 
        linear-gradient(90deg, rgba(27,22,28,0.92) 0%, rgba(27,22,28,0.65) 45%, rgba(27,22,28,0.2) 100%),
        url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    filter: brightness(0.85) contrast(1.1);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
}

.banner-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.9);
}

.banner-door-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.glowing-door {
    width: 22px;
    height: 42px;
    background: linear-gradient(180deg, #fff385 0%, #ffc824 100%);
    box-shadow: 0 0 16px #ffda47;
    border-radius: 2px;
}

.plus-symbol {
    color: #ffffff;
    font-size: 36px;
    font-weight: 300;
    line-height: 1;
    text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* ================= CONTENEDOR DE 3 COLUMNAS ================= */
.main-container {
    display: flex;
    gap: 16px;
    padding: 16px;
    max-width: 1500px;
    margin: 0 auto;
}

/* COLUMNA IZQUIERDA: PUBLICIDAD */
.col-left {
    width: 145px;
    flex-shrink: 0;
}

.publicidad-box {
    background-color: #d8d8d8;
    border: 1px solid #adadad;
    border-radius: 6px;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.publicidad-text {
    color: #7b7b7b;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* COLUMNA CENTRAL: SECCIONES DINÁMICAS */
.col-center {
    flex: 1;
    min-width: 0;
}

.section-view {
    display: none;
    animation: fadeIn 0.25s ease;
}

.section-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- VISTA FORO --- */
.post-input-container {
    margin-bottom: 14px;
}

.post-input-container input {
    width: 100%;
    background-color: #d6d6d6;
    border: 1px solid #a8a8a8;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #222222;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.post-input-container input:focus {
    background-color: #e4e4e4;
    border-color: var(--theme-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(61,96,162,0.15);
}

.post-input-container input::placeholder {
    color: #6a6a6a;
}

.forum-posts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.forum-post-card {
    background-color: #cccccc;
    border: 1px solid #adadad;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.forum-post-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.14);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.avatar-circle {
    width: 42px;
    height: 42px;
    background-color: #767676;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #999999;
    flex-shrink: 0;
}

.post-meta {
    display: flex;
    flex-direction: column;
}

.post-author-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.author-name {
    font-weight: 700;
    font-size: 15px;
    color: #333333;
}

.post-date {
    font-size: 12px;
    color: #666666;
}

.post-subtitle {
    font-size: 12px;
    color: #555555;
}

.post-body {
    padding-top: 4px;
}

.post-text {
    font-size: 15px;
    color: #222222;
    margin-bottom: 12px;
    font-weight: 500;
}

.post-image-container {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #999999;
    background-color: #111;
    max-height: 250px;
}

.post-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 250px;
}

.image-overlay-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    font-weight: 800;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* --- VISTAS: CASINO & DEMÁS APARTADOS --- */
.section-header-box {
    background: linear-gradient(135deg, #d3d3d3 0%, #c4c4c4 100%);
    border: 1px solid #a4a4a4;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    position: relative;
}

.section-header-box h2 {
    font-size: 20px;
    color: var(--theme-accent-text);
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.section-header-box p {
    font-size: 14px;
    color: #444444;
}

.casino-balance-pill {
    margin-top: 8px;
    display: inline-block;
    background-color: var(--theme-primary-dark);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.grid-casillas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.casilla-card {
    background-color: #d1d1d1;
    border: 1px solid #a6a6a6;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.casilla-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
    border-color: var(--theme-primary);
}

.casilla-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--theme-accent-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.casilla-card h3 {
    font-size: 17px;
    color: #222222;
    margin-bottom: 12px;
}

.casilla-desc {
    font-size: 13px;
    color: #444444;
    margin-top: 10px;
    margin-bottom: 14px;
}

.casilla-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-action {
    flex: 1;
    background-color: #e4e4e4;
    border: 1px solid #8e8e8e;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #222222;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-action:hover {
    background-color: #ffffff;
    border-color: #444444;
}

.btn-action.primary {
    background-color: var(--theme-btn-primary);
    color: #ffffff;
    border-color: var(--theme-btn-border);
    transition: all 0.2s ease;
}

.btn-action.primary:hover {
    background-color: var(--theme-btn-primary-hover);
}

.btn-action.secondary {
    background-color: #a8a8a8;
    color: #ffffff;
}

/* Casilla Slots */
.slot-display {
    background-color: #111111;
    border: 3px solid #cb9b28;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    justify-content: space-around;
    font-size: 32px;
    margin: 8px 0;
    box-shadow: inset 0 0 12px rgba(255, 215, 0, 0.3);
}

.slot-display .reel {
    background: #252525;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #444;
}

/* Casilla Ruleta */
.roulette-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin: 8px 0;
}

.roulette-number {
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 6px 0;
    border-radius: 4px;
    font-size: 13px;
}

.roulette-number.green { background-color: #1e824c; }
.roulette-number.red { background-color: #c0392b; }
.roulette-number.black { background-color: #2c3e50; }

.roulette-bets {
    display: flex;
    gap: 6px;
}

.bet-chip {
    flex: 1;
    padding: 6px;
    border-radius: 4px;
    border: none;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.red-chip { background-color: #d35400; }
.black-chip { background-color: #34495e; }
.green-chip { background-color: #27ae60; }

/* Casilla Blackjack / Cartas */
.cards-table {
    background-color: #1a5235;
    border: 2px solid #143d28;
    border-radius: 6px;
    padding: 10px;
    color: #fff;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card.mini {
    background-color: #fff;
    color: #000;
    border-radius: 3px;
    padding: 2px 6px;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.card.mini.back {
    background-color: #8b0000;
    color: #fff;
}

/* Casilla Dados */
.dice-display {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 42px;
    margin: 10px 0;
    color: #222;
}

/* Casilla Ajedrez */
.chess-board-mock {
    background-color: #e5c39c;
    border: 2px solid #8c5d36;
    border-radius: 4px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 10px 0;
}

.chess-row {
    display: flex;
    justify-content: space-around;
    font-size: 18px;
}

.sports-odds {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.odd-box {
    flex: 1;
    background-color: #e4e4e4;
    border: 1px solid #999;
    border-radius: 4px;
    padding: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.odd-box span {
    color: var(--theme-accent-text);
    font-weight: 800;
    font-size: 13px;
    transition: color 0.2s ease;
}

/* COLUMNA DERECHA: CHATS LATERALES */
.col-right {
    width: 255px;
    flex-shrink: 0;
}

.chats-sidebar {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    position: sticky;
    top: 70px;
}

.chats-title-bar {
    margin-bottom: 6px;
}

.chats-title-bar h2 {
    font-size: 17px;
    color: #222222;
    font-weight: 800;
}

.channel-selector-box {
    background-color: #cccccc;
    border: 1px solid #9c9c9c;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14px;
    color: #333333;
    margin-bottom: 8px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.channel-arrow {
    font-size: 12px;
    color: #555555;
}

.chat-messages-container {
    background-color: #e2e2e2;
    border: 1px solid #aeaeae;
    border-radius: 8px;
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.06);
}

.chat-message-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    background-color: #777777;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #999999;
    flex-shrink: 0;
}

.chat-content {
    flex: 1;
    min-width: 0;
}

.chat-header-meta {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.chat-author {
    font-weight: 700;
    font-size: 13px;
    color: #333333;
}

.chat-date {
    font-size: 10px;
    color: #666666;
}

.chat-text {
    font-size: 13px;
    color: #222222;
    word-break: break-word;
    margin-top: 1px;
}

.chat-input-wrapper input {
    width: 100%;
    background-color: #cfcfcf;
    border: 1px solid #9a9a9a;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #222222;
    transition: all 0.2s ease;
}

.chat-input-wrapper input:focus {
    background-color: #e8e8e8;
    border-color: var(--theme-primary);
    outline: none;
}

.chat-input-wrapper input::placeholder {
    color: #666666;
}

/* ================= DISEÑO RESPONSIVO ================= */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .col-left, .col-right {
        width: 100%;
    }
    
    .publicidad-box {
        height: 100px;
    }

    .chats-sidebar {
        height: 400px;
        position: static;
    }
}

/* ================= MODAL DE SELECCIÓN DE TEMA GLOBAL ================= */
.theme-modal {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 500px;
    background-color: #f6f6f6;
    border: 2px solid #8e8e8e;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 0 100vmax rgba(0, 0, 0, 0.35);
    padding: 22px;
    animation: modalPopIn 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.theme-modal.hidden {
    display: none;
}

@keyframes modalPopIn {
    from { opacity: 0; transform: translate(-50%, -15px) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.theme-modal-content {
    display: flex;
    flex-direction: column;
}

.theme-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.theme-modal-header h3 {
    font-size: 18px;
    color: #1f3664;
    color: var(--theme-accent-text);
    font-weight: 800;
}

.close-modal-btn {
    background: #e0e0e0;
    border: 1px solid #a0a0a0;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #444444;
    cursor: pointer;
    transition: all 0.15s ease;
}

.close-modal-btn:hover {
    background: #c0392b;
    color: #ffffff;
    border-color: #962d22;
}

.theme-modal-subtitle {
    font-size: 13px;
    color: #555555;
    margin-bottom: 18px;
    line-height: 1.4;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.theme-option {
    background-color: #e2e2e2;
    border: 2px solid #b8b8b8;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-option:hover {
    background-color: #ffffff;
    border-color: #666666;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.theme-option.active {
    background-color: #ffffff;
    border: 2px solid var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(61,96,162,0.15);
}

.theme-preview {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    border: 1.5px solid rgba(0,0,0,0.25);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.theme-info {
    display: flex;
    flex-direction: column;
}

.theme-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 2px;
}

.theme-info span {
    font-size: 11px;
    color: #666666;
}

/* ================= CONTROL DEL SWITCH DE MODO OSCURO ================= */
.dark-mode-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #eaeaea;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 16px;
    border: 1px solid #dcdcdc;
}

.dark-mode-label {
    font-size: 13px;
    font-weight: 700;
    color: #333333;
}

/* El Switch */
.switch-control {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #b8b8b8;
    transition: .3s;
    border-radius: 24px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider-round {
    background-color: var(--theme-primary);
}

input:checked + .slider-round:before {
    transform: translateX(20px);
}

/* ================= ADAPTACIONES DE MODO OSCURO GLOBAL ================= */
[data-dark="true"] {
    background-color: #212529;
}

[data-dark="true"] body {
    background-color: #212529;
    color: #f1f3f5;
}

/* Tarjetas y Contenedores con BORDES ADAPTADOS de color (como en la referencia) */
[data-dark="true"] .forum-post-card,
[data-dark="true"] .publicidad-box,
[data-dark="true"] .chat-messages-container,
[data-dark="true"] .post-input-container input,
[data-dark="true"] .chat-input-wrapper input,
[data-dark="true"] .channel-selector-box,
[data-dark="true"] .section-header-box,
[data-dark="true"] .casilla-card {
    background-color: #2b2f36 !important;
    border: 2.5px solid var(--theme-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Hover en casillas de casino en modo oscuro */
[data-dark="true"] .casilla-card:hover {
    border-color: var(--theme-primary-dark) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

/* Campos de entrada del foro y chat al enfocarse */
[data-dark="true"] .post-input-container input:focus,
[data-dark="true"] .chat-input-wrapper input:focus {
    background-color: #343a42 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15) !important;
}

/* Ajustes de textos y meta-info en modo oscuro */
[data-dark="true"] .author-name,
[data-dark="true"] .post-text,
[data-dark="true"] .chat-author,
[data-dark="true"] .chat-text,
[data-dark="true"] .chats-title-bar h2,
[data-dark="true"] .section-header-box h2,
[data-dark="true"] .casilla-card h3 {
    color: #ffffff !important;
}

[data-dark="true"] .post-date,
[data-dark="true"] .post-subtitle,
[data-dark="true"] .chat-date,
[data-dark="true"] .casilla-desc,
[data-dark="true"] .section-header-box p {
    color: #b0b7c0 !important;
}

/* Barra de Navegación en modo oscuro */
[data-dark="true"] .main-nav {
    background-color: #1a1c1e;
    border-bottom: 2px solid #2d3035;
}

[data-dark="true"] .nav-tabs .tab-item button {
    background-color: #2b2f36;
    border: 1px solid #4a4f57;
    color: #cccccc;
}

[data-dark="true"] .nav-tabs .tab-item button:hover {
    background-color: #373c44;
    color: #ffffff;
    border-color: #888888;
}

[data-dark="true"] .nav-tabs .tab-item.active button {
    background: var(--theme-primary);
    color: #ffffff;
    border-color: var(--theme-primary-dark);
}

/* Selector de canal del chat */
[data-dark="true"] .channel-selector-box {
    color: #ffffff !important;
}

[data-dark="true"] .channel-arrow {
    color: #cccccc;
}

/* Avatares y circulos */
[data-dark="true"] .avatar-circle,
[data-dark="true"] .chat-avatar {
    background-color: #373c44;
    border-color: var(--theme-primary);
}

/* Odds de apuestas en deportes */
[data-dark="true"] .odd-box {
    background-color: #373c44;
    border-color: #4a4f57;
    color: #ffffff;
}

[data-dark="true"] .odd-box span {
    color: var(--theme-primary);
}

/* Estilo del modal de temas en modo oscuro */
[data-dark="true"] .theme-modal {
    background-color: #25282c;
    border-color: var(--theme-primary);
    color: #ffffff;
}

[data-dark="true"] .theme-modal-header h3 {
    color: #ffffff;
}

[data-dark="true"] .theme-modal-subtitle {
    color: #b0b7c0;
}

[data-dark="true"] .dark-mode-toggle-row {
    background-color: #1a1c1e;
    border-color: #373c44;
}

[data-dark="true"] .dark-mode-label {
    color: #ffffff;
}

[data-dark="true"] .theme-option {
    background-color: #2e3239;
    border-color: #4a4f57;
}

[data-dark="true"] .theme-option:hover {
    background-color: #3b4047;
    border-color: #888888;
}

[data-dark="true"] .theme-option.active {
    background-color: #3b4047;
    border-color: var(--theme-primary);
}

[data-dark="true"] .theme-info h4 {
    color: #ffffff;
}

[data-dark="true"] .theme-info span {
    color: #b0b7c0;
}

/* ================= MOBILE ADAPTATION ================= */
@media (max-width: 900px) {
    /* Header layout */
    .top-header {
        height: auto;
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .header-center {
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .header-right {
        width: 100%;
        justify-content: flex-end;
        gap: 16px;
    }
    
    /* Navigation tabs */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-item button {
        white-space: nowrap;
    }
    
    /* Banner section */
    .banner-section {
        height: auto;
        padding: 20px 16px;
        text-align: center;
        justify-content: center;
    }
    
    .banner-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .banner-title {
        font-size: 24px;
        text-align: center;
    }
    
    /* Columns layout stacking */
    .main-container {
        flex-direction: column;
        padding: 12px;
        gap: 16px;
    }
    
    .col-left, .col-right, .col-center {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .col-left {
        display: none; /* Hide advertising on mobile */
    }
    
    /* Sticky sidebar behavior disable for mobile */
    .chats-sidebar {
        height: auto;
        position: static;
    }
    
    .chat-messages-container {
        height: 250px;
    }
    
    /* Grid system inside sections (Casino, Ajedrez, etc.) */
    .grid-casillas {
        grid-template-columns: 1fr !important;
    }
}

