* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: #080808;
    color: white;
    font-family: Arial, sans-serif;
}

header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 30px;
    background: #111;
    border-bottom: 1px solid #222;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
}

main {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 15px;
}

.player-section {
    width: 100%;
    max-width: 100%;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}

video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    background: #000;
}

@media (max-width: 600px) {

    body {
        overflow-x: hidden;
    }

    main {
        width: 100%;
        padding: 20px 10px;
    }

    .video-container {
        width: 100%;
        border-radius: 8px;
    }

    video {
        width: 100%;
        height: auto;
    }
}

.hero {
    text-align: center;
    margin-bottom: 35px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.hero p {
    color: #888;
}

.input-box {
    display: flex;
    gap: 10px;
    max-width: 800px;
    margin: 30px auto;
}

.input-box input {
    flex: 1;
    padding: 17px;
    border-radius: 10px;
    border: 1px solid #333;
    background: #151515;
    color: white;
    font-size: 15px;
    outline: none;
}

.input-box button {
    width: 130px;
    border: none;
    border-radius: 10px;
    background: white;
    color: black;
    font-weight: bold;
    cursor: pointer;
}

/* =========================
Video Player
========================= */

.video-container {
    position: relative;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, .5);
}

video {
    width: 100%;
    display: block;
    max-height: 650px;
    background: black;
}

/* =========================
Player Controls
========================= */

.player-controls {
    background: #111;
    padding: 12px 15px;
}

.progress-container {
    width: 100%;
}

#progress {
    width: 100%;
    cursor: pointer;
}

.time-row {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    direction: ltr;
    color: #bbb;
    font-size: 13px;
    margin-top: 5px;
}

.buttons-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    direction: ltr;
    flex-wrap: wrap;
}

.control-btn {
    width: 42px;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: #222;
    color: white;
    cursor: pointer;
    font-size: 17px;
}

.control-btn:hover {
    background: #333;
}

.play-btn {
    font-size: 19px;
}

.volume-slider {
    width: 90px;
    cursor: pointer;
}

.quality-select {
    height: 38px;
    border: none;
    border-radius: 8px;
    background: #222;
    color: white;
    padding: 0 10px;
    cursor: pointer;
}

.brightness-panel {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    background: #1b1b1b;
    border-radius: 8px;
    color: #ccc;
}

.brightness-panel.show {
    display: flex;
}

#brightness {
    width: 150px;
}

.status {
    text-align: center;
    color: #777;
    font-size: 13px;
    margin-top: 10px;
}

/* =================================================
FULLSCREEN
کنترل‌ها روی خود تصویر قرار می‌گیرند
================================================= */

.video-container:fullscreen {
    width: 100vw;
    height: 100vh;

    background: #000;

    border-radius: 0;

    display: flex;
    align-items: center;
    justify-content: center;

}

/*
خود ویدئو در Fullscreen کوچک نمی‌شود.
تصویر با حفظ نسبت خودش نمایش داده می‌شود.
*/

.video-container:fullscreen video {
    width: 100%;
    height: 100%;


    max-height: none;

    object-fit: contain;

    background: #000;


}

/*
کنترل‌ها روی تصویر قرار می‌گیرند
*/

.video-container:fullscreen .player-controls {
    position: absolute;


    left: 0;
    right: 0;
    bottom: 0;

    z-index: 20;

    padding: 25px 25px 18px;

    background: linear-gradient(to top,
            rgba(0, 0, 0, .85),
            rgba(0, 0, 0, .45),
            transparent);

    transition:
        opacity .3s ease,
        transform .3s ease;

    opacity: 1;


}

/*
وقتی کنترل‌ها مخفی هستند
*/

.video-container:fullscreen.controls-hidden .player-controls {
    opacity: 0;


    transform: translateY(100%);

    pointer-events: none;


}

/*
وضعیت پخش در Fullscreen مخفی شود
*/

.video-container:fullscreen .status {
    display: none;
}

/*
پنل روشنایی روی تصویر
*/

.video-container:fullscreen .brightness-panel {
    position: absolute;


    bottom: 85px;
    right: 25px;

    z-index: 30;

    background: rgba(20, 20, 20, .75);

    backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, .1);


}

/* =========================
موبایل
========================= */

@media (max-width: 600px) {


    main {
        padding: 25px 10px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .input-box {
        flex-direction: column;
    }

    .input-box button {
        width: 100%;
        height: 50px;
    }

    .buttons-row {
        gap: 5px;
    }

    .control-btn {
        width: 38px;
        height: 36px;
    }

    .volume-slider {
        width: 70px;
    }

    .video-container:fullscreen .player-controls {
        padding: 20px 10px 12px;
    }


}