/* Modern CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Keep gradients but switch overall palette to match main homepage (light, pinkish) */
    --primary-gradient: linear-gradient(135deg, #ff748c 0%, #ff4b6a 100%);
    --secondary-gradient: linear-gradient(135deg, #ffb3c1 0%, #ff9ca8 100%);
    --success-gradient: linear-gradient(135deg, #24b47e 0%, #00c896 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* Light background similar to homepage */
    --bg-primary: #ffe3e5;
    --bg-secondary: #ffccd3;
    --bg-card: #ffffff;
    --bg-card-hover: #fff7f8;
    
    /* Dark text like homepage */
    --text-primary: #222222;
    --text-secondary: #555555;
    --text-muted: #777777;
    
    /* Softer borders and shadows for light theme */
    --border-color: rgba(0, 0, 0, 0.06);
    --border-color-hover: rgba(0, 0, 0, 0.12);
    
    --shadow-light: 0 8px 18px rgba(255, 75, 106, 0.18);
    --shadow-medium: 0 16px 36px rgba(255, 75, 106, 0.26);
    --shadow-heavy: 0 22px 52px rgba(255, 75, 106, 0.32);
    
    --border-radius: 16px;
    --border-radius-large: 24px;
}

body {
    /* Match homepage typography */
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* Plain white background for a simple look */
    background: #ffffff;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Remove dark overlay; homepage uses a clean gradient only */
body::before {
    display: none;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Container and Layout */
.container {
    /* Closer to homepage content width/padding */
    max-width: 960px;
    margin: 40px auto 100px;
    padding: 0 16px 80px;
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
    padding: 0;
    text-align: left;
}

/* Enhanced Header with normal positioning */
/* Header as a normal card near top, like homepage title card */
.header {
    position: static;
    background: var(--bg-card);
    backdrop-filter: none;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 24px;
    box-shadow: var(--shadow-light);
    z-index: 1;
    max-width: 100%;
    margin: 0 0 16px 0;
}

/* Subtle top accent */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 16px 16px 0 0;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-gradient);
    z-index: 10002;
    transition: width 0.1s ease-out;
    opacity: 0;
}

.scroll-progress.visible {
    opacity: 1;
}

/* Enhanced sticky navbar states */
.header.sticky {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 24px;
    box-shadow: 
        var(--shadow-heavy),
        0 0 40px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    animation: sticky-slide-down 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.sticky::before {
    opacity: 1;
}

.header.sticky:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        var(--shadow-heavy),
        0 0 50px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.header.sticky::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
    opacity: 0;
    animation: glow-line 2s ease-in-out infinite;
}

@keyframes glow-line {
    0%, 100% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Slide down animation for sticky state */
@keyframes sticky-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hide state when scrolling up */
.header.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.header:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-heavy);
    transform: translateY(-2px);
}

.navbar-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.navbar-left h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #ffffff;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.navbar-left h1:hover {
    transform: scale(1.02);
}

.navbar-left h1 i {
    margin-right: 10px;
    animation: brain-pulse 2s ease-in-out infinite;
    font-size: 1.1em;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
}

.navbar-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: flex-end;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.auth-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 110px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.register-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border: 2px solid rgba(0, 255, 136, 0.4);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    animation: register-pulse 3s ease-in-out infinite;
}

.register-btn:hover {
    background: linear-gradient(135deg, #00cc6a, #00aa55);
    border-color: rgba(0, 204, 106, 0.6);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.4);
    transform: translateY(-3px);
    animation: none;
}

.login-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border: 2px solid rgba(79, 172, 254, 0.4);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    border-color: rgba(0, 242, 254, 0.6);
    box-shadow: 0 8px 30px rgba(79, 172, 254, 0.4);
    transform: translateY(-3px);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.header h1 i {
    margin-right: 12px;
    animation: brain-pulse 2s ease-in-out infinite;
}

@keyframes brain-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.header-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.status-indicator {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: static;
    overflow: visible;
    box-shadow: none;
}

.status-indicator::before {
    content: none;
    animation: none;
}

.status-indicator.online {
    background: #24b47e; /* solid green background */
    color: #ffffff;       /* white text */
    box-shadow: none;
    animation: none;
}

@keyframes status-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 0 25px rgba(79, 172, 254, 0.4),
            0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 
            0 0 35px rgba(79, 172, 254, 0.6),
            0 6px 20px rgba(0, 0, 0, 0.3);
    }
}

