/* ========================================
   TURBO LOTO - STYLE.CSS (ПУРРА)
   ======================================== */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 80px;
}

/* ========================================
   LOADER
   ======================================== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-logo {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
    letter-spacing: 2px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-container {
    width: 250px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
}

/* ========================================
   GLASS EFFECT
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   HEADER (қисми боло)
   ======================================== */
.user-header-new {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #3b82f6;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.balance-amount {
    font-size: 14px;
    font-weight: 800;
    color: #10b981;
}

/* ========================================
   МЕНЮ МОБИЛӢ (қисми поён)
   ======================================== */
nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 50;
}

nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.3s ease;
}

nav a i {
    font-size: 20px;
    margin-bottom: 4px;
}

nav a span {
    font-size: 10px;
    font-weight: 500;
}

nav a.active {
    color: #3b82f6;
}

nav a.active span {
    font-weight: 700;
}

/* ========================================
   BALANCE BOX (барои саҳифаҳои дигар)
   ======================================== */
.balance-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
}

.add-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    cursor: pointer;
}

.add-btn:active {
    transform: scale(0.95);
}

/* ========================================
   TIMER
   ======================================== */
.timer-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    animation: timerPulse 2s infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   ЧАРХЗАНИ АЙЛОНӢ (барои саҳифаҳои дигар)
   ======================================== */
.wheel-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #ef4444;
    z-index: 10;
    filter: drop-shadow(0 4px 10px rgba(239, 68, 68, 0.6));
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
    background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    width: 100%;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.6);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   PLAYER CARD
   ======================================== */
.player-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(31, 41, 55, 0.5);
    border: 2px solid rgba(55, 65, 81, 0.5);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.player-card.my-card {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
}

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.player-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.player-stats i {
    margin-right: 0.25rem;
}

/* ========================================
   WINNER OVERLAY
   ======================================== */
.winner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.winner-overlay.show {
    display: flex;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.winner-modal {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: bounceIn 0.5s;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.winner-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.winner-title {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 900;
}

.winner-btn {
    background: #1f2937;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.winner-btn:hover {
    background: #374151;
    transform: translateY(-2px);
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.8);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
    .wheel-container {
        width: 300px;
        height: 300px;
    }

    #wheel-canvas {
        width: 300px;
        height: 300px;
    }

    .timer-circle {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
}

/* ========================================
   TABS (барои index.html ва дигар саҳифаҳо)
   ======================================== */
.tab-button {
    padding: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: white;
    border-bottom-color: #3b82f6;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: slideIn 0.3s ease;
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #3b82f6, #8b5cf6) 1;
}
