/* frontend/public/css/seasons.css - OPTIMIZED MOBILE & TABLET */

/* ========== EPIC SEASONS LAYOUT ========== */
html, body { 
    background-color: var(--bg); 
    scroll-behavior: smooth;
}

.epic-seasons-wrapper { 
    position: relative; 
    width: 100%; 
}

/* ========== DESKTOP: 1024px+ ========== */
.season-panel { 
    position: sticky; 
    top: 70px;
    width: 100%; 
    aspect-ratio: 16 / 9;
    display: flex; 
    align-items: center; 
    overflow: hidden; 
    box-shadow: 0 -20px 50px rgba(0,0,0,0.8);
    background-color: #000;
}

.season-panel__bg { 
    position: absolute; 
    inset: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 1; 
}

.season-panel__bg img, 
.season-panel__bg video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center;
    transform: scale(1.03); 
    loading: lazy;
    decoding: async;
}

.season-panel__veil { 
    position: absolute; 
    inset: 0; 
    background: 
        linear-gradient(90deg, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.5) 50%, transparent 100%), 
        linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%); 
    z-index: 2; 
}

.season-panel__inner { 
    position: relative; 
    z-index: 3; 
    display: grid; 
    align-items: center; 
    height: 100%; 
    padding-top: 40px; 
    padding: 20px;
    max-width: 100%;
}

.season-panel__massive-year { 
    position: absolute; 
    right: -2%; 
    bottom: -5%; 
    font-family: 'Oswald', sans-serif; 
    font-size: clamp(10rem, 28vw, 35rem); 
    font-weight: 800; 
    line-height: 0.8; 
    color: transparent; 
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.05); 
    z-index: 0; 
    user-select: none; 
    pointer-events: none; 
}

.season-panel__content { 
    max-width: 760px; 
    position: relative; 
    z-index: 4; 
}

.season-panel__title { 
    font-size: clamp(3rem, 7vw, 5.5rem); 
    line-height: 1.1; 
    margin-bottom: 24px; 
    text-transform: uppercase; 
    text-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.season-panel__desc { 
    font-size: 1.15rem; 
    color: rgba(255, 255, 255, 0.85); 
    margin-bottom: 40px; 
    max-width: 600px; 
    line-height: 1.6; 
}

.status-badge { 
    display: inline-block; 
    padding: 6px 14px; 
    border-radius: 4px; 
    font-size: 12px; 
    font-weight: bold; 
    text-transform: uppercase; 
    margin-bottom: 15px; 
    letter-spacing: 1px; 
}

.status-ongoing { 
    background: #4caf50; 
    color: #fff; 
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4); 
}

.status-upcoming { 
    background: #2196f3; 
    color: #fff; 
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4); 
}

.status-finished { 
    background: rgba(255,255,255,0.1); 
    color: #fff; 
    border: 1px solid rgba(255,255,255,0.2); 
}

.season-stats { 
    display: flex; 
    gap: 40px; 
    margin-bottom: 30px; 
    border-left: 3px solid var(--primary); 
    padding-left: 20px; 
}

.stat-item { 
    display: flex; 
    flex-direction: column; 
}

.stat-value { 
    font-family: 'Oswald', sans-serif; 
    font-size: 2.5rem; 
    font-weight: 700; 
    line-height: 1.1; 
    color: #fff; 
}

.stat-value small { 
    font-size: 1rem; 
    color: var(--muted); 
    margin-left: 4px; 
    font-weight: 400; 
}

.stat-label { 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: var(--muted); 
}

.btn--large { 
    padding: 0 36px; 
    min-height: 56px; 
    font-size: 1.05rem; 
    transition: all 0.3s ease;
}

.btn--large:active {
    transform: scale(0.98);
}

#footer-placeholder { 
    position: relative; 
    z-index: 10; 
    background: var(--bg); 
}

/* Hiệu ứng Loading */
.loading-screen { 
    height: 100svh; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    color: var(--muted); 
    font-size: 1.2rem; 
}

