/*

Theme Name: generatepress Child Theme

Theme URI: https://www.cocaro.online/

Description: Day la child theme cua generatepress

Author: Co Caro

Author URI: https://www.cocaro.online/

Template: generatepress

Version: 1.1

*/
/* ========================================= */
/* === 2. SẢNH CHỜ (LOBBY FIX - DARK MODE V2) === */
/* ========================================= */
.lobby-v2-container {
    gap: 16px;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 3fr 2fr; /* LEFT 3 – RIGHT 2 */
    gap: 16px;
    align-items: start;
        grid-template-columns: 3fr 2fr;
    grid-template-areas:
        "header header"
        "left right";
}
.lobby-col-left { grid-area: left; flex: 3; display: flex; flex-direction: column; gap: 15px; } 
.lobby-col-right { grid-area: right; flex: 2; display: flex; flex-direction: column; gap: 10px; min-width: 320px; }

/* 2.1 Header & Menu */
.zone-seo-header { 
    grid-area: header;
    background: var(--bg-card);
    grid-column: 1 / -1;
    padding: 30px;
    border-radius: var(--radius-box);
    box-shadow: 0 5px 15px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 25px;
    border-left: 6px solid var(--accent-color);
    border: 1px solid var(--border-color);
    border-left-width: 6px;
}
.header-icon img { width: 70px; height: 70px; object-fit: contain; }
.header-text h1 { margin: 0 0 8px 0; font-size: 28px; color: var(--text-primary); }
.header-excerpt { color: var(--text-secondary); margin: 0; font-size: 15px; font-weight: 500; }

.zone-game-modes { display: flex; flex-direction: column; gap: 15px; }

/* Nút phụ (Tạo phòng, Robot) */
.mode-btn { 
    border: 1px solid var(--border-color); /* 🔥 Viền theo theme */
    border-radius: 50px; 
    padding: 20px 35px; 
    font-size: 17px; font-weight: 600; 
    cursor: pointer; transition: transform 0.2s; 
    display: flex; align-items: center; justify-content: space-between; 
    position: relative; overflow: hidden; 
    box-shadow: 0 2px 5px var(--shadow-color);
    background: var(--bg-card); /* 🔥 Nền theo theme */
    color: var(--text-primary); /* 🔥 Chữ theo theme */
}
.mode-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    border-color: var(--accent-color); /* Hover viền xanh */
}
.btn-label-icon { display: flex; align-items: center; gap: 10px; }

/* 🔥 NÚT PLAY ONLINE (GIỮ NGUYÊN CSS GỐC) 🔥 */
.btn-play-online { 
    background: #16b18e; 
    color: white; 
    padding: 25px 30px; 
    border-radius: 20px;
    height: 80px;
    gap: 15px;
    display: flex; align-items: center; justify-content: center; 
    transform: translateY(-1px);
    border: none; /* Xóa viền nếu có */
    box-shadow: 0 6px 0 #139d7f, 0 12px 22px rgba(0,0,0,0.2);
}
.btn-play-online .icon { font-size: 40px; margin: 0; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; }
.btn-play-online .icon img, .btn-play-online svg { width: 100%; height: 100%; filter: brightness(0) invert(1); } /* Icon trắng */
.btn-play-online .btn-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.btn-play-online .btn-text strong { font-size: 24px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: white; }
.btn-play-online .btn-text small { font-size: 12px; opacity: 0.9; color: rgba(255,255,255,0.9); }

.btn-play-online:hover { background: #16b18e; transform: translateY(-2px); box-shadow: 0 7px 0 #139d7f, 0 16px 26px rgba(0,0,0,0.22); }
.btn-play-online:active { transform: translateY(3px); box-shadow: 0 2px 0 #139d7f, 0 6px 10px rgba(0,0,0,0.2); }


/* 2.2 Profile Panel */
.zone-profile { 
    background: var(--bg-card); 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-box); 
    box-shadow: 0 5px 15px var(--shadow-color); 
    padding: 20px; text-align: center; 
}
.profile-header { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--text-secondary); margin-bottom: 10px; }
.level-badge-circle { background: var(--accent-color); color: white; width: 35px; height: 35px; line-height: 35px; border-radius: 50%; font-weight: bold; font-size: 16px; }
.level-bar-container { background: var(--border-color); height: 12px; border-radius: 6px; margin: 15px 0; overflow: hidden; }
.level-bar-fill { height: 100%; background: linear-gradient(90deg, #00b894, #55efc4); }
.rank-info { font-size: 13px; color: var(--text-secondary); font-weight: 600; }

/* 2.3 Shop Fix (Lobby Small Shop) */
.zone-shop {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-box);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}
.shop-header { display: flex; justify-content: space-between; margin-bottom: 15px; font-weight: bold; color: var(--text-primary); }
.gold-wallet { 
    display: inline-flex; align-items: center; background: var(--bg-body); 
    border: 1px solid var(--accent-color); border-radius: 10px; padding: 5px 8px 5px 15px; 
    font-weight: bold; color: var(--text-primary); 
}
#gold-value { margin: 0 12px; font-size: 18px; }
.btn-plus { background: var(--accent-color); color: white; border: none; width: 28px; height: 28px; border-radius: 4px; font-size: 18px; line-height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }

.shop-promo-card {
    background: var(--hover-bg); 
    border: 1px dashed var(--border-color);
    padding: 15px; border-radius: 12px; display: flex; align-items: center; gap: 15px; 
    margin-bottom: 15px; transition: background 0.2s;
}
.shop-promo-card:hover { background: rgba(0, 184, 148, 0.1); border-color: var(--accent-color); }
.promo-icon { font-size: 28px; background: var(--bg-card); width: 50px; height: 50px; line-height: 50px; text-align: center; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.promo-text { flex: 1; display: flex; flex-direction: column; font-size: 14px; text-align: left; color: var(--text-primary); }
.promo-text strong { color: var(--text-primary); }
.promo-text small { color: var(--text-secondary); }
.promo-price { color: var(--accent-color); font-weight: bold; font-size: 18px; margin-right: 5px; }

.shop-quick-items small { color: var(--text-secondary); display: block; margin-bottom: 5px; }
.shop-sticker {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px; border-radius: 10px; text-align: center; font-size: 18px; width: 30%; cursor: pointer;
}
.shop-sticker:hover { transform: translateY(-3px); border-color: var(--accent-color); }
.shop-sticker span { font-size: 13px; font-weight: bold; color: #f1c40f; display: block; margin-top: 8px; }

/* 2.4 Chat & Ranking */
/*.zone-chat { 
    background: var(--bg-card); border-radius: var(--radius-box); 
    box-shadow: 0 5px 15px var(--shadow-color); padding: 20px; height: 350px; display: flex; flex-direction: column; 
    border: 1px solid var(--border-color);
}*/
.chat-content { 
    flex: 1; overflow-y: auto; background: var(--bg-body); 
    border-radius: 12px; padding: 15px; margin-bottom: 15px; font-size: 14px; 
    border: 1px solid var(--border-color); 
}
.msg.system { color: var(--text-secondary); font-style: italic; background: transparent; }

.chat-input-wrapper { display: flex; gap: 10px; align-items: center; }
#global-chat-input { 
    flex: 1; padding: 0 20px; 
    border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-primary);
    border-radius: 25px; outline: none; height: 45px; font-size: 14px; 
}
#btn-global-send { width: 45px; height: 45px; min-width: 45px; border-radius: 50%; background: var(--accent-color); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; padding: 0 0 0 3px; }

/* Bảng xếp hạng Ranking */
.zone-ranking {
    background: var(--bg-card);
    padding: 10px;
    border-radius: var(--radius-box);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}
.rank-header { 
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    color: #d35400;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 8px;
}
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border-color); font-size: 14px; }
.rank-num { font-weight: bold; color: var(--text-secondary); width: 35px; text-align: center; font-size: 16px; }
.rank-name { text-decoration: none; color: var(--text-primary); font-weight: 600; flex: 1; padding-left: 10px; display: flex; align-items: center; gap: 8px; }
.rank-score { font-weight: bold; color: var(--accent-color); font-size: 16px; }