.status-indicator.updating {
    background: var(--warning-gradient);
    color: white;
}

.status-indicator.error {
    background: var(--secondary-gradient);
    color: white;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.stats-summary {
    display: flex;
    gap: 24px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: none;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 22px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header h2 i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Prediction Card Enhancement */
.prediction-card {
    background: linear-gradient(135deg, var(--bg-card), rgba(102, 126, 234, 0.05));
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.prediction-info {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.prediction-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.timer-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-display {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.05));
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    font-family: 'Monaco', monospace;
    min-width: 80px;
    text-align: center;
    animation: timer-pulse 1s ease-in-out infinite;
}

@keyframes timer-pulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
        transform: scale(1.02);
    }
}

.countdown-display.warning {
    color: #feca57;
    background: linear-gradient(135deg, rgba(254, 202, 87, 0.15), rgba(254, 202, 87, 0.05));
    border-color: rgba(254, 202, 87, 0.3);
    animation: timer-warning 0.5s ease-in-out infinite;
}

@keyframes timer-warning {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(254, 202, 87, 0.3);
    }
    50% { 
        box-shadow: 0 0 25px rgba(254, 202, 87, 0.6);
    }
}

.countdown-display.urgent {
    color: #ff3838;
    background: linear-gradient(135deg, rgba(255, 56, 56, 0.2), rgba(255, 56, 56, 0.1));
    border-color: rgba(255, 56, 56, 0.4);
    animation: timer-urgent 0.3s ease-in-out infinite;
}

@keyframes timer-urgent {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 56, 56, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 56, 56, 0.7);
        transform: scale(1.05);
    }
}

.countdown-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
    position: relative;
}

.countdown-bar {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 50%, #ff6b6b 100%);
    border-radius: 2px;
    transition: width 0.3s ease-out;
    position: relative;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.4);
}

.countdown-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.countdown-bar.warning {
    background: linear-gradient(90deg, #feca57 0%, #ff9ff3 50%, #ff6b6b 100%);
    box-shadow: 0 0 12px rgba(254, 202, 87, 0.5);
}

.countdown-bar.urgent {
    background: linear-gradient(90deg, #ff3838 0%, #ff6b6b 50%, #ff9ff3 100%);
    box-shadow: 0 0 15px rgba(255, 56, 56, 0.6);
    animation: urgent-pulse 0.5s ease-in-out infinite;
}

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

.next-issue {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.issue-label {
    color: var(--text-muted);
}

.issue-value {
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    font-family: 'Monaco', monospace;
}

.prediction-display {
    text-align: center;
    margin: 32px 0;
}

.prediction-issue {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.issue-prefix {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.issue-number {
    font-size: 2rem;
    font-weight: 800;
    color: #00ff88;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
    font-family: 'Monaco', monospace;
    padding: 12px 20px;
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 136, 0.4);
    min-width: 180px;
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.3),
        inset 0 0 10px rgba(0, 255, 136, 0.1);
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.issue-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.4), transparent);
    animation: issue-shimmer 3s infinite;
}

@keyframes issue-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.prediction-value {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 24px 0;
    padding: 24px 48px;
    border-radius: 32px;
    display: inline-block;
    min-width: 280px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.prediction-value::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.prediction-value:hover::before {
    left: 100%;
}

.prediction-value.big {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.3);
}

.prediction-value.small {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 20px 40px rgba(240, 147, 251, 0.3);
}

.prediction-value.analyzing {
    background: var(--primary-gradient);
    color: white;
    animation: analyzing-pulse 2s ease-in-out infinite;
}

@keyframes analyzing-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4); }
}

.prediction-countdown {
    margin-top: 32px;
    padding: 20px;
    background: #eff2fd; /* soft light background */
    border-radius: var(--border-radius);
    border: none;
}

.countdown-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.timer-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.05));
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    font-family: 'Monaco', monospace;
    min-width: 100px;
    text-align: center;
    animation: timer-pulse 1s ease-in-out infinite;
}

.algorithm-info {
    display: none;
}

/* Results Grid Enhancement */
.update-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: live-pulse 1s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.result-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-light);
}

.result-number {
    font-size: 2rem;
    font-weight: 700;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    position: relative;
}

