/* predictions.css */

/* Base styles for the predictions page, similar to bracket.css */
html, body {
    height: auto !important;
    margin: 0;
    padding: 0;
    overflow-y: auto !important; 
    overflow-x: auto !important; 
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e2e8f0;
    position: relative;
    background-color: #0a0a0a; /* Base dark background */
}

/* Add overlay to body for consistent theming */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.88) 50%, rgba(15, 23, 42, 0.92) 100%);
    backdrop-filter: blur(1px);
    z-index: 0;
    pointer-events: none;
}

.fullscreen-mode {
    width: 100vw !important;
    height: 100vh !important;
    overflow-y: auto !important;   
	overflow-x: hidden !important; 
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
}

#react-predictions-root {
    position: relative;
    z-index: 1;
    min-height: 400px;
    min-width: 320px;
    width: fit-content;
    height: fit-content;
    transition: height 0.3s ease-in-out, min-height 0.3s ease-in-out, width 0.3s ease-in-out, min-width 0.3s ease-in-out;
    margin: 0 auto;
    overflow: hidden;
}

/* Predictions Hero Section - similar to live-bracket-hero */
.predictions-hero {
    background-color: #0a0a0a; /* Dark background */
    padding-top: 5rem; /* Space for fixed header */
    padding-bottom: 2rem; /* Add some bottom padding for separation */
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2); /* Purple border for predictions */
}

.predictions-hero .container {
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px; /* Keep the max-width from common.css */
    padding-bottom: 0;
}

.predictions-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(229, 231, 235, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.predictions-description {
    font-size: 1rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Inconspicuous Alerts (New Styles) */
#inconspicuous-alerts {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.alert-text {
    font-size: 0.9rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease; /* Added for smooth hide/show */
    line-height: 1.5; /* Ensure proper line height */
}

.alert-text.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.alert-text .status-icon { /* Reusing status-icon from old styles */
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Action Buttons - Relocated (New Styles) */
.action-buttons-relocated {
    display: flex;
    gap: 1rem;
    justify-content: center; /* Center the buttons */
    margin-top: 2rem; /* Space from stats overview */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    white-space: nowrap; /* Prevent text wrapping */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:not(:disabled) {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.9) 0%, rgba(126, 34, 206, 0.8) 100%);
    border: 1px solid rgba(147, 51, 234, 0.5);
    color: white;
}

.action-btn:not(:disabled):hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 1) 0%, rgba(126, 34, 206, 0.9) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

.action-btn.secondary:not(:disabled) {
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.8) 0%, rgba(75, 85, 99, 0.7) 100%);
    border-color: rgba(75, 85, 99, 0.5);
    color: var(--gray-300);
}

.action-btn.secondary:not(:disabled):hover {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.9) 0%, rgba(107, 114, 128, 0.8) 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(31, 41, 55, 0.7); /* Darker gray for disabled */
    border: 1px solid rgba(55, 65, 81, 0.5);
    color: rgba(156, 163, 175, 0.6);
    box-shadow: none;
    transform: none;
}

/* Prediction Stats Overview */
.prediction-stats-overview {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.stat-box {
    flex: 1;
    min-width: 120px; /* Ensure minimum width for smaller screens */
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 191, 255, 0.2); /* Primary blue border for stats */
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 191, 255, 0.4);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue); /* Use primary blue for values */
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Error Container Styling */
.error-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('/images/world-series-background.png'); /* Placeholder background */
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100; /* Ensure it's on top */
}

.error-content {
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.95) 0%, rgba(127, 29, 29, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 0.5rem;
    padding: 2rem;
    color: #fecaca;
    text-align: center;
    max-width: 500px;
}

.error-icon {
    color: #f87171;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.error-details {
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .predictions-hero {
        padding-top: 4rem; /* Adjust for smaller header on mobile */
        padding-bottom: 1.5rem;
    }

    .predictions-title {
        font-size: 2rem;
    }

    .predictions-description {
        font-size: 0.9rem;
    }

    .action-buttons-relocated {
        flex-direction: column;
        gap: 0.75rem;
    }

    .action-btn {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .prediction-stats-overview {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stat-box {
        width: 100%;
        min-width: unset;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
    
    .alert-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .predictions-title {
        font-size: 1.75rem;
    }
}