@font-face {
    font-family: 'Rabie';
    src: url('../font/Rabie-Semibold.eot');
    src: url('../font/Rabie-Semibold.eot?#iefix') format('embedded-opentype'),
        url('../font/Rabie-Semibold.woff2') format('woff2'),
        url('../font/Rabie-Semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rabie';
    src: url('../font/Rabie-Extralight.eot');
    src: url('../font/Rabie-Extralight.eot?#iefix') format('embedded-opentype'),
        url('../font/Rabie-Extralight.woff2') format('woff2'),
        url('../font/Rabie-Extralight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rabie';
    src: url('../font/Rabie-Extrabold.eot');
    src: url('../font/Rabie-Extrabold.eot?#iefix') format('embedded-opentype'),
        url('../font/Rabie-Extrabold.woff2') format('woff2'),
        url('../font/Rabie-Extrabold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rabie';
    src: url('../font/Rabie-Light.eot');
    src: url('../font/Rabie-Light.eot?#iefix') format('embedded-opentype'),
        url('../font/Rabie-Light.woff2') format('woff2'),
        url('../font/Rabie-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rabie';
    src: url('../font/Rabie-Regular.eot');
    src: url('../font/Rabie-Regular.eot?#iefix') format('embedded-opentype'),
        url('../font/Rabie-Regular.woff2') format('woff2'),
        url('../font/Rabie-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RabieVariableW05';
    src: url('../font/RabieVariableW05-Extrabold.eot');
    src: url('../font/RabieVariableW05-Extrabold.eot?#iefix') format('embedded-opentype'),
        url('../font/RabieVariableW05-Extrabold.woff2') format('woff2'),
        url('../font/RabieVariableW05-Extrabold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rabie';
    src: url('../font/Rabie-Bold.eot');
    src: url('../font/Rabie-Bold.eot?#iefix') format('embedded-opentype'),
        url('../font/Rabie-Bold.woff2') format('woff2'),
        url('../font/Rabie-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rabie';
    src: url('../font/Rabie-Medium.eot');
    src: url('../font/Rabie-Medium.eot?#iefix') format('embedded-opentype'),
        url('../font/Rabie-Medium.woff2') format('woff2'),
        url('../font/Rabie-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}


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

body {
    background-image: url('../img/back.png');
    background-blend-mode: normal;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    font-family: 'Rabie', calibri;
    margin: 0;
    overflow-x: hidden;
}

/* برای موبایل بهتر است اتچمنت فیکس را برداریم چون در برخی گوشی‌ها سنگین است */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}


/* هدر و لوگوی وسط‌چین */
.player-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2%;
    position: relative;
}

.logo {
    font-size: 2.2rem;
    text-align: center;
    margin: 8px 0px;
}

.logo span {
    color: #ff00ff;
}

/* چیدمان اصلی */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .main-layout {
        display: grid;
        /* نسبت ۷۵٪ به ۲۵٪ */
        grid-template-columns: 75% 25%;
        /* یا استفاده از واحد fr برای انعطاف بیشتر */
        /* grid-template-columns: 3fr 1fr; */
        gap: 25px;
        align-items: start;
        max-width: 1200px;
        /* جلوگیری از کش آمدن بیش از حد در مانیتورهای خیلی بزرگ */
        margin: 0 auto;
    }
}

/* بخش ویدیو */
.video-wrapper {
    background: #000;
    border: 4px solid #3d2b85;
    border-radius: 30px;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

#main-player,
#viloud-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* نوار ابزار زیر پلیر */
.player-footer-bar {
    display: flex;
    justify-content: space-between;
    /* پخش کردن محتوا در دو طرف */
    align-items: center;
    margin-top: 15px;
    padding: 0 10px;
}

#now-playing-text {
    font-size: 1.1rem;
    color: #ffcc00;
    font-weight: bold;
}

.back-btn {
    background: linear-gradient(to bottom, #00bcd4, #008ba3);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
    transition: transform 0.2s;
}

.back-btn:hover {
    transform: scale(1.05);
}

/* سایدبار کانال‌ها */
.playlist-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 80vh;
    overflow-y: auto;
    padding-left: 10px;
}

.channel-item {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    transition: 0.3s ease;
}

.channel-item.active {
    border-color: #ffcc00;
    background: rgba(255, 255, 255, 0.35);
}

.thumb-container {
    width: 100%;
    height: 80px;
    background: #333;
}

.thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-info {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.channel-info span {
    font-weight: bold;
    font-size: 0.8rem;
}

.live-badge {
    background: #ff4757;
    color: white;
    font-size: 10px;
    padding: 0px 6px;
    border-radius: 8px;
    display: none;
    font-weight: bold;
}

.channel-item.active .live-badge {
    display: inline-block;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    .player-footer-bar {
        flex-direction: column;
        /* در موبایل زیر هم قرار بگیرند */
        gap: 15px;
        text-align: center;
    }

    .logo {
        font-size: 2rem;
    }
}

/* زیباسازی اسکرول‌بار */
.playlist-sidebar::-webkit-scrollbar {
    width: 6px;
}

.playlist-sidebar::-webkit-scrollbar-thumb {
    background: #3d2b85;
    border-radius: 10px;
}

span.live-badge {
    font-weight: 300;
}

