/* 
   Premium Football Pool Design System (Football Light)
   Colors: Turf Green, Clean White, Stadium Blue
*/

:root {
    --primary: #27ae60;      /* Turf Green */
    --primary-dark: #1e8449;
    --secondary: #f8fafc;    /* Clean White */
    --accent: #2980b9;       /* Football Blue */
    --accent-gold: #f1c40f;  /* Premium Gold */
    --accent-light: #eef2ff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-muted-dark: #334155;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --premium-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(39, 174, 96, 0.04) 0%, transparent 35%),
        radial-gradient(circle at 100% 100%, rgba(41, 128, 185, 0.04) 0%, transparent 35%);
    color: var(--text-dark);
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Premium Panel */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--premium-shadow);
}

@media (max-width: 768px) {
    .glass-panel {
        padding: 1.5rem;
        border-radius: 20px;
    }
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; color: var(--primary-dark); }

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
}

/* Buttons */
.btn-premium {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.1);
}

.btn-premium:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.2);
}

.btn-premium.secondary {
    background: #f1f5f9;
    color: var(--text-muted-dark);
    box-shadow: none;
}

/* Inputs */
.premium-input {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    color: var(--text-dark);
    width: 100%;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.premium-input:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.05);
}

/* Badges & Tags */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-live { background: #fee2e2; color: #ef4444; border: 1px solid #fecaca; }
.badge-scheduled { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.date-tag { background: #f8fafc; color: var(--text-muted-dark); border: 1px solid #e2e8f0; padding: 4px 10px; border-radius: 8px; font-weight: 700; font-size: 0.7rem; }

/* Table Styles - Enhanced Premium */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 2px; /* Further reduced from 4px to 2px */
}

.ranking-table { width: 100%; border-collapse: separate; border-spacing: 0 2px; } /* Reduced from 4px to 2px */
.ranking-table th { text-align: left; padding: 0.5rem 1rem; color: var(--text-muted-dark); font-size: 0.7rem; text-transform: uppercase; font-weight: 800; letter-spacing: 1px; border-bottom: 2px solid #f1f5f9; } /* Reduced from 0.8rem to 0.5rem */
.ranking-table td { padding: 0.5rem 1rem; background: white; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; } /* Reduced from 0.8rem to 0.5rem */
.ranking-table tr td:first-child { border-radius: 12px 0 0 12px; border-left: 1px solid #f1f5f9; }
.ranking-table tr td:last-child { border-radius: 0 12px 12px 0; border-right: 1px solid #f1f5f9; }

.premium-table th {
    padding: 0.5rem 1rem; /* Further reduced from 0.8rem to 0.5rem */
    text-align: left;
    color: var(--text-muted-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    border-bottom: 2px solid #f1f5f9;
}

.premium-table tr td {
    background: white;
    padding: 0.5rem 1rem; /* Further reduced from 0.8rem to 0.5rem */
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.premium-table tr:hover td {
    background: #fcfdfe;
}

.premium-table tr td:first-child { 
    border-radius: 14px 0 0 14px; 
    border-left: 1px solid #f1f5f9; 
}
.premium-table tr td:last-child { 
    border-radius: 0 14px 14px 0; 
    border-right: 1px solid #f1f5f9; 
    font-weight: 900;
    color: var(--text-dark);
}

/* Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
}

/* Grids */
.two-col-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .two-col-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .responsive-grid {
        grid-template-columns: 1fr;
    }
}

/* Tabs Management */
.premium-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 0 auto 3rem;
    overflow-x: auto;
    padding: 0.6rem;
    background: #f1f5f9; /* Uniform color */
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    max-width: fit-content;
}

.tab-btn {
    padding: 0.8rem 1.8rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tab-btn i { font-size: 1rem; }

.tab-btn:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.4);
}

.tab-btn.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.tab-content {
    display: none;
    animation: slideUp 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

/* Accordion Management */
.premium-accordion {
    margin-bottom: 1.2rem;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.premium-accordion:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.accordion-header {
    padding: 0.8rem 1.5rem; /* Reduced from 1.2rem 2rem */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    background: white;
}

.accordion-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
    transition: all 0.3s;
    color: var(--text-muted);
}

.premium-accordion.open {
    border-color: var(--primary);
}

.premium-accordion.open .accordion-icon {
    transform: rotate(180deg);
    background: var(--primary);
    color: white;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0, 1, 0, 1);
    background: #fcfdfe;
}

.premium-accordion.open .accordion-content {
    max-height: 5000px;
    transition: max-height 1.2s ease-in;
}

/* Hero Variant */
.hero-premium {
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.85)), url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    padding: 8rem 2rem 10rem;
    text-align: center;
    color: white;
    position: relative;
    border-bottom-left-radius: 50% 40px;
    border-bottom-right-radius: 50% 40px;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-premium {
        padding: 5rem 1.5rem 6rem;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }
    .hero-premium h1 {
        font-size: 2.2rem !important;
        margin-bottom: 1rem !important;
    }
}

.hero-premium::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
    pointer-events: none;
}

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

/* Navbar Responsive Adjustment */
@media (max-width: 768px) {
    .nav-bar {
        padding: 0.8rem 1rem !important;
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
    .nav-bar div {
        gap: 1rem !important;
        justify-content: center;
        width: 100%;
        font-size: 0.8rem;
    }
}

.modal-container {
    padding: 3rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .modal-container {
        padding: 2rem 1.5rem;
    }
    .match-actions {
        margin-left: 0 !important;
        margin-top: 1rem;
        width: 100%;
        border-top: 1px dashed #e2e8f0;
        padding-top: 1rem;
    }
    .match-card {
        flex-direction: column !important;
    }
}

.hide-mobile {
    display: table-cell;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Prediction Modal Specifics */
.modal-prediction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 3rem;
    background: rgba(248, 250, 252, 0.5);
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
}

.prediction-input {
    width: 70px; 
    height: 75px; 
    text-align: center; 
    font-size: 2.2rem; 
    font-weight: 950; 
    border-radius: 16px; 
    border: 3px solid #e2e8f0; 
    background: white; 
    color: var(--primary-dark);
    transition: all 0.3s;
}

.prediction-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

@media (max-width: 500px) {
    .modal-prediction-row {
        gap: 0.5rem;
        padding: 1.5rem 0.8rem;
        margin-bottom: 2rem;
        flex-direction: column; /* Stack teams on top/bottom of inputs OR just shrink */
    }
    
    .modal-prediction-row > div {
        width: 100%;
    }

    .prediction-input-container {
        width: 100%;
        justify-content: center !important;
        margin: 1rem 0;
    }

    .prediction-input {
        width: 60px;
        height: 65px;
        font-size: 1.8rem;
    }

    .modal-container h3 {
        font-size: 1.4rem !important;
    }
}