* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { background-color: #312e2b; color: #ffffff; touch-action: manipulation; }

/* TEMA BIRU UTAMA: #1E88E5, HOVER: #1976D2, DARK: #1565C0 */

/* PWA INSTALL BANNER */
.install-banner { display: flex; justify-content: space-between; align-items: center; background: #262421; padding: 12px 20px; border-bottom: 1px solid #1a1917; position: sticky; top: 0; z-index: 10000; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.install-info { display: flex; align-items: center; gap: 12px; }
.install-icon-box { background: #1E88E5; color: white; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 8px rgba(0,0,0,0.4); }
.install-text { display: flex; flex-direction: column; font-size: 14px; }
.install-text strong { color: #ffffff; font-weight: 800; }
.install-text span { color: #bab8b6; font-size: 11px; }
.install-actions { display: flex; align-items: center; gap: 12px; }
.btn-install-solid { background: #1E88E5; color: white; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; box-shadow: 0 3px 0 #1565C0; }
.btn-install-close { background: transparent; border: none; color: #bab8b6; font-size: 24px; cursor: pointer; font-weight: bold; }

.chess-header { display: flex; justify-content: space-between; align-items: center; background-color: #262421; padding: 12px 20px; border-bottom: 1px solid #1a1917; }
.header-left { display: flex; align-items: center; gap: 14px; }
.menu-setting-btn { background: transparent; border: none; font-size: 20px; color: #bab8b6; cursor: pointer; padding: 4px; }
.menu-setting-btn:hover { color: #ffffff; }

.brand-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: #ffffff; cursor: pointer; }
.brand-icon { color: #1E88E5; font-size: 22px; }
.brand-highlight { color: #1E88E5; }

.header-right { display: flex; gap: 8px; align-items: center; }
.btn-header-outline { background: transparent; border: 1px solid #1565C0; color: #ffffff; padding: 6px 12px; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 13px; }
.btn-header-solid { background: #1E88E5; border: none; color: #ffffff; padding: 6px 12px; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 13px; }

.user-pill { display: flex; align-items: center; gap: 10px; }
.profile-trigger { display: flex; align-items: center; gap: 6px; cursor: pointer; background: #211f1d; padding: 4px 8px; border-radius: 20px; border: 1px solid #403d39; font-size: 13px; }
.profile-trigger img { width: 26px; height: 26px; border-radius: 50%; }
.stats-box { background: #1e1c18; padding: 3px 8px; border-radius: 4px; font-size: 11px; display: flex; gap: 8px; border: 1px solid #383531; color: #bab8b6; }
.stat-item { display: flex; gap: 3px; align-items: center; }
.stat-label { font-weight: 800; color: #1E88E5; }

.main-container { max-width: 900px; margin: 20px auto; padding: 0 15px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.hero-section { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; justify-content: center; width: 100%; }
.chess-board-preview { width: 100%; max-width: 380px; border-radius: 4px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.hero-text { flex: 1; min-width: 260px; text-align: left; display: flex; flex-direction: column; align-items: center;}
.hero-text h1 { font-size: 32px; line-height: 1.2; font-weight: 800; margin-bottom: 10px; text-align: center; }
.hero-text p { color: #bab8b6; font-size: 14px; margin-bottom: 20px; text-align: center; }
.btn-get-started { background-color: #1E88E5; color: white; border: none; padding: 16px 36px; border-radius: 8px; font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 #1565C0; width: 100%; max-width: 300px; margin-bottom: 30px; }
.btn-get-started:hover { background-color: #1976D2; }

/* GRAFIS HERO ALA CHESS.COM (Diamond & Bidak Terapung) */
.hero-graphics { position: relative; width: 100%; height: 320px; max-width: 300px; margin: 0 auto; display: flex; justify-content: center; align-items: center; }
.diamond-container { position: absolute; transform: rotate(-45deg); display: flex; justify-content: center; align-items: center; border-radius: 12px; box-shadow: inset -2px -2px 10px rgba(0,0,0,0.1), 6px 6px 15px rgba(0,0,0,0.5); }
.diamond-container i { transform: rotate(45deg); font-size: 36px; color: rgba(255,255,255,0.9); }

/* Susunan Diamond Gradasi Biru */
.dia-1 { width: 90px; height: 90px; background: #42A5F5; top: 40px; left: 50%; margin-left: -30px; z-index: 3; } 
.dia-2 { width: 80px; height: 80px; background: #64B5F6; top: 115px; left: 50%; margin-left: -80px; z-index: 2; } 
.dia-3 { width: 85px; height: 85px; background: #90CAF9; top: 190px; left: 50%; margin-left: -35px; z-index: 1; }
.dia-4 { width: 75px; height: 75px; background: #2196F3; top: 110px; left: 50%; margin-left: 35px; z-index: 2; } 

/* Lingkaran Edukasi */
.edu-circle { position: absolute; width: 80px; height: 80px; background: #1976D2; border-radius: 50%; top: -10px; left: 50%; margin-left: -110px; display: flex; justify-content: center; align-items: center; z-index: 4; box-shadow: inset -2px -2px 10px rgba(0,0,0,0.2), 4px 4px 15px rgba(0,0,0,0.4); border: 4px solid #1E88E5; }
.edu-circle i { font-size: 34px; color: #FFC107; }

/* Bidak Melayang */
.floating-piece { position: absolute; font-size: 60px; color: #e0e0e0; filter: drop-shadow(0 15px 10px rgba(0,0,0,0.6)); z-index: 5; }
.fp-1 { top: 80px; left: 50%; margin-left: -120px; font-size: 70px; }
.fp-2 { top: -10px; left: 50%; margin-left: 50px; font-size: 60px; }
.fp-3 { top: 210px; left: 50%; margin-left: 50px; font-size: 65px; }

/* LANJUTAN STYLE LAINNYA */
.mode-selection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; width: 100%; }
.mode-card { background-color: #262421; border: 1px solid #403d39; padding: 20px; border-radius: 10px; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mode-card:hover { border-color: #1E88E5; background-color: #2b2926; }
.mode-card.primary { background: linear-gradient(135deg, #0D47A1 0%, #262421 100%); border-color: #1565C0; }
.mode-icon { font-size: 28px; color: #1E88E5; }
.mode-card h3 { font-size: 16px; font-weight: 700; }
.mode-card p { font-size: 12px; color: #bab8b6; }

.game-play-area { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 8px; }
.chess-board-active { width: 100%; border-radius: 4px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.player-hud { background: #262421; padding: 8px 12px; border-radius: 6px; display: flex; justify-content: space-between; font-weight: 600; border: 1px solid #403d39; font-size: 13px; }
.badge { color: #1E88E5; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.game-status-bar { display: flex; justify-content: space-between; align-items: center; background: #1e1c18; padding: 8px 12px; border-radius: 6px; font-weight: 600; color: #1E88E5; font-size: 13px; }
.btn-exit { background: #403d39; color: white; border: none; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 11px; }

.online-room-box { background: #262421; padding: 20px; border-radius: 10px; width: 100%; max-width: 380px; text-align: center; display: flex; flex-direction: column; gap: 12px; border: 1px solid #403d39; }
.btn-primary-solid { background: #1E88E5; color: white; border: none; padding: 10px; border-radius: 6px; font-weight: 700; cursor: pointer; width: 100%; font-size: 14px; }
.btn-grey-solid { background: #403d39; color: white; border: none; padding: 10px 16px; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 13px; width: 100%; }
.room-code-txt { font-size: 13px; color: #bab8b6; background: #1e1c18; padding: 8px; border-radius: 6px; }
.join-row { display: flex; gap: 6px; }
.btn-text-muted { background: none; border: none; color: #bab8b6; cursor: pointer; font-size: 12px; }

.chess-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 2000; backdrop-filter: blur(4px); }
.chess-modal-box { background: #262421; padding: 28px 20px; border-radius: 12px; width: 90%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; position: relative; border: 1px solid #403d39; box-shadow: 0 15px 35px rgba(0,0,0,0.6); text-align: center; }
.modal-brand { font-size: 16px; font-weight: 800; color: #ffffff; }
.modal-brand span { color: #1E88E5; }
.chess-modal-box h3 { font-size: 18px; font-weight: 700; color: #ffffff; }
.modal-subtext { font-size: 12px; color: #bab8b6; }
.chess-input { width: 100%; padding: 10px 12px; background: #1e1c18; border: 1px solid #403d39; border-radius: 6px; color: #ffffff; font-size: 13px; }
.divider { display: flex; align-items: center; text-align: center; color: #666; font-size: 11px; margin: 2px 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #403d39; }
.divider span { padding: 0 8px; }
.btn-provider { width: 100%; padding: 10px; border-radius: 6px; font-weight: 700; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; }
.btn-provider.google { background: #ffffff; color: #262421; }
.close-modal-x { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 22px; color: #bab8b6; cursor: pointer; }
.input-label { text-align: left; font-size: 11px; font-weight: 600; color: #bab8b6; margin-bottom: -6px; }
.btn-danger-outline { background: transparent; border: 1px solid #a83232; color: #a83232; padding: 8px; border-radius: 6px; font-weight: 700; cursor: pointer; width: 100%; font-size: 13px; }
.hidden { display: none !important; }

button, .mode-card, .user-pill, .menu-setting-btn, .brand-logo { pointer-events: auto !important; cursor: pointer !important; z-index: 10; position: relative; }
.chess-modal { z-index: 9999 !important; }

.highlight-tile { position: relative; }
.highlight-tile::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 25px; height: 25px; background-color: rgba(0, 0, 0, 0.2); border-radius: 50%; pointer-events: none; z-index: 5; }
.selected-square { background-color: rgba(255, 255, 0, 0.4) !important; }

/* KONTROL & DROPDOWN (Biru) */
.game-control-panel { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; width: 100%; }
.control-row-2 { display: flex; gap: 8px; width: 100%; }
.btn-ctrl { flex: 1; background-color: #262421; border: 1px solid #403d39; color: #ffffff; padding: 10px; border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.2s, border-color 0.2s; }
.btn-ctrl:hover { background-color: #2b2926; border-color: #1E88E5; }
.btn-ctrl.primary { background-color: #1E88E5; border-color: #1565C0; color: #ffffff; width: 100%; }
.btn-ctrl.primary:hover { background-color: #1976D2; }

.custom-select-wrapper { position: relative; user-select: none; width: 100%; }
.custom-select-trigger { background-color: #1e1c18; border: 1px solid #403d39; color: #ffffff; padding: 10px 12px; border-radius: 6px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.custom-select-trigger:hover { border-color: #1E88E5; }
.custom-options { position: absolute; bottom: 100%; left: 0; right: 0; background-color: #262421; border: 1px solid #403d39; border-radius: 6px; box-shadow: 0 -8px 20px rgba(0,0,0,0.6); z-index: 9999; margin-bottom: 4px; overflow-y: auto; max-height: 240px; }
.custom-option { padding: 12px 14px; font-size: 13px; color: #ffffff; cursor: pointer; border-bottom: 1px solid #312e2b; }
.custom-option:last-child { border-bottom: none; }
.custom-option:hover { background-color: #383531; color: #1E88E5; }

.music-player-panel { display: flex; align-items: center; gap: 8px; background-color: #262421; padding: 8px 10px; border-radius: 6px; border: 1px solid #403d39; margin-top: 4px; }
.btn-music { background-color: #1E88E5; color: white; border: none; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; flex-shrink: 0; }
.btn-music:hover { background-color: #1976D2; }
.mode-specific-controls.hidden { display: none !important; }

/* Tambahkan di bagian bawah file style.css */
#adminTableContainer table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; color: #fff; }
#adminTableContainer th, #adminTableContainer td { padding: 8px; border-bottom: 1px solid #403d39; }
#adminTableContainer th { color: #1E88E5; font-weight: 700; background: #1e1c18; }
#adminTableContainer tr:hover { background-color: #2b2926; }

.admin-tab-btn { background: transparent; border: none; color: #bab8b6; padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; }
.admin-tab-btn:hover { color: #ffffff; }
.admin-tab-btn.active { color: #1E88E5; border-bottom: 2px solid #1E88E5; }
.admin-panel table { width: 100%; }
.admin-mini-btn { padding: 4px 8px; font-size: 10px; border-radius: 4px; border: none; cursor: pointer; font-weight: bold; color: white; margin-right: 4px; }
#adminTableContainer table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; color: #fff; }
#adminTableContainer th, #adminTableContainer td { padding: 8px; border-bottom: 1px solid #403d39; vertical-align: middle; }
#adminTableContainer th { color: #1E88E5; font-weight: 700; background: #1e1c18; position: sticky; top: 0; z-index: 2; }
#adminTableContainer tr:hover { background-color: #2b2926; }
.admin-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid #1E88E5; }
.admin-actions-cell { display: flex; gap: 4px; }
.btn-action-sm { padding: 4px 8px; font-size: 10px; border-radius: 4px; border: none; cursor: pointer; font-weight: bold; color: white; }
.btn-reset { background-color: #f39c12; }
.btn-delete { background-color: #e74c3c; }