.result-number.big {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
}

.result-number.small {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
}

.result-details {
    text-align: center;
}

.result-type {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.result-type.big {
    color: #4facfe;
}

.result-type.small {
    color: #f093fb;
}

.result-issue, .result-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 2px 0;
}

/* Modern Table Enhancement */
.table-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.modern-table th {
    background: var(--primary-gradient);
    color: white;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s ease;
}

.modern-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.prediction-badge, .actual-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.prediction-badge.big, .actual-badge.big {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.prediction-badge.small, .actual-badge.small {
    background: rgba(240, 147, 251, 0.2);
    color: #f093fb;
    border: 1px solid rgba(240, 147, 251, 0.3);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 60px;
    text-align: center;
    background: transparent;             /* no background */
    border: none;                       /* no border */
}

.status-badge.correct {
    background: transparent;
    color: #24b47e;                     /* green text only */
}

.status-badge.wrong {
    background: transparent;
    color: #ff4b6a;                     /* red/pink text only */
}

.status-badge.pending {
    background: transparent;
    color: #f59e0b;                     /* amber text only */
}

/* Make sure result cell itself never has background */
.status-cell {
    background: transparent !important;
}

/* Simple flat colours for the inner WIN / x3 text */
.multiplier-base {
    color: #f59e0b;   /* amber */
}

.multiplier-high {
    color: #ff4b6a;   /* red/pink */
}

.win-status {
    color: #24b47e;   /* green */
}

/* Hard reset: ensure no background on any status badge variant */
.status-badge,
.status-badge.correct,
.status-badge.wrong,
.status-badge.pending {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* System Info Enhancement */
.info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.system-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color-hover);
}

.info-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 12px;
    flex-shrink: 0;
}

.info-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-gradient);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Error States */
.error-state, .no-data-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.error-icon, .no-data-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.error-text, .no-data-text {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.error-subtext {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-medium);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
}

.notification.success {
    border-left: 4px solid #00ff88;
}

.notification.error {
    border-left: 4px solid #ff6b6b;
}

.notification.warning {
    border-left: 4px solid #feca57;
}