/* ========================================= */
/* === 3. GAME PLAY & MODALS (DARK MODE) === */
/* ========================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 10000; }
.modal-box { 
    background: var(--bg-card); /* Nền modal tối */
    color: var(--text-primary); /* Chữ modal trắng */
    padding: 30px; border-radius: 15px; width: 90%; max-width: 400px; text-align: center; animation: zoomIn 0.3s; 
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.modal-title { color: var(--text-primary); display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px;}
.btn-cancel { color: var(--text-primary); border: 1px solid var(--border-color); background: var(--bg-body); }
.btn-cancel:hover { background: var(--hover-bg); }
.btn-bot { color: #fff; } /* Chữ trong nút bot luôn trắng */


/* =========================================
   4. MODAL BUTTONS & TOAST STYLING (FINAL)
   ========================================= */

/* --- A. NÚT CHỌN CẤP ĐỘ BOT --- */
.bot-level-list {
    display: flex; flex-direction: column; gap: 12px; margin: 20px 0;
}

.btn-bot {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px;
    border: none; border-radius: 12px;
    font-size: 16px; font-weight: 700; color: #fff !important; 
    cursor: pointer; position: relative; overflow: hidden;
    transition: all 0.2s ease;
}

/* Nút Dễ (Xanh lá) */
.btn-bot.easy {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}
.btn-bot.easy:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5); }

/* Nút Khó (Đỏ cam) */
.btn-bot.hard {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}
.btn-bot.hard:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5); }

.bot-icon svg { width: 24px; height: 24px; stroke-width: 2.5px; }
.bot-text small { opacity: 0.8; font-weight: 400; font-size: 13px; margin-left: 5px; }


/* --- B. NÚT HỦY BỎ & BUTTON CHUNG --- */
.btn-cancel, 
.modal-actions .btn-secondary {
    width: 100%; padding: 12px;
    background: transparent;
    border: 1px solid var(--border-color); color: var(--text-secondary);
    border-radius: 10px; font-weight: 600; cursor: pointer; transition: 0.2s;
}

.btn-cancel:hover,
.modal-actions .btn-secondary:hover {
    background: var(--hover-bg); color: var(--text-primary); border-color: var(--text-secondary);
}

.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-danger {
    background: #e74c3c; color: white; border: none;
    padding: 12px; border-radius: 10px; font-weight: bold; cursor: pointer; flex: 1;
}
.btn-danger:hover { background: #c0392b; }


/* --- C. TOAST NOTIFICATION --- */
#toast-notification {
    visibility: hidden; min-width: 280px;
    background-color: var(--bg-card); color: var(--text-primary);
    text-align: center; border-radius: 50px; padding: 14px 25px;
    position: fixed; z-index: 10005; left: 50%; bottom: 30px;
    transform: translateX(-50%) translateY(20px);
    opacity: 0; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    font-weight: 600; font-size: 15px; border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
#toast-notification.show { visibility: visible; opacity: 1; bottom: 50px; transform: translateX(-50%) translateY(0); }
#toast-notification.success { background-color: #00b894; color: white; border: none; box-shadow: 0 10px 20px rgba(0, 184, 148, 0.4); }
#toast-notification.error { background-color: #ff7675; color: white; border: none; box-shadow: 0 10px 20px rgba(255, 118, 117, 0.4); }
#toast-notification.gold { background-color: #fdcb6e; color: #2d3436; border: none; box-shadow: 0 10px 20px rgba(253, 203, 110, 0.4); }


/* =========================================
   3. GAME PLAY INTERFACE (FINAL FIX)
   ========================================= */

#game-container {
    max-width: 1100px; margin: 0 auto; padding: 20px 10px; animation: fadeIn 0.5s ease;
}

