/* ========================================
   IPL Betting Platform - Main Stylesheet
   Modern, Professional, Responsive
   ======================================== */

:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #ffedd5;
    --secondary: #3b82f6;
    --secondary-dark: #2563eb;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #8b5cf6;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fb 0%, #eef2f6 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== TYPOGRAPHY ========== */
h1 { font-size: 1.8rem; font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

/* ========== STICKY HEADER ========== */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: var(--shadow);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text small {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gray);
    display: block;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--light);
    padding: 6px 16px 6px 12px;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.user-menu:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
}

.user-balance {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 10px 16px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-top: 1px solid var(--border);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 40px;
    color: var(--gray);
    background: transparent;
    border: none;
    font-family: inherit;
}

.nav-item:hover {
    transform: translateY(-2px);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

.nav-icon {
    font-size: 22px;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
}

/* ========== MAIN CONTAINER ========== */
.main-container {
    margin-top: 80px;
    margin-bottom: 80px;
    padding: 16px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== CARDS ========== */
.card {
    background: white;
    border-radius: 28px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

/* ========== BUTTONS ========== */
.btn {
    padding: 12px 24px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

/* ========== INPUTS ========== */
input, select, textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 60px;
    border: 2px solid var(--border);
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
    background: white;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* ========== MATCH CARDS ========== */
.match-card {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    border-radius: 28px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
}

.match-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    margin-bottom: 16px;
}

.teams-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.team-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.team-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.team-card.selected {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.2);
}

.team-name {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.bet-stats {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ========== AMOUNT TABS ========== */
.amount-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.amount-option {
    flex: 1;
    min-width: 70px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 8px;
    border-radius: 60px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.amount-option:hover {
    background: rgba(255, 255, 255, 0.25);
}

.amount-option.selected-amount {
    background: var(--primary);
    color: white;
}

/* ========== BET HISTORY CARDS ========== */
.bet-card {
    background: var(--light);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
}

.bet-card.win {
    border-left-color: var(--success);
    background: #f0fdf4;
}

.bet-card.loss {
    border-left-color: var(--danger);
    background: #fef2f2;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 60px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-win {
    background: var(--success);
    color: white;
}

.status-loss {
    background: var(--danger);
    color: white;
}

.status-pending {
    background: var(--warning);
    color: white;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 24px;
    padding: 16px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    border-radius: 32px;
    padding: 40px 24px;
    text-align: center;
    color: white;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 24px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* ========== LOADER ========== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    background: white;
    padding: 30px;
    border-radius: 50px;
    text-align: center;
}

.loader-animation {
    font-size: 3rem;
    animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-15px); }
}

/* ========== MODAL/POPUP ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 32px;
    padding: 24px;
    max-width: 90%;
    width: 360px;
    text-align: center;
}

/* ========== REFRESH BUTTON ========== */
.refresh-btn {
    background: var(--info);
    color: white;
    padding: 12px;
    border-radius: 60px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .main-container {
        padding: 12px;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .stats-grid {
        gap: 12px;
    }
    
    .nav-item {
        padding: 6px 10px;
    }
    
    .nav-label {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .teams-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .amount-tabs {
        gap: 8px;
    }
    
    .amount-option {
        min-width: 55px;
        padding: 8px 4px;
        font-size: 12px;
    }
}



.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


