/* ============================================
   BEST OF PAGE SPECIFIC STYLES
   ============================================ */

/* Cover Section - Full Cover Under Menu */
.cover {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 160px 20px 80px;
    margin-top: -10px;
    margin-left: -20px;
    margin-right: -20px;
    overflow: hidden;
}

.cover__bg {
    position: absolute;
    inset: 0;
    background: url('https://image.tmdb.org/t/p/original/zOpe0eHsq0A2NvNyBbtT6sj53qV.jpg') center top / cover no-repeat;
    filter: brightness(0.4);
    transform: scale(1.05);
    animation: coverZoom 30s ease-in-out infinite alternate;
}

@keyframes coverZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

.cover__overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, rgba(10, 6, 8, 0.3) 0%, rgba(10, 6, 8, 0.6) 50%, var(--noir) 100%),
        radial-gradient(ellipse at center top, transparent 0%, var(--noir) 70%);
}

.cover__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 30px 20px 45px;
    margin: 40px 0;
    max-width: 800px;
}

.cover__icon {
    font-size: 5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 30px rgba(245, 166, 35, 0.5));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cover__title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    letter-spacing: -1px;
}

.cover__title span { 
    background: linear-gradient(135deg, var(--ruby), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cover__desc {
    color: var(--silver);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Hero Section (Login Message) */
.hero {
    text-align: center;
    padding: 20px 20px 30px;
}

.hero__login-msg {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: rgba(227, 27, 84, 0.15);
    border: 1px solid rgba(227, 27, 84, 0.3);
    border-radius: 30px;
    color: var(--crimson);
    font-size: 0.95rem;
}

.hero__login-msg a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.hero__login-msg a:hover {
    text-decoration: underline;
}

/* Setup Section */
.setup {
    position: relative;
    z-index: 5;
    max-width: 600px;
    margin: -80px auto 0;
    padding: 0 20px;
}

.setup__card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 30px;
    /* backdrop-filter removed for GPU performance */
}

.setup__row {
    margin-bottom: 25px;
}

.setup__label {
    display: block;
    margin-bottom: 10px;
    color: var(--pearl);
    font-weight: 600;
}

.setup__select {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: var(--pearl);
    font-family: var(--font-arabic);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.setup__select:focus {
    outline: none;
    border-color: var(--ruby);
}

.setup__select option {
    background: var(--charcoal);
    color: var(--pearl);
}

.setup__btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--ruby), var(--crimson));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 20px;
}

.setup__btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(227, 27, 84, 0.3);
}

.setup__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.setup__info {
    padding: 20px;
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.setup__info p {
    color: var(--gold);
    margin: 0;
}

.setup__info strong {
    color: var(--pearl);
}

/* Battle Section */
.battle {
    display: none;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.battle__progress {
    text-align: center;
    margin-bottom: 40px;
}

.battle__progress-text {
    color: var(--silver);
    margin-bottom: 10px;
}

.battle__progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.battle__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ruby), var(--gold));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.battle__vs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.battle__card {
    flex: 1;
    max-width: 350px;
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    animation: slideIn 0.5s ease forwards;
}

.battle__card:nth-child(2) {
    animation-delay: 0.1s;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.battle__card:hover {
    transform: scale(1.03);
    border-color: var(--ruby);
    box-shadow: 0 20px 60px rgba(227, 27, 84, 0.2);
}

.battle__card.selected {
    border-color: var(--gold);
    box-shadow: 0 0 40px rgba(245, 166, 35, 0.3);
}

.battle__card.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--noir);
    font-weight: bold;
    z-index: 10;
}

.battle__poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.battle__info {
    padding: 20px;
    text-align: center;
}

.battle__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--pearl);
}

.battle__meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    color: var(--silver);
    font-size: 0.9rem;
}

.battle__meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.battle__meta i { color: var(--gold); }

.battle__divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.battle__vs-text {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--ruby), var(--crimson));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 10px 30px rgba(227, 27, 84, 0.4);
}

.battle__skip {
    padding: 12px 30px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    color: var(--silver);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.battle__skip:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--silver);
}

/* Results Section */
.results {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.results__title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.results__title i { color: var(--gold); margin-left: 10px; }

.results__list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.results__item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 15px;
    text-decoration: none;
    color: var(--pearl);
    transition: all 0.3s;
}

.results__item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--ruby);
    transform: translateX(-5px);
}

.results__rank {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
}

.results__rank--1 { background: linear-gradient(135deg, #ffd700, #ffaa00); color: var(--noir); }
.results__rank--2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: var(--noir); }
.results__rank--3 { background: linear-gradient(135deg, #cd7f32, #a0522d); color: white; }
.results__rank--other { background: rgba(255,255,255,0.1); color: var(--silver); }

.results__poster {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.results__info {
    flex: 1;
}

.results__name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.results__stats {
    display: flex;
    gap: 15px;
    color: var(--silver);
    font-size: 0.85rem;
}

.results__score {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
}

.results__actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.results__btn {
    padding: 15px 30px;
    border-radius: 12px;
    font-family: var(--font-arabic);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.results__btn--primary {
    background: linear-gradient(135deg, var(--ruby), var(--crimson));
    border: none;
    color: white;
}

.results__btn--secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--pearl);
}

.results__btn:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .cover__title { font-size: 2.5rem; }
    .cover__icon { font-size: 4rem; }
    
    .battle__vs {
        flex-direction: row;
        gap: 15px;
    }
    
    .battle__card { max-width: 45%; flex: 1; }
    
    .battle__divider {
        flex-shrink: 0;
    }
    
    .battle__vs-text {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .battle__poster {
        aspect-ratio: 2/3;
    }
    
    .battle__info {
        padding: 12px;
    }
    
    .battle__title {
        font-size: 0.85rem;
    }
    
    .battle__meta {
        font-size: 0.75rem;
        gap: 8px;
    }
    
    .results__item {
        flex-wrap: wrap;
    }
    .cover {
        margin-top: -45px;
    }

    .header {
        padding: 35px 16px !important
    }
}

@media (max-width: 768px) {
    .cover {
        min-height: 350px;
        margin-left: -20px;
        margin-right: -20px;
        padding: 120px 20px 60px;
    }
}

@media (max-width: 576px) {
    .cover__title { font-size: 2rem; }
    .cover__desc { font-size: 1rem; }
    
    .setup__card { padding: 20px; }
    
    .battle__vs {
        gap: 8px;
    }
    
    .battle__card { max-width: 48%; }
    
    .battle__vs-text {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .battle__info {
        padding: 8px;
    }
    
    .battle__title {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .battle__meta {
        font-size: 0.65rem;
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .results__actions {
        flex-direction: column;
    }
    
    .results__btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .results__name {
   margin-bottom: 5px;
    }

    .results__rank {
  width: 35px;
  height: 35px;
   font-size: 1rem;
 
    }
}

@media (max-width: 1180px) {
    .cover {
               margin-top: -50px;
    }

    .results__rank {
  width: 35px;
  height: 35px;
   font-size: 1rem;
 
    }
}

@media (max-width: 768px) {
    .header {
        padding: 65px 20px !important;
    }
}

@media (max-width: 540px) {
    .header {
        padding: 35px 20px !important;
    }
}