.spinner { 
    width: 40px; 
    height: 40px; 
    border: 3px solid rgba(214, 31, 38, 0.3); 
    border-radius: 50%; 
    border-top-color: var(--primary); 
    animation: spin 1s ease-in-out infinite; 
    margin-bottom: 20px; 
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

/* ========== TABLET: 768px - 1023px ========== */
@media (max-width: 1023px) {
    .season-panel { 
        top: 60px;
        aspect-ratio: auto;
        min-height: 550px;
    }
    
    .season-panel__inner {
        padding-top: 20px;
    }
    
    .season-panel__massive-year { 
        font-size: clamp(8rem, 25vw, 20rem);
        right: -5%;
        bottom: 0%;
    }
    
    .season-panel__title { 
        font-size: clamp(2.5rem, 6vw, 4rem);
        margin-bottom: 16px;
    }
    
    .season-panel__desc { 
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .season-stats { 
        gap: 30px;
    }
    
    .stat-value { 
        font-size: 2rem;
    }
}

/* ========== MOBILE: 480px - 767px ========== */
@media (max-width: 767px) {
    .season-panel { 
        top: 60px;
        aspect-ratio: auto;
        /* Đảm bảo khung mùa giải luôn cao tối thiểu bằng 100% màn hình thực tế */
        min-height: 100svh; 
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        overflow: hidden;
    }
    
    .season-panel__bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .season-panel__veil { 
        background: 
            linear-gradient(0deg, rgba(5,5,5,0.98) 0%, rgba(5,5,5,0.7) 40%, rgba(0,0,0,0.3) 100%);
        z-index: 2;
    }
    
    .season-panel__inner {
        padding-top: 80px; 
        padding-left: 0;
        padding-right: 0;
        align-items: flex-end;
        padding-bottom: 40px;
        width: 100%;
        z-index: 3;
    }
    
    .season-panel__massive-year { 
        font-size: clamp(4rem, 20vw, 10rem);
        right: 50%;
        bottom: 20%;
        transform: translateX(50%);
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
        opacity: 0.8;
    }
    
    .season-panel__content { 
        max-width: none;
        width: 100%;
        padding: 0 20px;
    }
    
    .season-panel__title { 
        font-size: clamp(1.75rem, 5vw, 2.5rem);
        line-height: 1.2;
        margin-bottom: 12px;
        word-break: break-word;
    }
    
    .season-panel__desc { 
        font-size: 0.95rem;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .season-stats { 
        gap: 20px;
        flex-wrap: wrap;
        border-left: none;
        border-top: 2px solid var(--primary);
        padding-left: 0;
        padding-top: 15px;
        margin-bottom: 25px;
    }
    
    .stat-item { 
        flex: 1;
        min-width: 80px;
    }
    
    .stat-value { 
        font-size: 1.75rem;
    }
    
    .stat-label { 
        font-size: 0.75rem;
    }
    
    .btn--large {
        width: 100%;
        padding: 0 20px;
        min-height: 52px;
        font-size: 1.05rem;
    }
}
/* ========== EXTRA SMALL MOBILE: 320px - 479px ========== */
@media (max-width: 479px) {
    .season-panel {
        /* FIX: Ép tràn viền trên màn hình siêu nhỏ */
        min-height: 100svh; 
    }
    
    .season-panel__bg {
        /* FIX: Phủ kín nền */
        height: 100%; 
    }
    
    .season-panel__bg img, 
    .season-panel__bg video 
         
    
    .season-panel__inner {
        padding-bottom: 30px;
    }
    
    .season-panel__massive-year { 
        font-size: clamp(3rem, 18vw, 7rem);
        bottom: 25%;
    }
    
    .season-panel__content { 
        padding: 0 16px;
    }
    
    .season-panel__title { 
        font-size: clamp(1.5rem, 4.5vw, 2rem);
        margin-bottom: 10px;
    }
    
    .season-panel__desc { 
        font-size: 0.9rem;
        margin-bottom: 15px;
        display: none;
    }
    
    .status-badge {
        padding: 4px 10px;
        font-size: 10px;
        margin-bottom: 10px;
    }
    
    .season-stats { 
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .stat-value { 
        font-size: 1.5rem;
    }
    
    .stat-label { 
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }
    
    .btn--large {
        min-height: 48px;
        font-size: 1rem;
        padding: 0 16px;
    }
}

/* ========== PERFORMANCE & ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .season-panel__bg img,
    .season-panel__bg video,
    .btn--large {
        animation: none;
        transition: none;
    }
    
    .spinner {
        animation: none;
        border-top-color: var(--primary);
    }
}

/* ========== DARK MODE & HIGH CONTRAST ========== */
@media (prefers-color-scheme: dark) {
    .season-panel {
        background-color: #000;
    }
}

/* ========== LANDSCAPE ORIENTATION ========== */
@media (max-height: 500px) {
    .season-panel {
        min-height: 300px;
    }
    
    .season-panel__inner {
        padding-bottom: 20px;
    }
    
    .season-stats {
        margin-bottom: 15px;
    }
}