/* === style.css (Premium UI Made Global) === */
:root {
    --font-family: 'Roboto', sans-serif;
    --bg-color: #1a1a1a;
    --container-color: #2c2c2c;
    --text-color: #ffffff;
    --icon-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-color: #3498db;
    --bet-a-color: #e74c3c;
    --bet-b-color: #00FFFF;
    --win-color: #2ecc71;
    --lose-color: #e74c3c;
    --accent-color: #f1c40f;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: #121418;
    background-image:
        linear-gradient(rgba(241, 196, 15, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(241, 196, 15, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 50% 30%, rgba(52, 152, 219, 0.1) 0%, transparent 60%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    background-position: center center;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center; 
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === নোটিফিকেশন স্টাইল === */
#notification-container {
    position: fixed;
    top: 85px; 
    right: 20px; 
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    align-items: flex-end;
}
.notification-toast {
    background-color: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-left: 5px solid var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 250px;
    max-width: 350px;
    animation: slideInRight 0.3s ease-out forwards;
    opacity: 0;
    transform: translateX(120%);
    pointer-events: auto;
}
.notification-toast.error { border-left-color: var(--lose-color); }
.notification-toast.success { border-left-color: var(--win-color); }

@keyframes slideInRight { to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOutRight { to { opacity: 0; transform: translateX(120%); } }

/* === অথ পেজ (লগইন/রেজিস্ট্রেশন/ওয়েলকাম) === */
.auth-page-container {
    display: none; 
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at center, #2c2c2c 0%, #111 100%);
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
    background: rgba(44, 44, 44, 0.7); 
    backdrop-filter: blur(10px); 
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.auth-site-logo { margin-bottom: 20px; }
.auth-subtitle {
    color: #bbb;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-group i:not(.password-toggle) {
    position: absolute;
    left: 15px;
    z-index: 5;
    color: #666;
    width: 20px;
    height: 20px;
    transition: 0.3s;
    pointer-events: none;
}
.input-group:focus-within i:not(.password-toggle) {
    color: var(--accent-color);
}

.form-input {
    width: 100%;
    background-color: #1a1a1a;
    border: 2px solid #333;
    color: #fff;
    padding: 15px 15px 15px 45px;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    height: 50px;
}
.form-input.password-field { padding-right: 45px; }

.password-toggle {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: #666; width: 20px; height: 20px;
    transition: color 0.3s ease; z-index: 20; display: flex;
    align-items: center; justify-content: center;
}
.password-toggle:hover, .password-toggle.active { color: var(--accent-color); }

.form-input:focus {
    outline: none; border-color: var(--accent-color);
    background-color: #222; box-shadow: 0 0 10px rgba(241, 196, 15, 0.1);
}
.form-input::placeholder { color: #555; }

.form-button {
    background: linear-gradient(135deg, var(--accent-color), #d4ac0d);
    color: #000; border: none; padding: 16px; border-radius: 12px;
    font-size: 1.1rem; font-weight: 800; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; text-transform: uppercase;
    letter-spacing: 1px; margin-top: 10px; box-shadow: 0 5px 15px rgba(241, 196, 15, 0.2);
}
.form-button:hover {
    transform: translateY(-2px); box-shadow: 0 8px 20px rgba(241, 196, 15, 0.4);
}
.form-button:active { transform: translateY(0); }

.auth-footer { margin-top: 25px; font-size: 0.9rem; color: #888; }
.auth-footer a {
    color: var(--accent-color); font-weight: 700; text-decoration: none;
    margin-left: 5px; transition: 0.2s;
}
.auth-footer a:hover { text-decoration: underline; color: #fff; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === গেম কন্টেইনার === */
#game-container {
    display: flex; width: 100%; max-width: 375px; min-height: 667px;
    background-color: #121418; border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); padding: 20px;
    flex-direction: column; align-items: center; position: relative;
    overflow: hidden; border: 5px solid var(--border-color); transition: all 0.3s ease;
}

#header {
    width: 100%; display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 25px; padding: 5px;
    border-bottom: 2px solid var(--border-color); position: relative; z-index: 1000; 
}
.header-group-left { display: flex; align-items: center; gap: 10px; z-index: 21; }
.icon-button { background: none; border: none; cursor: pointer; color: var(--icon-color); }
.icon-button i { width: 24px; height: 24px; }

/* === লোগো স্টাইল === */
#site-logo {
    height: 75px; 
    width: auto;
    display: block;
    cursor: pointer;
    object-fit: contain;
    max-width: 300px;
    animation: logoGlow 2s infinite ease-in-out;
}

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 2px rgba(241, 196, 15, 0.4)); opacity: 0.85; }
    50% { filter: drop-shadow(0 0 15px rgba(241, 196, 15, 1)); opacity: 1; }
    100% { filter: drop-shadow(0 0 2px rgba(241, 196, 15, 0.4)); opacity: 0.85; }
}

/* ব্যালেন্স বক্স */
#balance-box {
    background: linear-gradient(145deg, rgba(30,30,30,0.9), rgba(15,15,15,0.9));
    padding: 5px 15px; border-radius: 25px; border: 1px solid rgba(241, 196, 15, 0.4);
    min-width: 130px; z-index: 21; cursor: pointer; display: flex;
    flex-direction: column; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.balance-top-row { width: 100%; text-align: center; margin-bottom: 2px; }
#balance-label { font-size: 0.75rem; color: #bbb; font-weight: 500; text-transform: uppercase; }
.balance-bottom-row { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.live { background-color: #2ecc71; box-shadow: 0 0 5px #2ecc71; }
.status-dot.demo { background-color: #3498db; box-shadow: 0 0 5px #3498db; }
.amount-wrapper { font-size: 1.2rem; font-weight: 700; color: var(--accent-color); }
.currency-symbol { font-size: 1rem; color: #ccc; margin-left: 2px; }
.balance-arrow { width: 16px; height: 16px; color: #999; }

/* পপ-আপ */
#account-popup {
    position: absolute; top: 75px; right: 20px; width: 260px;
    background-color: #333; border: 2px solid var(--border-color);
    border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 1001; overflow: hidden; color: var(--text-color); font-size: 0.9rem;
}
.account-item {
    padding: 12px 15px; cursor: pointer; border-bottom: 1px solid var(--border-color);
    display: flex; flex-direction: column; transition: background-color 0.2s; gap: 10px;
}
.account-item:last-child { border-bottom: none; }
.account-item:hover { background-color: #444; }
#live-account-btn { flex-direction: row; justify-content: space-between; align-items: center; }
.account-item span:first-child { font-size: 0.8rem; font-weight: 500; color: #ccc; }
.account-item span:last-child { font-size: 0.9rem; font-weight: 700; }
.account-item.active { background-color: var(--accent-color); }
.account-item.active span { color: #000; }
.demo-account-info { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.demo-edit-section { display: flex; width: 100%; gap: 5px; }
#demo-balance-input {
    flex-grow: 1; background-color: var(--bg-color); border: 1px solid var(--border-color);
    color: var(--text-color); padding: 6px 10px; border-radius: 5px; font-size: 0.9rem; width: 80px; 
}
#demo-balance-input::-webkit-outer-spin-button, #demo-balance-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#set-demo-balance-btn {
    background-color: var(--primary-color); color: #fff; border: none;
    padding: 6px 12px; border-radius: 5px; font-size: 0.9rem; cursor: pointer; font-weight: bold;
}
#set-demo-balance-btn:hover { background-color: #2980b9; }

#connection-status { font-size: 0.9rem; font-weight: 500; color: var(--lose-color); }

/* === SIDENAV STYLES === */
#sidenav {
    position: fixed; top: 0; left: -100%; width: 280px; height: 100%;
    background-color: #111; z-index: 10001; 
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px; display: flex; flex-direction: column;
}
#sidenav.open { left: 0; box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
#sidenav .close-btn { align-self: flex-end; margin-bottom: 20px; color: white; }
#sidenav a {
    color: white; text-decoration: none; font-size: 1.1rem;
    padding: 15px 10px; border-bottom: 1px solid #333; transition: background-color 0.2s;
    display: block; font-weight: 500;
}
#sidenav a:hover { background-color: #222; color: var(--accent-color); }

/* Payment Submenu Styles */
.submenu {
    display: none; 
    background-color: #1a1a1a;
    padding-left: 20px;
    border-left: 2px solid var(--accent-color);
}
.submenu a {
    font-size: 1rem;
    border-bottom: 1px solid #222;
    color: #ccc;
}
.submenu.active { display: block; }
.dropdown-icon { transition: transform 0.3s ease; width: 18px; height: 18px;}
.dropdown-icon.rotate { transform: rotate(180deg); }

/* ========================================================= */
/* === GLOBAL PREMIUM GAME CORE & UI === */
/* ========================================================= */

#game-core {
    display: flex; flex-direction: column; align-items: center;
    width: 100%; margin-top: 5px; 
    background: linear-gradient(180deg, #1e222a 0%, #101216 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 2px 0 rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 15px 20px; 
}

#join-timer-display {
    display: block; text-align: center; color: #888;
    font-size: 1rem; text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 5px; text-shadow: none; 
}
#join-timer-display > span:first-child { display: block; margin-bottom: 5px; }
#join-timer-display span#join-timer {
    color: #f1c40f; font-size: 2.2rem; font-weight: 900;
    display: inline-block; text-shadow: 0 0 15px rgba(241,196,15,0.4);
}

#spinner-container { position: relative; width: 250px; height: 250px; margin-bottom: 10px; transform: scale(1); }
#spinner-wheel {
    width: 100%; height: 100%; border-radius: 50%; position: relative; overflow: hidden;
    border: 8px solid #2a2d35;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), inset 0 10px 20px rgba(0,0,0,0.5), 0 0 0 2px #111, inset 0 0 0 2px #111;
    background: linear-gradient(90deg, rgba(231,76,60,0.1) 50%, rgba(0,210,255,0.1) 50%);
}
#spinner-wheel::before, #spinner-wheel::after { display: none; }

.wheel-label {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 3.5rem; font-weight: 800;
}
#label-a { left: 25%; color: var(--bet-a-color); text-shadow: 0 0 10px var(--bet-a-color); }
#label-b { right: 25%; color: var(--bet-b-color); text-shadow: 0 0 10px var(--bet-b-color); }

#spinner-cone {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%;
    background: conic-gradient( var(--primary-color) 0deg, var(--primary-color) 60deg, transparent 60.1deg, transparent 360deg );
    transform: rotate(150deg);
}
#spinner-indicator {
    position: absolute; width: 10px; height: 10px; background-color: var(--accent-color); 
    border-radius: 50%; left: 50%; top: 5px; transform-origin: 50% 120px; 
    transform: translateX(-50%) rotate(30deg); box-shadow: 0px 0px 5px rgba(0,0,0,0.5); z-index: 10; 
}

#bet-options { display: flex; justify-content: space-around; width: 100%; gap: 15px; margin-top: 5px; margin-bottom: 10px; }
.bet-button {
    width: 100%; height: 55px; border-radius: 40px 40px 15px 15px; font-size: 1.6rem; font-weight: 800;
    background: transparent; display: flex; justify-content: center; align-items: center;
    cursor: pointer; transition: all 0.2s ease; box-shadow: none;
}
#bet-a { border: 2px solid #e74c3c; color: #e74c3c; box-shadow: inset 0 0 10px rgba(231,76,60,0.1), 0 0 10px rgba(231,76,60,0.1); }
#bet-b { border: 2px solid #00d2ff; color: #00d2ff; box-shadow: inset 0 0 10px rgba(0,210,255,0.1), 0 0 10px rgba(0,210,255,0.1); }
.bet-button:hover:not(:disabled) { transform: scale(1.03); }

#bet-a.selected { background: rgba(231,76,60,0.15); box-shadow: inset 0 0 15px rgba(231,76,60,0.5), 0 0 15px rgba(231,76,60,0.4); transform: scale(1.03); }
#bet-b.selected { background: rgba(0,210,255,0.15); box-shadow: inset 0 0 15px rgba(0,210,255,0.5), 0 0 15px rgba(0,210,255,0.4); transform: scale(1.03); }
.bet-button:disabled { opacity: 0.5; cursor: not-allowed; transform: scale(1); }

/* BET INPUT BOX (DARK SLEEK) - UPDATED TO BE SHORTER */
#bet-input-container {
    display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 5px; width: fit-content; margin-left: auto; margin-right: auto;
    border-radius: 6px; background: #0a0b0e; border: 1px solid #222; padding: 8px 30px; box-shadow: inset 0 4px 10px rgba(0,0,0,0.8);
}
#custom-bet-amount { background: transparent; border: none; color: #f1c40f; font-size: 1.3rem; font-weight: bold; width: 100px; text-align: center; outline: none; text-shadow: 0 0 5px rgba(241,196,15,0.4); }
.currency-label { color: #f1c40f; font-weight: bold; font-size: 1.2rem; }

@keyframes goldenBlink {
    0% { box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4), inset 0 2px 2px rgba(255,255,255,0.4), 0 5px 0 #7d6608; filter: brightness(1); transform: scale(1); }
    50% { box-shadow: 0 5px 30px rgba(241, 196, 15, 0.9), inset 0 2px 8px rgba(255,255,255,0.8), 0 5px 0 #7d6608; filter: brightness(1.15); transform: scale(1.02); }
    100% { box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4), inset 0 2px 2px rgba(255,255,255,0.4), 0 5px 0 #7d6608; filter: brightness(1); transform: scale(1); }
}

#join-button {
    border-radius: 12px;
    background: linear-gradient(180deg, #ffe066 0%, #f1c40f 45%, #b7950b 100%);
    border: 1px solid #ffeb99; border-bottom: none; color: #111; font-weight: 900;
    text-transform: uppercase; letter-spacing: 1px; padding: 12px 40px; margin-top: 15px;
    width: 100%; max-width: 400px; cursor: pointer; text-shadow: 0 1px 1px rgba(255,255,255,0.6);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4), inset 0 2px 2px rgba(255,255,255,0.4), 0 5px 0 #7d6608;
    animation: goldenBlink 1.5s infinite ease-in-out; transition: transform 0.1s, box-shadow 0.1s;
}
#join-button:active:not(:disabled) { transform: translateY(4px) scale(0.98); box-shadow: 0 1px 5px rgba(0,0,0,0.6), inset 0 2px 5px rgba(0,0,0,0.4), 0 1px 0 #7d6608; }
#join-button:disabled { background: #333; border: 1px solid #222; color: #666; box-shadow: none; text-shadow: none; animation: none; }

/* === PROFILE & HISTORY MERGED STYLE === */
#profile-page { flex-direction: column; align-items: center; width: 100%; overflow-y: hidden; }
.profile-info-card { background: #2c2c2c; padding: 20px; border-radius: 15px; width: 90%; max-width: 600px; text-align: center; border: 1px solid #444; margin-bottom: 20px; flex-shrink: 0; }
.history-section-title { width: 90%; max-width: 700px; color: #f1c40f; margin-bottom: 10px; font-size: 1.2rem; font-weight: bold; text-align: left; }
.history-table-container { width: 95%; max-width: 700px; overflow-y: auto; overflow-x: auto; max-height: 50vh; background-color: #222; border-radius: 10px; border: 1px solid #444; }
#history-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
#history-table th, #history-table td { border: 1px solid #444; padding: 10px; text-align: center; color: #ccc; white-space: nowrap; }
#history-table th { color: #000; background-color: #f1c40f; font-weight: bold; position: sticky; top: 0; }
.status-Win { color: #2ecc71 !important; font-weight: bold; }
.status-loss { color: #e74c3c !important; font-weight: bold; }
.status-Pending { color: #f39c12 !important; }

@media only screen and (min-width: 769px) {
    .history-table-container { max-width: 98% !important; width: 98% !important; }
    .history-section-title { max-width: 98% !important; width: 98% !important; }
}

#result-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: center;
    align-items: center; font-size: 4rem; font-weight: 700; opacity: 0;
    visibility: hidden; transition: all 0.5s ease; z-index: 90;
}
#result-overlay.show { opacity: 1; visibility: visible; }
#result-overlay.win { color: var(--win-color); }
#result-overlay.lose { color: var(--lose-color); }
#result-overlay.draw { color: var(--text-color); }

/* ওয়ালেট / লিডারবোর্ড / সেটিংস */
.wallet-page { width: 100%; display: flex; flex-direction: column; align-items: center; padding: 10px; color: var(--text-color); }
.wallet-page h2 { color: var(--accent-color); margin-bottom: 20px; font-size: 2rem; }
.wallet-form { display: flex; flex-direction: column; width: 100%; gap: 15px; }
.wallet-form input, .wallet-form select { background-color: var(--bg-color); border: 2px solid var(--border-color); color: var(--text-color); padding: 12px; border-radius: 8px; font-size: 1rem; font-family: var(--font-family); }
.wallet-form button { background-color: var(--accent-color); color: #000; border: none; padding: 15px; border-radius: 8px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: background-color 0.2s; }
.wallet-form button:hover { background-color: var(--win-color); }
.close-wallet-btn { position: absolute; top: 25px; right: 25px; }
.wallet-page[style*="display: flex"] ~ #result-overlay { display: none !important; visibility: hidden !important; }

/* লিডারবোর্ড টেবিল */
#leaderboard-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
#leaderboard-table th, #leaderboard-table td { border: 1px solid var(--border-color); padding: 10px; text-align: left; }
#leaderboard-table th { background-color: #333; color: var(--accent-color); }
#leaderboard-table tr:nth-child(even) { background-color: var(--border-color); }
#leaderboard-table td:first-child { font-weight: bold; color: var(--accent-color); text-align: center; }

/* সেটিংস */
.settings-section { width: 100%; background-color: var(--border-color); padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.settings-section label { display: block; margin-bottom: 10px; color: var(--accent-color); font-weight: 500; font-size: 1.1rem; }
#settings-language-selector { width: 100%; }

/* === NEW: AGENT LIST STYLES === */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; width: 100%; }
.agent-card { background: #2c2c2c; border: 1px solid #444; border-radius: 10px; padding: 15px; text-align: center; cursor: pointer; transition: 0.2s; position: relative; overflow: hidden; }
.agent-card.online { border-color: rgba(46, 204, 113, 0.4); } 
.agent-card.online:hover { border-color: var(--accent-color); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(241, 196, 15, 0.2); }
.agent-card.selected { border-color: #2ecc71; background: rgba(46, 204, 113, 0.1); }
.agent-card.offline { opacity: 0.5; cursor: not-allowed; border-color: #333 !important; transform: none !important; box-shadow: none !important; }
.agent-card.offline:hover { border-color: #333 !important; transform: none !important; }
.agent-avatar { width: 50px; height: 50px; background: #333; border-radius: 50%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--accent-color); }
.agent-name { font-weight: bold; font-size: 1rem; color: #fff; margin-bottom: 5px; }
.agent-code { font-size: 0.8rem; color: #777; margin-bottom: 5px; }
.agent-select-btn { background: var(--accent-color); color: #000; border: none; padding: 5px 10px; border-radius: 5px; font-weight: bold; margin-top: 5px; font-size: 0.8rem; width: 100%; cursor: pointer; }
.agent-select-btn:disabled { background: #555; color: #888; cursor: not-allowed; }

#deposit-input-area, #withdraw-input-area { display: none; animation: fadeIn 0.3s ease; width: 100%; }
.back-to-agents-btn { background: transparent; border: none; color: #aaa; cursor: pointer; margin-bottom: 15px; display: flex; align-items: center; gap: 5px; font-size: 0.9rem; padding: 0; }
.back-to-agents-btn:hover { color: #fff; }

.agent-search-container { width: 100%; margin-bottom: 15px; }
.agent-search-box { width: 100%; padding: 12px 15px; border-radius: 8px; border: 1px solid #444; background-color: #222; color: #fff; font-size: 15px; outline: none; transition: border-color 0.3s ease; }
.agent-search-box:focus { border-color: var(--accent-color); box-shadow: 0 0 5px rgba(241, 196, 15, 0.5); }
.agent-search-box::placeholder { color: #aaa; }

.agent-info-icon { position: absolute; top: 10px; right: 10px; width: 18px !important; height: 18px !important; color: #3498db; cursor: pointer; z-index: 10; transition: color 0.3s, transform 0.3s; }
.agent-info-icon:hover { color: #f1c40f; transform: scale(1.1); }
#hover-agent-tooltip { display: none; position: absolute; background: rgba(30, 30, 30, 0.95); color: #fff; padding: 10px 15px; border-radius: 8px; border: 1px solid #3498db; box-shadow: 0 5px 15px rgba(0,0,0,0.5); z-index: 10005; font-size: 0.9rem; pointer-events: none; white-space: nowrap; backdrop-filter: blur(5px); }

/* === PC LAYOUT OVERRIDES === */
@media screen and (min-width: 900px) {
    body { padding: 0; align-items: flex-start; }
    
    /* On PC, game container should be transparent so body circuit background shows through */
    #game-container { max-width: 100%; min-height: 100vh; background-color: transparent !important; background-image: none !important; border: none; box-shadow: none; border-radius: 0; padding: 0; }
    
    #header { background-color: transparent !important; padding: 15px 40px; border-bottom: 1px solid var(--border-color); margin-bottom: 0; }
    #site-name { position: absolute; left: 50%; transform: translateX(-50%); }
    #connection-status { position: absolute; top: 25px; left: 100px; }
    #account-popup { top: 65px; right: 40px; }
    
    /* Box size and margin adjustment to pull everything up on PC */
    #game-core { width: 100%; max-width: 500px; margin: 10px auto 0 auto; background: linear-gradient(180deg, #1e222a 0%, #101216 100%); padding: 20px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 2px 0 rgba(255,255,255,0.05); }
    
    #spinner-container { width: 300px; height: 300px; }
    .wheel-label { font-size: 4rem; }
    
    /* Updated Code specifically for PC A and B button distance */
    #bet-options { 
        width: 100%; 
        max-width: 400px; 
        gap: 80px !important; 
        justify-content: center !important; 
        display: flex !important; 
    }
    
    /* PC Bet Buttons - adjusted size to fit perfectly */
    .bet-button { width: 100px; height: 80px; font-size: 2.5rem; border-radius: 40px 40px 15px 15px; }
    #join-button { width: 100%; max-width: 350px; padding: 15px; }
    #sidenav { width: 300px; }
    #spinner-indicator { transform-origin: 50% 150px; transform: translateX(-50%) rotate(30deg); }
}

/* === PREMIUM SOUND TOGGLE SWITCH === */
.premium-switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.premium-switch input { opacity: 0; width: 0; height: 0; }
.premium-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #555; transition: .4s; border-radius: 34px; border: 2px solid #444; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); }
.premium-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 2px; bottom: 2px; background-color: #aaa; transition: .4s; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
input:checked + .premium-slider { background-color: rgba(241, 196, 15, 0.2); border-color: var(--accent-color); }
input:checked + .premium-slider:before { transform: translateX(24px); background: linear-gradient(135deg, var(--accent-color), #d4ac0d); box-shadow: 0 0 10px rgba(241, 196, 15, 0.8); }

/* ========================================================= */
/* === PREMIUM LIGHT MODE VIEW SPECIFIC OVERRIDES === */
/* ========================================================= */

[data-theme="light"] {
    --bg-color: #f4f6f9;
    --container-color: #ffffff;
    --text-color: #1e293b;
    --icon-color: #334155;
    --border-color: rgba(0, 0, 0, 0.08);
    --primary-color: #2980b9;
    --accent-color: #d35400; /* Darker accent for better readability */
}

/* Global Background */
[data-theme="light"] body {
    background-color: #f4f6f9;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 50% 30%, rgba(41, 128, 185, 0.05) 0%, transparent 70%);
}

/* 
Targeting inputs ONLY inside the wallet/game interface. 
Ignoring Auth Pages (Login/Register/Welcome) so they remain dark!
*/
[data-theme="light"] .wallet-page input, 
[data-theme="light"] .wallet-page select,
[data-theme="light"] #account-popup input {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .wallet-page input:focus, 
[data-theme="light"] .wallet-page select:focus,
[data-theme="light"] #account-popup input:focus {
    border-color: var(--primary-color) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1) !important;
}

[data-theme="light"] .wallet-page input::placeholder { color: #94a3b8 !important; }

/* Main Game Interface */
[data-theme="light"] #game-container { background-color: #f4f6f9; border-color: #e2e8f0; }
[data-theme="light"] #game-core { background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
[data-theme="light"] #spinner-wheel { border: 8px solid #f1f5f9 !important; background: linear-gradient(90deg, rgba(231,76,60,0.1) 50%, rgba(0,210,255,0.1) 50%) !important; box-shadow: 0 10px 20px rgba(0,0,0,0.05), inset 0 5px 10px rgba(0,0,0,0.05) !important; }
[data-theme="light"] #spinner-indicator { border-top-color: #1e293b !important; background-color: #1e293b !important; }
[data-theme="light"] #join-timer-display { color: #64748b !important; }
[data-theme="light"] #join-timer-display span#join-timer { color: #d35400 !important; text-shadow: none !important; }

/* Bet Buttons & Inputs */
[data-theme="light"] #bet-input-container { background: #f8fafc !important; border: 1px solid #cbd5e1 !important; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05) !important; }
[data-theme="light"] #custom-bet-amount { color: #d35400 !important; text-shadow: none !important; }
[data-theme="light"] .currency-label { color: #d35400 !important; }

[data-theme="light"] #bet-a { background: #ffffff !important; border: 2px solid #e74c3c !important; color: #e74c3c !important; box-shadow: 0 4px 6px rgba(231,76,60,0.1) !important; }
[data-theme="light"] #bet-b { background: #ffffff !important; border: 2px solid #00d2ff !important; color: #0088aa !important; box-shadow: 0 4px 6px rgba(0,210,255,0.1) !important; }
[data-theme="light"] #bet-a.selected { background: #e74c3c !important; color: #ffffff !important; box-shadow: 0 6px 12px rgba(231,76,60,0.3) !important; }
[data-theme="light"] #bet-b.selected { background: #00d2ff !important; color: #ffffff !important; box-shadow: 0 6px 12px rgba(0,210,255,0.3) !important; }
[data-theme="light"] #join-button:disabled { background: #e2e8f0 !important; border-color: #cbd5e1 !important; color: #94a3b8 !important; box-shadow: none !important; }

/* Header & Balance Box */
[data-theme="light"] #header { background-color: transparent !important; border-bottom: 1px solid rgba(0,0,0,0.1); }
[data-theme="light"] .icon-button { color: #333; }
[data-theme="light"] #balance-box { background: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important; }
[data-theme="light"] #balance-label { color: #64748b !important; }
[data-theme="light"] #balance-amount { color: #d35400 !important; }
[data-theme="light"] .currency-symbol { color: #d35400 !important; }
[data-theme="light"] .balance-arrow { color: #64748b !important; }

/* SideNav & Account Popup */
[data-theme="light"] #sidenav { background-color: #ffffff !important; border-right: 1px solid #e2e8f0 !important; }
[data-theme="light"] #sidenav a { color: #1e293b !important; border-bottom: 1px solid #f1f5f9 !important; }
[data-theme="light"] #sidenav a:hover { background-color: #f8fafc !important; color: var(--primary-color) !important; }
[data-theme="light"] #sidenav .close-btn { color: #1e293b !important; }
[data-theme="light"] .submenu { background-color: #f8fafc !important; border-left: 2px solid var(--primary-color) !important; }
[data-theme="light"] .submenu a { color: #475569 !important; border-bottom: 1px solid #e2e8f0 !important; }

[data-theme="light"] #account-popup { background-color: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important; }
[data-theme="light"] .account-item { border-bottom: 1px solid #f1f5f9 !important; color: #1e293b !important; }
[data-theme="light"] .account-item span:first-child { color: #64748b !important; }
[data-theme="light"] .account-item:hover { background-color: #f8fafc !important; }
[data-theme="light"] .account-item.active { background-color: #f1f5f9 !important; }
[data-theme="light"] .account-item.active span { color: #d35400 !important; }

/* Profile, History & Other Pages */
[data-theme="light"] .profile-info-card { background: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important; }
[data-theme="light"] .profile-info-card p { color: #475569 !important; }
[data-theme="light"] .profile-info-card span { color: #1e293b !important; }
[data-theme="light"] .profile-info-card div[style*="background: rgba(0,0,0,0.2)"] { background: #f8fafc !important; border: 1px dashed #cbd5e1 !important; }

[data-theme="light"] .history-table-container { background-color: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important; }
[data-theme="light"] #history-table th { background-color: #f1f5f9 !important; color: #1e293b !important; border: 1px solid #e2e8f0 !important; }
[data-theme="light"] #history-table td { border: 1px solid #e2e8f0 !important; color: #334155 !important; }

[data-theme="light"] .wallet-page h2 { color: #d35400 !important; }
[data-theme="light"] .settings-section { background-color: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important; }
[data-theme="light"] .settings-section label { color: #1e293b !important; }

/* Agent System */
[data-theme="light"] .agent-card { background: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important; }
[data-theme="light"] .agent-card.online { border-color: #2ecc71 !important; }
[data-theme="light"] .agent-card.offline { border-color: #cbd5e1 !important; }
[data-theme="light"] .agent-name { color: #1e293b !important; }
[data-theme="light"] .agent-code { color: #64748b !important; }
[data-theme="light"] .agent-avatar { background: #f1f5f9 !important; color: var(--primary-color) !important; }
[data-theme="light"] .agent-search-box { background-color: #ffffff !important; border: 1px solid #cbd5e1 !important; color: #1e293b !important; }
[data-theme="light"] .agent-search-box:focus { border-color: var(--primary-color) !important; box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1) !important; }
[data-theme="light"] .agent-search-box::placeholder { color: #94a3b8 !important; }
[data-theme="light"] .back-to-agents-btn { color: #475569 !important; }
[data-theme="light"] .back-to-agents-btn:hover { color: #1e293b !important; }
[data-theme="light"] #dep-agent-name, [data-theme="light"] #wd-agent-name { color: #1e293b !important; }
[data-theme="light"] #dep-dynamic-instruction b { color: #1e293b !important; }

[data-theme="light"] .premium-slider { background-color: #cbd5e1; }
[data-theme="light"] .premium-slider:before { background-color: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }

[data-theme="light"] .hotline-container p { color: #475569 !important; }

/* === MOBILE ONLY OVERRIDES FOR LIGHT MODE === */
@media only screen and (max-width: 768px) {
    [data-theme="light"] #balance-box { background: #ffffff !important; border: 1px solid #e2e8f0 !important; }
    [data-theme="light"] #balance-amount { color: #d35400 !important; }
    [data-theme="light"] #balance-label { color: #64748b !important; }
    
    [data-theme="light"] #history-table tr { background: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important; }
    [data-theme="light"] #history-table td { border-bottom: 1px dashed #e2e8f0 !important; color: #1e293b !important; }
    [data-theme="light"] #history-table td::before { color: #64748b !important; }
    [data-theme="light"] #history-table td:first-child { color: #d35400 !important; border-bottom: 2px solid #e2e8f0 !important; }
    [data-theme="light"] #history-table td:first-child::before { content: none !important; }
    
    [data-theme="light"] #header { background: transparent !important; }
    [data-theme="light"] .balance-arrow { display: none !important; }
}

/* === NEW: Scroll Down Icon for Deposit Terms (Mobile Only) === */
#scroll-down-indicator {
    display: none; /* Hidden by default on PC */
}

@media only screen and (max-width: 768px) {
    #scroll-down-indicator {
        display: flex;
        position: absolute;
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background-color: var(--accent-color);
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        z-index: 10005;
        animation: bounce 2s infinite;
    }

    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
        40% { transform: translateY(-10px); }
        60% { transform: translateY(-5px); }
    }
}