/* --- A. TOOLBAR --- */
.game-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-card); padding: 15px 20px;
    border-radius: 16px; box-shadow: 0 4px 12px var(--shadow-color);
    margin-bottom: 25px; border: 1px solid var(--border-color);
}
.center-tools h2 {
    color: var(--accent-color) !important; font-size: 18px; font-weight: 800; margin: 0;
    text-transform: uppercase; letter-spacing: 1px;
}
.game-toolbar button,
.game-toolbar a.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
    transition: 0.2s; border: 1px solid var(--border-color);
    background: var(--bg-body); color: var(--text-primary);
}
.game-toolbar button:hover,
.game-toolbar a.btn-secondary:hover {
    background: var(--accent-color); color: #fff; border-color: var(--accent-color);
}
#btn-surrender { color: #e74c3c; border-color: rgba(231, 76, 60, 0.3); }
#btn-surrender:hover { background: #e74c3c; color: white; }
.right-tools .btn-primary {
    background: var(--accent-color) !important; color: white !important; border: none !important;
    box-shadow: 0 4px 10px rgba(0, 184, 148, 0.3);
}

/* --- B. PLAYER STATUS BAR --- */
/* =========================================
   TIMER BAR STYLE (GIỐNG HÌNH YÊU CẦU)
   ========================================= */

/* 1. Container chứa thanh bar và text */
.game-center-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px; /* Đủ rộng để không bị co */
}

#status-display {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8; /* Màu xám nhẹ */
    margin-bottom: 8px;
}

/* 2. Khung nền xám của thanh Bar */
.timer-wrapper {
    width: 100%;
    height: 8px; /* Độ dày thanh bar */
    background-color: #334155; /* Màu nền tối */
    border-radius: 10px; /* Bo tròn 2 đầu */
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* 3. Thanh chạy (Màu xanh Gradient) */
#timer-bar {
    width: 100%; /* Mặc định đầy */
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #3b82f6); /* Xanh ngọc -> Xanh dương */
    border-radius: 10px;
    transition: width 1s linear; /* Hiệu ứng tụt dần mượt mà */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); /* Phát sáng nhẹ */
}

