
/* =========================================
   1. ROOT VARIABLES & RESET
   ========================================= */
:root {
    --gold: #F5C300;       /* DX WIN Yellow/Gold */
    --gold-dark: #D4A800;
    --dark-bg: #0E0E0E;    /* Main Background */
    --card-bg: #1B1F2A;    /* Box Background */
    --input-bg: #2B3244;
    --text-white: #FFFFFF;
    --text-gray: #98A7B5;
    --green: #28C76F;      /* Win/Success */
    --red: #EA5455;        /* Loss/Danger */
    --violet: #9F44D3;     /* Number 0/5 color */
    --border: #2D3646;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    -webkit-tap-highlight-color: transparent; /* মোবাইলে টাচ এফেক্ট রিমুভ */
}

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    font-size: 14px;
    line-height: 1.5;
    padding-bottom: 80px; /* নিচের মেনুর জন্য জায়গা */
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; transition: all 0.3s; }
input:focus { outline: 1px solid var(--gold); }

/* =========================================
   2. AUTHENTICATION (Login/Register Style)
   ========================================= */
.auth-container {
    min-height: 100vh;
    padding: 30px 20px;
    background: url('assets/bg.png') no-repeat center center/cover;
    background-color: var(--dark-bg);
    display: flex;
    flex-direction: column;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 50px;
}
.auth-header h2 { font-size: 24px; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.auth-header p { color: var(--text-gray); font-size: 12px; }

.auth-box {
    background: rgba(27, 31, 42, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
}

.auth-tabs {
    display: flex;
    background: #141822;
    padding: 5px;
    border-radius: 50px;
    margin-bottom: 25px;
}
.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    border-radius: 50px;
    font-weight: 600;
}
.tab-btn.active {
    background: var(--gold);
    color: #000;
    box-shadow: 0 4px 15px rgba(245, 195, 0, 0.4);
}

.input-group {
    position: relative;
    margin-bottom: 20px;
    background: var(--input-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 5px 15px;
    border: 1px solid transparent;
}
.input-group:focus-within { border-color: var(--gold); }
.input-group i { color: var(--gold); font-size: 18px; width: 30px; }
.input-group input {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(180deg, #F5C300 0%, #D4A800 100%);
    border: none;
    border-radius: 50px;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(245, 195, 0, 0.3);
}
.submit-btn:active { transform: scale(0.98); }

/* =========================================
   3. MAIN HEADER & HOME
   ========================================= */
.top-header {
    background: var(--card-bg);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 35px; height: 35px; border-radius: 50%; border: 2px solid var(--gold); }
.username { font-weight: bold; color: var(--gold); font-size: 14px; }
.balance-display {
    background: #000;
    padding: 5px 12px;
    border-radius: 20px;
    color: var(--gold);
    font-weight: bold;
    border: 1px solid var(--gold);
    font-size: 13px;
}

.notice-bar {
    background: #FFF8E1;
    color: #333;
    font-size: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
}
.notice-bar i { color: #FFA000; margin-right: 10px; animation: pulse 2s infinite; }

.banner-slider { margin: 15px; border-radius: 15px; overflow: hidden; }
.banner-slider img { width: 100%; display: block; }

.game-categories {
    display: flex;
    justify-content: space-around;
    padding: 10px 15px;
    background: var(--card-bg);
    margin-bottom: 15px;
}
.cat-btn {
    background: transparent;
    color: var(--text-gray);
    border: none;
    font-weight: bold;
    font-size: 13px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}
.cat-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.game-grid {
    padding: 0 15px;
    display: grid;
    gap: 15px;
}
.game-card {
    background: linear-gradient(135deg, #1B1F2A 0%, #2B3244 100%);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
}
.game-card::before {
    content: ''; position: absolute; right: -20px; top: -20px;
    width: 80px; height: 80px; background: var(--gold);
    opacity: 0.1; border-radius: 50%;
}
.game-card img { width: 60px; height: 60px; z-index: 2; }
.game-title { margin-left: 15px; font-size: 18px; font-weight: bold; color: #fff; z-index: 2; }
.play-btn {
    margin-left: auto;
    background: var(--gold);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

/* =========================================
   4. GAME INTERFACE (WinGo) - The Main Part
   ========================================= */
.game-nav {
    padding: 15px;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
}

/* Timer Section */
.timer-box {
    background: url('assets/timer_bg.png') no-repeat center/cover;
    background-color: #1B1F2A;
    margin: 15px;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.period-info p, .countdown-info p { font-size: 12px; color: var(--text-gray); margin-bottom: 5px; }
#period-number { font-size: 20px; font-weight: bold; color: #fff; }
#countdown-timer { 
    font-size: 28px; 
    font-weight: bold; 
    color: var(--gold); 
    font-family: monospace; 
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

/* Betting Colors */
.bet-colors { 
    display: flex; 
    gap: 15px; 
    padding: 0 15px; 
    margin-bottom: 20px; 
}
.bet-colors button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.bet-colors button:active { transform: translateY(2px); box-shadow: none; }
.btn-green { background: var(--green); }
.btn-violet { background: var(--violet); }
.btn-red { background: var(--red); }

/* Number Grid */
.bet-numbers {
    background: var(--card-bg);
    padding: 20px 15px;
    margin: 0 15px 20px;
    border-radius: 15px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}
.bet-numbers button {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background: #333; /* Fallback */
    background-size: cover;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}
/* Specific Colors for Numbers */
.num-0 { background: linear-gradient(135deg, var(--red) 50%, var(--violet) 50%); }
.num-5 { background: linear-gradient(135deg, var(--green) 50%, var(--violet) 50%); }
.num-1, .num-3, .num-7, .num-9 { background: var(--green); }
.num-2, .num-4, .num-6, .num-8 { background: var(--red); }

/* Big/Small Buttons */
.bet-sizes { 
    display: flex; 
    gap: 15px; 
    padding: 0 15px; 
    margin-bottom: 25px; 
}
.btn-big { background: #FF9800; flex: 1; padding: 12px; border-radius: 25px; border: none; color: #fff; font-weight: bold; font-size: 16px; }
.btn-small { background: #607D8B; flex: 1; padding: 12px; border-radius: 25px; border: none; color: #fff; font-weight: bold; font-size: 16px; }

/* History Table */
.history-table {
    margin: 0 15px 80px;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 10px;
}
.history-table h4 { padding: 10px; border-bottom: 1px solid #333; margin-bottom: 10px; }
.history-table table { width: 100%; border-collapse: collapse; text-align: center; }
.history-table th { color: var(--text-gray); font-size: 12px; padding-bottom: 10px; }
.history-table td { padding: 10px 5px; font-size: 13px; border-top: 1px solid #2D3646; }

/* Result Circles in History */
.result-circle {
    width: 15px; height: 15px; border-radius: 50%; display: inline-block;
}
.bg-green { background: var(--green); }
.bg-red { background: var(--red); }
.bg-violet { background: var(--violet); }

/* =========================================
   5. BOTTOM NAVIGATION
   ========================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #1B1F2A;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    z-index: 999;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-gray);
    font-size: 10px;
    transition: 0.3s;
}
.nav-item i { font-size: 20px; margin-bottom: 5px; }
.nav-item.active { color: var(--gold); }

/* Promotion Center Button */
.promotion-btn { position: relative; }
.promo-icon {
    position: absolute;
    top: -30px;
    width: 55px; height: 55px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 24px;
    border: 5px solid var(--dark-bg);
    box-shadow: 0 -5px 10px rgba(0,0,0,0.3);
}

/* =========================================
   6. MODAL (Popup) STYLES
   ========================================= */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none; /* JS will toggle */
    align-items: flex-end; /* Slide from bottom */
    z-index: 2000;
    backdrop-filter: blur(3px);
}
.modal-content {
    background: #2B3244;
    width: 100%;
    padding: 25px 20px;
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.3s ease-out;
    border-top: 4px solid var(--gold);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal h3 { margin-bottom: 20px; color: #fff; }
.amount-input label { display: block; color: var(--text-gray); margin-bottom: 10px; }
.input-wrapper { background: #141822; padding: 10px; border-radius: 10px; margin-bottom: 15px; }
.input-wrapper input { background: transparent; border: none; font-size: 24px; font-weight: bold; color: var(--gold); width: 100%; }

.quick-amounts { display: flex; gap: 10px; margin-bottom: 25px; }
.quick-amounts button {
    flex: 1;
    background: #1B1F2A;
    border: 1px solid #333;
    color: var(--text-gray);
    padding: 8px;
    border-radius: 5px;
}
.quick-amounts button:hover { border-color: var(--gold); color: var(--gold); }

.modal-actions { display: flex; gap: 15px; }
.modal-actions button {
    flex: 1; padding: 15px; border-radius: 50px; border: none; font-weight: bold; font-size: 16px;
}
.modal-actions button:first-child { background: #333; color: #fff; }
.modal-actions .confirm-btn { background: var(--gold); color: #000; }

/* =========================================
   7. WALLET & PROFILE
   ========================================= */
#page-wallet .wallet-card {
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
    color: #000;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
}
#page-wallet h1 { font-size: 36px; margin: 10px 0 20px; }
.wallet-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.w-btn {
    padding: 15px; border-radius: 50px; border: none; font-weight: bold;
    background: #fff; color: #000; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.profile-menu { background: var(--card-bg); border-radius: 15px; overflow: hidden; }
.profile-menu li {
    padding: 15px 20px;
    border-bottom: 1px solid #2D3646;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
}
.profile-menu li:last-child { border-bottom: none; }
.profile-menu i { width: 25px; text-align: center; color: var(--gold); }

/* Animation Pulse */
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }