:root{
    --bg-base: #0E0E0E;
    --bg-surface: #1a1a1a;
    --bg-elevated: #2a2a2a;
    --border-subtle: #2b2b2b;
    --border-hover: #5a5a5a;
    --text-primary: #ffffff;
    --text-muted: #bcbcbc;
    --clr-live: rgba(255,0,0,.8);
    --radius-card: 1rem;
    --radius-btn: 0.7rem;
    --radius-img: 0.8rem;
}

html,*,
*::after,
*::before{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body{
    font-family: "estedad", serif;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-base);
}

img{
    border: none;
    outline: none;
}

.header{
    width: 100%;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);

    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;

    padding: .8rem 2rem;

    color: var(--text-primary);
}

.header__livesport{
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: .5rem;
}

.header-circle-live{
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--clr-live);
    animation: livecircle 2s linear infinite;
}

@keyframes livecircle{
    0%{ opacity: 0; }
    50%{ opacity: 1; }
    100%{ opacity: 0; }
}

.main{
    width: 100%;
    padding: 2rem;
    display: flex;
    gap: 2rem;
}

.video-container{
    margin-top: 4.3rem;
    width: 60%;
}

.video{
    width: 100%;
    height: 30rem;
    border-radius: var(--radius-card);
    background: black;
}

.archive-container{
    width: 40%;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.archive__title{
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 1.6rem;
    text-align: center;
    width: 85%;
    border-bottom: 1px solid var(--text-primary);
}

.archive-list{
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    height: 39rem;
    overflow-y: auto;
    scrollbar-width: none;
    padding-left: 1rem;
    padding-top: 1rem;
}

.archive-list::-webkit-scrollbar{
    width: 6px;
}

.archive-list::-webkit-scrollbar-thumb{
    background: #444;
    border-radius: 20px;
}

.archive-item{
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    height: 8rem;
    display: flex;
    gap: 1rem;
    padding: .4rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: .25s;
}

.archive-item:hover{
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.archive-item__img{
    width: 10rem;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-img);
    flex-shrink: 0;
}

.archive-item-text{
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.archive-item__title{
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.archive-item__subtitle{
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.signal-buttons{
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.signal-btn{
    width: 100%;
    height: 4rem;
    border: none;
    outline: none;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-size: 1.3rem;
    padding: 0.8rem 1.4rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 0 10px -2px rgba(255, 255, 255, 0.31);
}

.signal-btn:hover{
    background-color: var(--bg-elevated);
}

.Error{
    width: 100%;
    height: calc(100vh - 68px);
    display: none;
    justify-content: center;
    align-items: center;
}

.Error-box{
    width: 30rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.Error-icon{
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #ff4d4d;
}

.Error-title{
    font-size: 1.5rem;
    margin-bottom: .8rem;
}

.Error-text{
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.Error-btn{
    border: none;
    outline: none;
    cursor: pointer;
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    padding: .9rem 1.4rem;
    border-radius: var(--radius-btn);
    font-family: inherit;
    font-size: 1rem;
    transition: .25s;
}

.Error-btn:hover{
    background-color: #353535;
}

/* تبلت */
@media (max-width: 1024px){

    body{
        overflow-y: auto;
        height: auto;
    }

    .main{
        flex-direction: column;
        padding: 1rem;
    }

    .video-container{
        width: 100%;
        margin-top: 0;
    }

    .archive-container{
        width: 100%;
    }

    .video{
        height: 24rem;
    }

    .archive-list{
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
        padding-bottom: .5rem;
        scrollbar-width: none;
    }

    .archive-item{
        width: 45%;
        min-width: 220px;
        flex-shrink: 0;
    }

}

/* موبایل */
@media (max-width: 768px){

    .header{
        padding: 1rem 1.5rem;
    }

    .header__name{
        font-size: 1.3rem;
    }

    .header__livesport{
        font-size: 1rem;
    }

    .main{
        padding: 0.8rem;
        gap: 1rem;
    }

    .video{
        border-radius: .8rem;
    }

    .signal-btn{
        height: 3.2rem;
        font-size: 0.9rem;
    }

    .archive-item-text{
        flex-direction: column;
    }
    .archive__title{
        font-size: 1.3rem;
        margin-top: 2rem;
    }
    .archive-item__subtitle{
        font-size: 0.6rem;
    }

    .archive-list{
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        height: auto;
        padding-left: 0;
        padding-bottom: .5rem;
        align-items: stretch;
    }
    .archive-item{
        height: 6rem;
    }
    .archive-item__img{
        width: 50%;
    }

    
    .Error-box{
        width: 100%;
        max-width: 22rem;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .Error-title{
        font-size: 1.2rem;
    }

    .Error-text{
        font-size: .9rem;
    }
    
}
@media (max-width: 645px){
    .archive-item{
        width: 50%;
    }
}
@media (max-width: 560px){
    .archive-item{
        width: 60%;
    }
}


/* موبایل‌های خیلی کوچک */
@media (max-width: 480px){
    
    .header{
        padding: .7rem;
    }

    .header__name{
        font-size: 1.1rem;
    }
    
    .header__livesport{
        font-size: .9rem;
    }
    
    .video{
        height: 16rem;
    }
    
    .archive-item{
        flex-direction: column;
        width: 12rem;
        min-width: 130px;
        height: auto;
        padding: .5rem;
        gap: 1rem;
        flex-shrink: 0;
    }
    
    
    .archive-item__img{
        width: 100%;
        border-radius: .6rem;
        flex-shrink: 0;
        height: 75px;
    }
    .archive-item-text{
        justify-content: flex-start;
        width: 100%;
        text-align: center;
    }
    
    .archive-item__title{
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .archive-item__subtitle{
        font-size: 0.68rem;
        line-height: 1.5;
    }

    .Error-box{
        padding: 1.2rem;
    }

    .Error-icon{
        width: 3rem;
        height: 3rem;
    }
}