/* 4. Text số giây bên dưới */
.timer-text-row {
    display: flex; align-items: center; gap: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.timer-text-row svg {
    width: 16px; height: 16px;
    stroke: #cbd5e1;
    stroke-width: 2.5px;
}

/* --- TRẠNG THÁI SẮP HẾT GIỜ (Dưới 5s - Hóa Đỏ) --- */
/* Class này sẽ được JS thêm vào hoặc JS đổi màu inline */
.timer-danger #timer-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}
.player-status-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-card); padding: 15px 30px;
    border-radius: 50px; box-shadow: 0 8px 25px var(--shadow-color);
    margin-bottom: 30px; border: 1px solid var(--border-color);
}
.player-mini-card {
    display: flex; align-items: center; gap: 15px;
    padding: 5px 15px; border-radius: 40px;
    border: 2px solid transparent; transition: 0.3s;
}
.mini-avatar {
    width: 55px; height: 55px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--border-color); background: var(--bg-body);
}
.mini-info { display: flex; flex-direction: column; }
.mini-name {
    font-weight: 800; font-size: 16px; color: var(--text-primary);
    max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-badge {
    font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 10px;
    color: white; width: fit-content; margin-top: 4px;
}
.badge-x { background: #ff4757; box-shadow: 0 2px 5px rgba(255, 71, 87, 0.4); }
.badge-o { background: #2ed573; box-shadow: 0 2px 5px rgba(46, 213, 115, 0.4); }
.player-mini-card.active-turn { background: var(--hover-bg); transform: scale(1.05); }
.player-mini-card.active-turn.player-x-theme { border-color: #ff4757; }
.player-mini-card.active-turn.player-o-theme { border-color: #2ed573; }
.game-center-status { text-align: center; min-width: 150px; }
#status-display { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
#timer-container { height: 8px; background: var(--border-color); border-radius: 4px; overflow: hidden; width: 100%; }
#timer-bar { height: 100%; background: linear-gradient(90deg, #00b894, #0984e3); width: 100%; transition: width 1s linear; }
#timer-text { margin-top: 5px; font-weight: bold; color: var(--text-primary); }

/* --- C. GAME BOARD --- */
.game-layout {
    display: flex; gap: 30px; justify-content: center; align-items: flex-start;
}
.board-area {
    background: var(--bg-card); padding: 15px; border-radius: 12px;
    box-shadow: 0 10px 40px var(--shadow-color); border: 1px solid var(--border-color);
}
#caro-board {
    display: grid; grid-template-columns: repeat(15, 34px) !important; grid-template-rows: repeat(15, 34px) !important;
    background-color: #0f172a; border: 5px solid #8b4513; border-radius: 4px; margin: 0 auto;
}
[data-theme="dark"] #caro-board { background-color: #2d3436; border-color: #636e72; }
.cell { 
    width: 100%; height: 100%; 
    border: 1px solid rgba(255,255,255,0.1); /* Sửa viền thành trong suốt nhẹ để hợp mọi nền */
    display: flex; justify-content: center; align-items: center; 
    font-weight: bold; 
    font-size: clamp(12px, 2.5vw, 24px); 
    cursor: pointer; 
}
[data-theme="dark"] .cell { border-color: rgba(255,255,255,0.08); }
.cell:hover { background-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .cell:hover { background-color: rgba(255,255,255,0.1); }
.cell.x-move { color: #ff4757; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
.cell.o-move { color: #2ed573; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
.cell.last-move { background-color: rgba(255, 235, 59, 0.5) !important; box-shadow: inset 0 0 5px rgba(255, 193, 7, 0.8); }

/* --- D. IN-GAME CHAT --- */
.chat-area {
    width: 320px; height: 570px; background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: 16px;
    display: flex; flex-direction: column; box-shadow: 0 5px 15px var(--shadow-color);
}
.chat-header {
    background: var(--hover-bg); padding: 15px; font-weight: 700;
    border-bottom: 1px solid var(--border-color); color: var(--text-primary);
}
#chat-messages {
    flex: 1; overflow-y: auto; padding: 15px; background: var(--bg-body);
    display: flex; flex-direction: column; gap: 10px;
}
.msg {
    padding: 8px 12px; border-radius: 12px; max-width: 85%; font-size: 13px; line-height: 1.4; word-wrap: break-word;
}
.msg:not(.me):not(.system) {
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border-color); border-bottom-left-radius: 2px;
}
.msg.me {
    background: var(--accent-color); color: white; align-self: flex-end; border-bottom-right-radius: 2px;
}
.chat-input-area {
    padding: 10px; border-top: 1px solid var(--border-color); background: var(--bg-card); display: flex; gap: 8px;
}
#chat-input {
    flex: 1; background: var(--input-bg); border: 1px solid var(--border-color);
    color: var(--text-primary); border-radius: 20px; padding: 8px 15px; outline: none; font-size: 14px;
}
#btn-send {
    background: var(--accent-color); color: white; border: none; padding: 0 15px; border-radius: 20px; font-weight: 600; cursor: pointer;
}

/* --- E. KẾT QUẢ --- */
#action-area {
    background: var(--hover-bg); border: 1px solid var(--accent-color);
    padding: 20px; border-radius: 12px; margin-bottom: 20px; text-align: center;
    animation: slideDown 0.3s;
    display: block;
}
#winner-text {
    font-size: 24px; font-weight: 800; color: var(--accent-color); margin-bottom: 15px;
}
.btn-rematch {
    background: var(--accent-color); color: white; border: none; padding: 10px 25px;
    border-radius: 8px; font-weight: bold; cursor: pointer; margin-right: 10px;
}
.btn-exit {
    background: transparent; border: 1px solid var(--border-color); color: var(--text-primary);
    padding: 9px 20px; border-radius: 8px; text-decoration: none; font-weight: bold;
}
@media (max-width: 900px) {
    .game-layout { flex-direction: column; align-items: center; }
    .chat-area { width: 100%; height: 300px; display: none;}
    #caro-board { grid-template-columns: repeat(15, 22px); grid-template-rows: repeat(15, 22px); }
    .cell { width: 22px; height: 22px; font-size: 14px; }
}


/* =========================================
   5. SHOP INTERFACE (RIGHT SIDEBAR LAYOUT)
   ========================================= */

.shop-page-wrapper {
    max-width: 1200px; margin: 0 auto; padding: 20px;
}

/* Header Shop */
.shop-page-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px; padding: 15px 20px; color: white;
    gap:20px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
}
.shop-title h1 { margin: 0; font-size: 26px; color: #fff; }
.shop-title p { margin: 5px 0 0 0; opacity: 0.7; font-size: 14px; }

/* Ví tiền */
.shop-wallet-box {
    background: rgba(255,255,255,0.1);
    padding: 8px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; gap: 15px;
}
.gold-amount { font-size: 22px; font-weight: 800; color: #f1c40f; display: flex; align-items: center; gap: 8px; }
.btn-deposit {
    background: #00b894; color: white; border: none; padding: 8px 15px;
    border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.2s;
}
.btn-deposit:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 184, 148, 0.4); }


/* --- MAIN LAYOUT (2 CỘT: TRÁI MAIN - PHẢI SIDEBAR) --- */
.shop-page-layout {
    display: grid;
    grid-template-columns: 1fr 300px; /* Cột phải cố định 300px */
    gap: 30px;
    align-items: start;
}

/* 1. CỘT TRÁI (MAIN CONTENT) */
.shop-main-col {
    min-width: 0;
}

/* Tabs Danh Mục (Thanh ngang) */
.shop-categories-tabs {
    list-style: none; padding: 0; margin: 0 0 25px 0;
    display: flex; gap: 10px; flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}
.shop-categories-tabs li {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 20px; border-radius: 50px;
    cursor: pointer; font-weight: 600; color: var(--text-secondary);
    transition: 0.2s; display: flex; align-items: center; gap: 8px;
    font-size: 14px;
}
.shop-categories-tabs li:hover { background: var(--hover-bg); color: var(--text-primary); }
.shop-categories-tabs li.active {
    background: var(--accent-color); color: white; border-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0, 184, 148, 0.3);
}

/* Lưới sản phẩm */
.shop-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px;
}

/* Shop Description */
.shop-description-area {
    margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-color);
}
.shop-desc-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 25px; color: var(--text-primary);
}


/* 2. CỘT PHẢI (SIDEBAR WIDGETS) */
.shop-right-sidebar {
    position: sticky; top: 20px;
}
.shop-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px; padding: 20px; margin-bottom: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
}
.shop-widget .widget-title {
    font-size: 16px; font-weight: 800; color: var(--accent-color);
    margin: 0 0 15px 0; border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px; text-transform: uppercase;
}