.notification.info {
    border-left: 4px solid #4facfe;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-message {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Animations */
.pulse-animation {
    animation: pulse-effect 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulse-effect {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-in .result-card {
    animation: slide-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slide-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-row-animated {
    animation: fade-in-row 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fade-in-row {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Overlay */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary-gradient);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 100px 16px 80px 16px;
        gap: 16px;
    }
    
    .header {
        top: 12px;
        left: 12px;
        right: 12px;
        padding: 12px 16px;
        border-radius: var(--border-radius);
    }
    
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 12px;
        padding: 0;
    }
    
    .navbar-left {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    .navbar-left h1 {
        font-size: 1.3rem;
        white-space: nowrap;
        margin: 0;
    }
    
    .navbar-left h1 i {
        margin-right: 6px;
        font-size: 1em;
    }
    
    .navbar-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-shrink: 0;
    }
    
    .auth-buttons {
        display: flex;
        flex-direction: row;
        gap: 6px;
        align-items: center;
    }
    
    .auth-btn {
        font-size: 0.75rem;
        padding: 8px 12px;
        min-width: 85px;
        gap: 4px;
        border-radius: 10px;
    }
    
    .auth-btn i {
        font-size: 0.8rem;
    }
    
    .card {
        padding: 24px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }
    
    .prediction-info {
        width: 100%;
        justify-content: space-between;
        gap: 16px;
    }
    
    .prediction-timer {
        flex-direction: row;
        gap: 8px;
    }
    
    .countdown-display {
        font-size: 1rem;
        padding: 6px 12px;
        min-width: 60px;
    }
    
    .prediction-value {
        font-size: 2.5rem;
        min-width: 200px;
        padding: 20px 32px;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .system-info {
        grid-template-columns: 1fr;
    }
    
    .modern-table {
        font-size: 0.8rem;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 12px 8px;
    }
    
    .prediction-issue {
        flex-direction: column;
        gap: 8px;
    }
    
    .issue-number {
        font-size: 1.5rem;
        min-width: 140px;
        padding: 10px 16px;
        border-radius: 12px;
    }
    
    .countdown-info {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .countdown-display {
        font-size: 1.2rem;
        padding: 8px 16px;
        min-width: 80px;
    }
    
    .countdown-progress {
        height: 3px;
        margin-top: 6px;
    }
    
    .prediction-value {
        font-size: 2.5rem;
        min-width: 200px;
        padding: 20px 32px;
    }
    
    .bottom-nav {
        padding: 8px 0;
    }
    
    .bottom-nav-container {
        padding: 0 10px;
        gap: 4px;
    }
    
    .time-btn {
        padding: 8px 4px;
        min-width: 60px;
        max-width: 90px;
    }
    
    .time-icon {
        font-size: 0.9rem;
    }
    
    .time-label {
        font-size: 0.6rem;
    }
    
    .container {
        padding-bottom: 80px;
    }
    
    /* Hide live indicators on mobile for better responsiveness */
    .status-indicator {
        display: none;
    }
    
    .update-indicator {
        display: none;
    }
}

/* Tablet and smaller screens */
@media (max-width: 1024px) {
    .status-indicator {
        display: none;
    }
    
    .update-indicator {
        display: none;
    }
    
    .card-header {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }
}

@keyframes register-pulse {
    0%, 90%, 100% { 
        box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
        transform: scale(1);
    }
    45% { 
        box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
        transform: scale(1.02);
    }
}

/* Multiplier system – simple flat text colours, no glow */
.multiplier-base {
    color: #f59e0b;
    font-weight: 700;
    font-size: 1.0em;
    text-shadow: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.multiplier-high {
    color: #ff4b6a;
    font-weight: 700;
    font-size: 1.0em;
    text-shadow: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    display: inline;
    position: static;
}

.win-status {
    color: #24b47e;
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    display: inline;
    position: static;
}

/* Add floating particles effect for WIN text */
.win-status.sparkle::before,
.win-status.sparkle::after {
    content: '⭐';
    position: absolute;
    font-size: 0.5em;
    opacity: 0;
    animation: floating-stars 3s ease-in-out infinite;
    pointer-events: none;
}

.win-status.sparkle::before {
    top: -15px;
    left: -20px;
    animation-delay: 0.5s;
}

.win-status.sparkle::after {
    bottom: -15px;
    right: -20px;
    animation-delay: 1.5s;
}

@keyframes floating-stars {
    0%, 90%, 100% { 
        opacity: 0; 
        transform: scale(0.3) translateY(0px) rotate(0deg);
    }
    10%, 80% { 
        opacity: 1; 
        transform: scale(1) translateY(-5px) rotate(180deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.8) translateY(-10px) rotate(90deg);
    }
}

/* Smooth transitions for all updates */
.results-grid, 
#predictionHistory tbody,
.stat-value {
    transition: opacity 0.3s ease-in-out;
}

/* Enhanced result cards with better animations */
.result-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(102, 126, 234, 0.1);
}

/* Enhanced table row transitions */
.table-row-animated {
    transition: all 0.3s ease;
}

.table-row-animated:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(5px);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 12px 0;
}

.bottom-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
    gap: 8px;
}

.time-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    flex: 1;
    max-width: 120px;
}

.time-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.time-btn.active {
    background: var(--primary-gradient);
    border-color: rgba(102, 126, 234, 0.5);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.time-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.time-icon {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Monaco', monospace;
}

.time-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
} 

/* Homepage-style notification bar (yellow popup) */
.notify-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    max-width: 320px;
    padding: 6px 18px;
    font-size: 11px;
    background: #ffeb3b;
    color: #000;
    border-radius: 999px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1200;
}

.notify-bar.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Telegram floating icon styles (match homepage) */
.floating-wrapper {
    position: fixed;
    left: 24px;
    bottom: 160px; /* Telegram icon position */
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1200;
}

.fab-telegram {
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
}

.fab-icon-img {
    width: 64px;
    height: 64px;
    display: block;
    border-radius: 50%;
}

/* Floating "Visit" button (uses top verified domain) */
.floating-visit-wrapper {
    position: fixed;
    left: 24px;
    bottom: 240px; /* directly above Telegram icon */
    z-index: 1300; /* above overlay and other UI */
}

