* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.15), transparent 70%),
                radial-gradient(circle at 80% 80%, rgba(185, 28, 28, 0.1), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #2a2a2a;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader p {
    margin-top: 20px;
    color: #dc2626;
    font-weight: 600;
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.glass-card {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 32px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 0 25px 45px rgba(0,0,0,0.5), 0 0 20px rgba(220,38,38,0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    transition: transform 0.3s;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container i {
    font-size: 48px;
    color: #dc2626;
    margin-bottom: 10px;
}

.logo-container h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-container h1 span {
    color: #dc2626;
}

.badge-accuracy {
    display: inline-block;
    background: #dc2626;
    padding: 5px 12px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 12px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.auth-tab {
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    color: #dc2626;
    border-bottom: 2px solid #dc2626;
}

.auth-form {
    display: none;
    animation: fadeIn 0.3s;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px);}
    to { opacity: 1; transform: translateY(0);}
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc2626;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: rgba(0,0,0,0.5);
    border: 1px solid #333;
    border-radius: 40px;
    color: white;
    font-size: 16px;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 8px rgba(220,38,38,0.3);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: none;
    border-radius: 40px;
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220,38,38,0.4);
}

.auth-switch-msg {
    text-align: center;
    margin-top: 20px;
    color: #aaa;
    font-size: 14px;
}

.auth-switch-msg span {
    color: #dc2626;
    cursor: pointer;
    font-weight: 600;
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    padding: 20px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10,10,10,0.8);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 60px;
    margin-bottom: 30px;
    border: 1px solid rgba(220,38,38,0.2);
    flex-wrap: wrap;
    gap: 15px;
}

.logo-nav i, .logo-nav h2 {
    display: inline-block;
    vertical-align: middle;
}

.logo-nav h2 span {
    color: #dc2626;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.logout-btn {
    background: rgba(220,38,38,0.2);
    border: 1px solid #dc2626;
    padding: 8px 18px;
    border-radius: 40px;
    cursor: pointer;
    color: white;
    transition: 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(15,15,15,0.7);
    backdrop-filter: blur(8px);
    border-radius: 28px;
    padding: 25px;
    border: 1px solid rgba(220,38,38,0.2);
    transition: all 0.3s;
}

.pulse-glow {
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(220,38,38,0.3); border-color: rgba(220,38,38,0.3);}
    70% { box-shadow: 0 0 0 8px rgba(220,38,38,0); border-color: rgba(220,38,38,0.6);}
    100% { box-shadow: 0 0 0 0 rgba(220,38,38,0);}
}

.big-number {
    font-size: 64px;
    font-weight: 800;
    margin: 15px 0;
    color: #dc2626;
}

.big-number span {
    font-size: 32px;
}

.progress-bar {
    height: 8px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    width: 0%;
}

.live-badge {
    background: #dc2626;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
}

.blinking-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    margin-left: 8px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-results {
    margin: 15px 0;
}

.result-item {
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
    font-weight: 500;
}

.multiplier {
    color: #fbbf24;
    font-weight: 700;
}

.live-update-timer {
    font-size: 12px;
    color: #aaa;
    margin-top: 12px;
}

/* Prediction Panel */
.prediction-panel {
    background: rgba(10,10,10,0.6);
    border-radius: 32px;
    padding: 30px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(220,38,38,0.2);
}

.bookmaker-selector {
    margin-bottom: 25px;
}

.bookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.bookie-btn {
    background: #1f1f1f;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    color: #ddd;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}

.bookie-btn.active, .bookie-btn:hover {
    background: #dc2626;
    color: white;
}

.predict-btn {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    width: 100%;
    padding: 16px;
    font-size: 20px;
    font-weight: 800;
    border: none;
    border-radius: 60px;
    color: white;
    cursor: pointer;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.predict-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(220,38,38,0.5);
}

/* Modal */
.modal-overlay {
    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: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-card {
    background: #121212;
    max-width: 450px;
    width: 90%;
    border-radius: 28px;
    border: 1px solid #dc2626;
    overflow: hidden;
}

.modal-header {
    background: #dc2626;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 28px;
}

.license-info {
    background: #1e1e1e;
    padding: 14px;
    border-radius: 16px;
    margin: 18px 0;
    text-align: center;
    color: #25D366;
}

#license-key-input {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 40px;
    color: white;
    font-size: 16px;
}

.btn-secondary {
    background: #2c2c2c;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 40px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.prediction-result {
    margin-top: 25px;
    animation: slideUp 0.4s;
}

.result-card {
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border-radius: 28px;
    text-align: center;
    padding: 28px;
    border: 1px solid #dc2626;
}

.prediction-value {
    font-size: 56px;
    font-weight: 800;
    color: #facc15;
    margin: 15px 0;
}

.confidence {
    color: #4ade80;
    font-weight: 700;
}

.hidden {
    display: none;
}

.error-msg {
    color: #dc2626;
    margin-top: 10px;
    font-size: 13px;
}

.dashboard-footer {
    text-align: center;
    margin-top: 40px;
    color: #666;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 640px) {
    .glass-card {
        padding: 25px;
    }
    
    .navbar {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .bookie-buttons {
        justify-content: center;
    }
}