/* --- C. ITEM CARD STYLE --- */
.shop-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px; padding: 20px;
    text-align: center; position: relative;
    transition: all 0.3s ease; overflow: hidden;
}
.shop-card:hover {
    transform: translateY(-5px); box-shadow: 0 10px 25px var(--shadow-color); border-color: var(--accent-color);
}
.sc-icon {
    font-size: 40px; height: 80px; display: flex; align-items: center; justify-content: center;
    background: var(--hover-bg); border-radius: 12px; margin-bottom: 15px;
}
.sc-info h3 { margin: 0 0 10px 0; font-size: 16px; color: var(--text-primary); }
.btn-shop { width: 100%; padding: 10px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; font-size: 13px; transition: 0.2s; }
.btn-buy { background: #f39c12; color: white; box-shadow: 0 4px 0 #d35400; }
.btn-buy:active { transform: translateY(2px); box-shadow: 0 2px 0 #d35400; }
.btn-equip { background: #3498db; color: white; box-shadow: 0 4px 0 #2980b9; }
.btn-equip:active { transform: translateY(2px); box-shadow: 0 2px 0 #2980b9; }
.shop-card.equipped { border: 2px solid var(--accent-color); background: rgba(0, 184, 148, 0.05); }
.btn-shop.disabled { background: var(--bg-body); color: var(--text-secondary); border: 1px solid var(--border-color); cursor: default; }
.badge-equipped {
    position: absolute; top: 10px; right: 10px;
    background: var(--accent-color); color: white;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}
/*Ẩn mobile trên desktop*/
.show-on-mobile, 
.mobile-control-row, 
.app-footer{ 
    display: none !important; 
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .shop-page-header{
        flex-wrap: wrap;
    }
    .shop-page-layout { grid-template-columns: 1fr; }
    .shop-right-sidebar { order: 1; /* Sidebar xuống dưới cùng */ }
    .shop-categories-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 10px; }
    .shop-categories-tabs li { flex: 0 0 auto; }
    #action-area{
        margin: 10px 15px 0 15px;
        flex-direction: column;
    }
}
/* FIX ALIGNMENT TOOLBAR */
.left-tools {
    display: flex;
    align-items: center; /* Căn giữa theo chiều dọc */
    gap: 10px; /* Khoảng cách giữa các nút */
}

/* Đảm bảo nút Rời và nút Loa có chiều cao bằng nhau */
.game-toolbar button,
.game-toolbar .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px; /* Chiều cao cố định */
    padding: 0 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    /* Reset các style mặc định gây lệch */
    line-height: 1; 
    margin: 0;
    vertical-align: middle;
}

/* Riêng nút Loa hình vuông cho đẹp */
#btn-sound-toggle {
    width: 40px; /* Vuông 40x40 */
    padding: 0;  /* Bỏ padding để icon ra giữa */
}
/* Chỉnh lại icon bên trong */
.game-toolbar svg {
    display: block; /* Xóa khoảng trắng thừa của inline */
}
/* =========================================
   STYLE MOBILE FIX (Dán đè vào phần Media Query cũ)
   ========================================= */