.fab-visit {
    background: linear-gradient(135deg, #ff748c 0%, #ff4b6a 100%);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(255, 75, 106, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fab-visit::after {
    content: '↗';
    font-size: 0.9rem;
}

.fab-visit:hover {
    background: linear-gradient(135deg, #ff4b6a 0%, #ff2350 100%);
}

/* Fullscreen preview overlay for prediction page (match homepage style) */
.prediction-preview {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: none; /* hidden by default */
    align-items: stretch;
    justify-content: stretch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 1100; /* below floating buttons/notification */
}

.prediction-preview.is-visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.prediction-preview-inner {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    overflow: hidden;
}

.prediction-preview-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    /* Hint mobile browsers to favor taps/clicks over scrolling gestures */
    touch-action: manipulation;
}

/* Prevent background scroll when prediction preview is open */
html.prediction-preview-open,
body.prediction-preview-open {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: contain;
}

/* When fullscreen preview is open, disable interactions on everything
   except the preview overlay itself and its close button */
body.prediction-preview-open * {
    pointer-events: none !important;
}

body.prediction-preview-open .prediction-preview,
body.prediction-preview-open .prediction-preview *,
body.prediction-preview-open .prediction-preview-close {
    pointer-events: auto !important;
}

/* When fullscreen preview is open, hide Telegram, Visit, and notification icons */
body.prediction-preview-open .floating-wrapper,
body.prediction-preview-open .floating-visit-wrapper,
body.prediction-preview-open #notificationBar {
    display: none !important;
}

/* (No separate close button; click grey overlay to close, like homepage) */

/* === Simple light theme overrides to match homepage and reduce effects === */

/* Use subtle cards and borders, minimal shadows */
.card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

.card:hover {
    background: #ffffff;
    box-shadow: none;
    transform: none;
}

.header {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

.header.sticky,
.header.sticky:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

.issue-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;            /* white text */
    background: #24b47e;       /* solid green background */
    border: 1px solid #24b47e; /* match border to background */
    text-shadow: none;
    box-shadow: none;
}

.issue-number::before {
    content: none;
    animation: none;
}

.prediction-value {
    font-size: 3rem;
    border-radius: 24px;
    box-shadow: none;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #222222;
}

.prediction-value.big {
    background: #24b47e;            /* solid green */
    color: #ffffff;                 /* white text */
    border-color: #24b47e;
}

.prediction-value.small {
    background: #ff4b6a;            /* solid red/pink */
    color: #ffffff;                 /* white text */
    border-color: #ff4b6a;
}

.prediction-value.analyzing {
    background: #ff4b6a;
    color: #ffffff;
    border-color: #ff4b6a;
    animation: none;
}

.countdown-display {
    /* simple blue timer pill */
    color: #2451ff;
    background: #edf2ff;
    border-color: rgba(36, 81, 255, 0.3);
    box-shadow: none;
}

.status-badge,
.multiplier-base,
.multiplier-high,
.win-status {
    text-shadow: none;
    box-shadow: none;
    animation: none;
}

/* Simple colours for result column */
.status-badge {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #555555;
}

.status-badge.correct {
    background: #24b47e;                 /* solid green */
    border-color: transparent;
    color: #ffffff;                       /* white text */
}

.status-badge.wrong {
    background: #ff4b6a;                 /* solid red/pink */
    border-color: transparent;
    color: #ffffff;
}

.status-badge.pending {
    background: #f59e0b;                 /* solid amber */
    border-color: transparent;
    color: #ffffff;
}

/* Multiplier / WIN text inside stays flat */
.multiplier-base,
.multiplier-high,
.win-status {
    background: transparent;
    border: none;
    text-shadow: none;
    box-shadow: none;
    animation: none;
}

.win-status.sparkle::before,
.win-status.sparkle::after {
    display: none;
}

.result-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

.result-card:hover {
    background: #ffffff;
    box-shadow: none;
}

.table-container {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.modern-table th {
    background: #ff4b6a; /* flat pink header */
}

.modern-table td {
    background: #ffffff;
}

.bottom-nav {
    background: #f7f7f9;
    backdrop-filter: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

.time-btn {
    border-radius: 16px;
    box-shadow: none;
}

.time-btn:hover {
    background: #ffe3e7;
    box-shadow: none;
    transform: none;
}

.time-btn.active {
    background: #ff4b6a;
    border-color: transparent;
    box-shadow: none;
}

.time-btn.active:hover {
    box-shadow: none;
}

.loading-spinner,
.spinner {
    border-color: rgba(0, 0, 0, 0.06);
}