@media (max-width: 768px) {
        .lobby-v2-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "profile"
            "game-modes"
            "chat"
            "left"
            "right";
    }
    .zone-seo-header {
        padding: 10px;
        gap: 10px;
    }
    .header-text h1 {
        font-size: 23px;
        }
        .lobby-col-left,
    .lobby-col-right {
        display: contents;
    }
        .zone-game-modes {
        grid-area: game-modes;
    }

    .zone-chat {
        grid-area: chat;
    }

    .zone-ranking {
        grid-area: right;
    }
    .zone-profile {
        grid-area: profile;
        }
    
    /* 1. Ẩn/Hiện */
    .hide-on-mobile, .desktop-text { display: none !important; }
    .show-on-mobile { display: flex !important; }

    /* 2. App Container */
    #game-container {
        position: fixed; top: 0; left: 0;
        width: 100%; height: 100vh;
        background: #0b1120;
        z-index: 99999;
        padding: 0; margin: 0;
        display: flex; flex-direction: column;
        overflow: hidden;
    }

    /* 3. Header */
    .game-toolbar {
        background: #151e32;
        border-bottom: 1px solid #2a3b55;
        padding: 0 15px; height: 50px; flex-shrink: 0;
        display: flex; justify-content: space-between; align-items: center;
        margin: 0; border-radius: 0;
    }
    #room-title { font-size: 14px; font-weight: 700; color: #fbbf24; margin: 0; }
    .mobile-move-count { font-size: 10px; color: #94a3b8; justify-content: center;}
    .game-toolbar button { background: transparent; border: none; padding: 0; width: auto; color: #cbd5e1;}

    /* 🔥 4. MOBILE CONTROLS ROW (MỚI) 🔥 */
    /* Chia 3 cột: Loa - Timer - Cờ */
    .mobile-control-row {
        background: #0b1120; /* Nền trùng màu App */
        padding: 0 15px;
        display: flex; justify-content: space-between; align-items: center;
        height: 60px; flex-shrink: 0;
        position: relative;
    }

    /* Timer Tròn Ở Giữa */
    .mobile-timer-circle {
        width: 50px; height: 50px; border-radius: 50%;
        background: #1e293b; border: 3px solid #3b82f6;
        display: flex; justify-content: center; align-items: center;
        font-weight: 800; font-size: 24px; color: white;
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    }

    /* Nút tròn 2 bên */
    .btn-circle-dark {
        width: 45px; height: 45px; border-radius: 12px;
        padding:unset;
        background: #1e293b; border: 1px solid #334155;
        color: #94a3b8; font-size: 20px; cursor: pointer;
        display: flex; justify-content: center; align-items: center;
    }
    .icon-red { color: #ef4444; }

    /* 5. Player Bar */
    .player-status-bar {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 10px 15px 10px 15px;
        margin: 0;
        height: auto;
        flex-shrink: 0;
        border-radius: unset;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #2a3b55;
        border-bottom: 1px solid #2a3b55;
        position: relative;
    }
    .player-mini-card {
        padding: 5px 10px; 
    width: 40%; /* Giảm width xuống xíu để nhường chỗ cho VS ở giữa */
    background: #1e293b; border: 1px solid #334155;
    border-radius: 10px;
    display: flex; align-items: center; gap: 8px;
    }
    .player-status-bar::after { 
        content: "VS";
        position: absolute; /* Tách khỏi dòng chảy Flex */
        left: 50%; 
        top: calc(50% - 5px); /* Căn giữa theo chiều dọc (trừ đi padding bottom của bar) */
        transform: translate(-50%, -50%); /* Dịch chuyển để tâm chữ nằm chính giữa */
        
        color: #475569;
        font-size: 14px; /* To hơn một chút */
        font-weight: 900;
        font-style: italic;
        
        /* Mẹo: Thêm nền trùng màu App để tạo khoảng trống sạch sẽ nếu 2 thẻ player sát nhau quá */
        background-color: #0b1120; 
        padding: 0 8px; 
        z-index: 2; /* Nổi lên trên */ 
    }
    
    /* Hiệu ứng Active */
    .player-mini-card.active-turn { transform: scale(1.05); z-index: 1; }
    .player-x-theme.active-turn { border-color: #ff4757; background: rgba(255, 71, 87, 0.1); }
    .player-o-theme.active-turn { border-color: #2ed573; background: rgba(46, 213, 115, 0.1); }
    .p-avatar-box img { width: 32px; height: 32px; border-radius: 50%; }
    .p-name { font-size: 12px; max-width: 70px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff;}
    .mini-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; }

    /* 6. Bàn cờ & Footer */
    .game-layout { margin: 0; display: flex; align-items: flex-start; justify-content: center; background: #0b1120; padding-top: 5px;padding-bottom:25px; }
    .board-area { padding: 5px;width: 100%; display: flex; justify-content: center; border: none; background: transparent; box-shadow: none; }
    #caro-board {
        width: 96vw; height: 96vw;
        display: grid;
        grid-template-columns: repeat(15, 1fr) !important;
        grid-template-rows: repeat(15, 1fr) !important;
        gap: 1px; background-color: #2a3b55; border: 1px solid #2a3b55;
    }
    /*.right-tools, .left-tools {
        padding: 0px 15px !important;
        border-radius: 8px !important;
        background: #334155 !important;
    }*/
    .cell { width: auto; height: auto; background-color: #0f172a; border: none !important; display: flex; justify-content: center; align-items: center; font-size: 16px; font-weight: 900; }
    .cell.x-move { color: #3b82f6; } .cell.o-move { color: #ef4444; } .cell.last-move { background-color: #1e293b; }

    .app-footer { height: 50px; flex: 1; background: #151e32; border-top: 1px solid #2a3b55; display: flex !important; justify-content: space-between; align-items: center; padding: 0 20px; flex-shrink: 0; }
    .btn-circle-gray { width: 36px; padding:unset; height: 36px; border-radius: 50%; background: #1e293b; border: 1px solid #334155; color: #94a3b8; margin-right: 10px; }
    .footer-right strong { font-family: monospace; font-size: 14px; color: #fff; }
    .footer-right span { font-size: 10px; color: #64748b; margin-right: 5px; }
}
/* =========================
   CARO AUTH - LOGIN / REGISTER
   ========================= */

.caro-auth-container {
    max-width: 420px;
    border-radius: 16px;
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Tabs ===== */
.caro-auth-container .auth-tabs {
    display: flex;
    background: #020617;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 22px;
}

.caro-auth-container .auth-tabs button {
    flex: 1;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-weight: 600;
    padding: 10px 0;
    border-radius: 10px;
    cursor: pointer;
    transition: .25s;
}

.caro-auth-container .auth-tabs button.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
    box-shadow: 0 4px 12px rgba(34,197,94,.4);
}

/* ===== Form ===== */
.caro-auth-container .auth-form p {
    margin-bottom: 15px;
}

.caro-auth-container label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #cbd5f5;
}

.caro-auth-container input[type="text"],
.caro-auth-container input[type="email"],
.caro-auth-container input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #1e293b;
    background: #020617;
    color: #e5e7eb;
    font-size: 14px;
    transition: .2s;
}

.caro-auth-container input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,.25);
}

/* ===== Buttons ===== */
.caro-auth-container input[type="submit"],
.caro-auth-container .button-primary {
    width: 100%;
    margin-top: 10px;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: .25s;
}

.caro-auth-container input[type="submit"]:hover,
.caro-auth-container .button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(34,197,94,.45);
}

/* ===== WP Login form cleanup ===== */
.caro-auth-container .login-remember,
.caro-auth-container .login-lost-password {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
}

.caro-auth-container a {
    color: #22c55e;
    text-decoration: none;
}

.caro-auth-container a:hover {
    text-decoration: underline;
}

/* ===== Error / Message ===== */
.caro-auth-container .message,
.caro-auth-container .login-error {
    background: rgba(239,68,68,.15);
    border: 1px solid #ef4444;
    color: #fecaca;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 15px;
}

/* ===== Mobile ===== */
@media (max-width: 480px) {
    .caro-auth-container {
        margin: 20px 12px;
        padding: 22px 18px;
    }
}
/*Page AI*/
/* --- FIX LAYOUT SEO CONTENT (ÉP XUỐNG DÒNG) --- */

/* 1. Reset trạng thái hiển thị */
.page-content {
    display: block !important;
    border: 1px solid #656565;
    border-radius: 12px;
    padding: 20px;
    box-shadow: none;
    line-height: 1.6;
    /* margin: 10px; */
    clear: both !important;
    width: 100% !important;
    max-width: 1000px !important;
    margin: 50px auto !important;
    float: none !important;
}
.page-content h1{
    color: var(--accent-color) !important; 
    font-size: 24px !important; 
    margin-bottom: 20px !important;
}
nav.rank-math-breadcrumb {
    padding: 10px;
}
/* 2. Ép container cha (nếu có) phải ngắt dòng */
#game-container {
    display: flex;
    flex-wrap: wrap; /* Cho phép các phần tử con rớt dòng */
    justify-content: center;
}

/* 3. Đảm bảo khu vực bàn cờ chiếm hết chiều ngang trước khi đến SEO */
.game-layout, .game-toolbar, .player-status-bar {
    width: 100%;
    max-width: 1100px;
}

/* 4. Fix lỗi CSS bị dính cột bên phải */
@media (min-width: 769px) {
    .site-content {
        display: flex;
        flex-direction: column; /* Quan trọng: Xếp dọc từ trên xuống */
        align-items: center;
    }
}
/* --- BOT LEVEL SELECTOR (PANEL BÊN PHẢI) --- */

.bot-control-panel {
    background: var(--bg-card); /* Dùng màu nền card của theme */
    padding: 25px 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    height: 100%; /* Chiếm hết chiều cao khu vực bên phải */
    box-shadow: var(--card-shadow);
}

.panel-title {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-buttons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Style chung cho nút chọn level */
.btn-level-select {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff !important; /* Màu chữ trắng */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 3px solid transparent; /* Viền trong suốt để dành cho active */
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng hover */
.btn-level-select:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px -10px rgba(0,0,0,0.3);
}

/* Trạng thái Active (Đang chọn) */
.btn-level-select.active {
    border-color: #fff; /* Viền trắng làm nổi bật */
    box-shadow: 0 0 0 3px rgba(255,255,255,0.2), inset 0 0 20px rgba(0,0,0,0.2);
}
/* Mũi tên chỉ báo active */
.btn-level-select.active::after {
    content: '👉';
    position: absolute;
    right: 15px;
    font-size: 20px;
    animation: pointRight 0.8s infinite alternate;
}
@keyframes pointRight { from { transform: translateX(0); } to { transform: translateX(5px); } }

/* Icon và Text bên trong */
.lvl-icon {
    font-size: 32px;
    margin-right: 15px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}
.lvl-info { display: flex; flex-direction: column; }
.lvl-name { font-weight: 800; font-size: 16px; line-height: 1.2; }
.lvl-desc { font-size: 12px; opacity: 0.9; margin-top: 3px; font-weight: 400; }

/* MÀU SẮC TỪNG NÚT */
/* Dễ - Xanh lá */
.btn-easy { background: linear-gradient(135deg, #2ecc71, #27ae60); }
/* Khó - Cam cháy */
.btn-hard { background: linear-gradient(135deg, #f39c12, #d35400); }
/* Siêu cấp - Tím mộng mơ */
.btn-super { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
/* Hiệu ứng 5 ô thắng cuộc */
.cell.win-line {
    background-color: #2ecc71 !important; /* Màu xanh lá nổi bật */
    color: #fff !important;
    animation: winFlash 0.5s infinite alternate;
    border-color: #27ae60 !important;
    z-index: 10;
}

@keyframes winFlash {
    from { transform: scale(1); box-shadow: 0 0 5px #2ecc71; }
    to { transform: scale(1.1); box-shadow: 0 0 15px #2ecc71; }
}
/* CSS Lobby của cocaro.online/play chơi online đánh rank */
.lobby-container { max-width: 1000px; margin: 50px auto; text-align: center; padding: 0 15px; }
.lobby-card-wrapper { display: flex; justify-content: center; margin-bottom: 40px; }
.lobby-user-card { width: 100%; max-width: 500px; background: #1f2937; border: 1px solid #374151; padding: 30px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); position: relative; }
.avatar-glow img { border: 3px solid #10b981; box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); width: 100px; height: 100px; border-radius: 50%; }
.user-name { font-size: 26px;
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }
.lobby-level-badge { background: #f59e0b; color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 10px; vertical-align: middle; }
.user-stats-badges { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.badge-pill { padding: 8px 15px; border-radius: 20px; font-weight: bold; font-size: 14px; color: #fff; display: flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,0.1); }
.badge-pill.purple { background: #8b5cf6; } .badge-pill.yellow { background: #fbbf24; color: #111; }
.guest-alert-bar { background: rgba(255,255,255,0.1); padding: 8px 15px; border-radius: 10px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; color: #cbd5e1; font-size: 13px; }
.btn-login-mini { background: #10b981; color: white; padding: 4px 12px; border-radius: 15px; text-decoration: none; font-weight: bold; font-size: 12px; border: none; cursor: pointer; }
.lobby-actions { display: flex; flex-direction: column; gap: 15px; width: 100%; }
.btn-lobby { display: flex; align-items: center; width: 100%; padding: 15px; border: none; border-radius: 15px; cursor: pointer; transition: transform 0.2s; text-align: left; position: relative; overflow: hidden; min-height: 80px; }
.btn-lobby:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.btn-lobby .icon { font-size: 32px; margin-right: 15px; width: 40px; text-align: center; }
.btn-lobby .text { display: flex; flex-direction: column; }
.btn-lobby .main { font-weight: 900; font-size: 16px; text-transform: uppercase; }
.btn-lobby .sub { font-size: 12px; opacity: 0.8; }
.btn-home { background: linear-gradient(135deg, #0984e3, #74b9ff); color: white; box-shadow: 0 5px 20px rgba(9, 132, 227, 0.4); }
.btn-primary-glitch { background: linear-gradient(135deg, #00cec9, #0984e3); color: white; box-shadow: 0 5px 20px rgba(9, 132, 227, 0.4); }
.btn-secondary { background: var(--bg-card);
    border: 1px solid #34495e; }
.btn-shop { background: linear-gradient(135deg, #e67e22, #d35400); color: white; box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4); }
@media (min-width: 769px) { .lobby-actions { flex-direction: row; justify-content: space-between; gap: 20px; } .btn-lobby { flex: 1; flex-direction: column; text-align: center; align-items: center; justify-content: center; padding: 25px 15px; height: 140px; } .btn-lobby .icon { margin-right: 0; margin-bottom: 10px; font-size: 40px; } }
.mobile-control-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background: #0b1120; border-bottom: 1px solid #eee; }
.p-level-badge { font-size: 11px; background: #34495e; color: #fff; padding: 2px 6px; border-radius: 4px; margin-left: 5px; vertical-align: middle; font-weight: bold; }
@media (max-width: 768px) { .game-mode-online { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9990; overflow-y: auto; background: #0b1120; margin: 0 !important; } .modal-overlay { position: fixed !important; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; z-index: 100000 !important; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; } .modal-box.result-box { position: fixed; top: 0; left: 0; width: 100% !important; height: 100% !important; max-width: none !important; border-radius: 0 !important; display: flex !important; flex-direction: column; justify-content: center; border: none; overflow-y: auto; z-index: 100001; } .shop-box { width: 100% !important; height: 100% !important; max-height: none !important; border-radius: 0 !important; position: fixed; top: 0; left: 0; } .btn-result-action { width: 90%; padding: 15px; margin: 10px auto; font-size: 18px; border-radius: 30px; } }
.btn-circle-dark { width: 40px; height: 40px; border-radius: 50%; border: none; background: #2c3e50; color: white; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mobile-timer-circle { width: 50px; height: 50px; border-radius: 50%; background: #fff; border: 3px solid #00b894; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 18px; color: #2c3e50; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.btn-circle-gray { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ddd; background: #f8f9fa; color: #555; cursor: pointer; margin-right: 5px; }
.close-chat-mobile { float: right; font-size: 24px; cursor: pointer; color: #e74c3c; margin-top: -5px; }
.result-box { width: 400px; text-align: center; padding: 25px; border-radius: 15px; border: 1px solid #34495e; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.result-header { margin-bottom: 20px; }
.result-rank-title { font-size: 16px; color: #555; margin-top: 5px; font-weight: bold; }
.reward-row { display: flex; justify-content: space-around; margin-bottom: 20px; }
.reward-item { display: flex; flex-direction: column; }
.reward-item .label { font-size: 12px; color: #aaa; text-transform: uppercase; } .reward-item b { font-size: 24px; }
.exp-section { margin: 20px 0; text-align: left; background: rgba(0,0,0,0.05); padding: 15px; border-radius: 10px; width: 100%; box-sizing: border-box; }
.level-progress-bg { position: relative; width: 100%; height: 12px; background: #bdc3c7; border-radius: 6px; overflow: hidden; margin-top: 5px; }
#level-progress-bar { height: 100%; background: linear-gradient(90deg, #2ecc71, #27ae60); transition: width 1.0s ease-in-out; }
#matching-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; backdrop-filter: blur(5px); }
.countdown-circle { position: relative; width: 120px; height: 120px; margin: 30px 0; }
.countdown-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown-circle circle { fill: none; stroke: #00b894; stroke-width: 8; stroke-dasharray: 283; stroke-dashoffset: 0; transition: 1s linear; }
#matching-timer { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 48px; font-weight: bold; color: #00b894; }
.matching-tips { font-size: 14px; color: #aaa; margin-bottom: 20px; font-style: italic; max-width: 80%; text-align: center; }
#btn-cancel-match { padding: 12px 40px; background: transparent; border: 2px solid #e74c3c; color: #e74c3c; border-radius: 30px; cursor: pointer; font-weight: bold; transition: 0.3s; }
#btn-cancel-match:hover { background: #e74c3c; color: white; }
.room-title-box { display: flex; flex-direction: column; align-items: center; }
.room-info-row { font-size: 16px; color: var(--text-primary); }
.mobile-move-count { font-size: 12px; color: #7f8c8d; }
.item-preview { height: 60px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; border-radius: 6px; font-size: 28px; background: #0f172a; }
.item-info h4 { font-weight: bold; font-size: 14px; margin: 0 0 5px 0; color: #2c3e50; }
.item-price { color: #f39c12; font-weight: bold; font-size: 13px; display: block; margin-bottom: 10px; }
.btn-buy-item { width: 100%; padding: 6px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; transition: 0.2s; }
.btn-buy-action { background: #27ae60; color: white; box-shadow: 0 3px 0 #219150; }
.btn-buy-action:active { transform: translateY(3px); box-shadow: none; }
.btn-equip-action { background: #3498db; color: white; box-shadow: 0 3px 0 #2980b9; }
.btn-equip-action:active { transform: translateY(3px); box-shadow: none; }
.btn-equipped-label { background: #bdc3c7; color: #fff; cursor: default; }
/* TOP 1 - VÀNG */
    .rank-list li.top-1 { background: linear-gradient(90deg, rgba(241, 196, 15, 0.15) 0%, transparent 100%); border-left: 3px solid #f1c40f; }
    .rank-list li.top-1 .rank-num { font-size: 20px; text-shadow: 0 0 10px #f1c40f; }
    .rank-list li.top-1 .rank-name { color: #f1c40f; font-weight: bold; }
    
    /* TOP 2 - BẠC */
    .rank-list li.top-2 { background: linear-gradient(90deg, rgba(189, 195, 199, 0.15) 0%, transparent 100%); border-left: 3px solid #bdc3c7; }
    .rank-list li.top-2 .rank-num { font-size: 18px; text-shadow: 0 0 10px #bdc3c7; }
    .rank-list li.top-2 .rank-name { color: #bdc3c7; font-weight: bold; }

    /* TOP 3 - ĐỒNG */
    .rank-list li.top-3 { background: linear-gradient(90deg, rgba(211, 84, 0, 0.15) 0%, transparent 100%); border-left: 3px solid #d35400; }
    .rank-list li.top-3 .rank-num { font-size: 18px; text-shadow: 0 0 10px #d35400; }
    .rank-list li.top-3 .rank-name { color: #e67e22; font-weight: bold; }