* {
    user-select: none; /* منع تحديد النصوص */
    -webkit-user-select: none; /* لمتصفح Safari وChrome */
    -moz-user-select: none; /* لمتصفح Firefox */
    -ms-user-select: none; /* لمتصفح IE/Edge */
    /* لمنع تأثير اللمس الأزرق على أي عنصر */
    -webkit-tap-highlight-color: transparent; /* Safari / Chrome على الموبايل */
    -webkit-touch-callout: none; /* لمنع القوائم عند لمس النصوص في iOS */
}
/* منع تأثير تحديد النص (highlight) عند السحب */
*::selection {
    background: transparent; /* يلغي اللون الأزرق */
}

#player-container {
    position: relative;
    width: 700px;
    max-width: 95%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 4;
    transition: background 0.6s ease;
    cursor: pointer;
}

/* الستارة العلوية المحسنة */
/* الستارة العلوية بشكل Shadow */
#topOverlay {
    position: absolute;
    top: 12px;
    left: 20px;
    width: 60px;
    height: 60px; /* أو حسب رغبتك */
    border-radius: 50%;
    backdrop-filter: blur(15px); /* بلور قوي لكن أنعم */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.322),
        transparent
    ); /* الظل يتلاشى للأسفل */
    z-index: 5; /* فوق overlay وتحت controls */
}

#topOverlay img {
    width: 100%;
    border-radius: 50%;
    overflow: hidden;
}

@media only screen and (max-width: 500px) {
    #topOverlay {
        top: 10px;
        left: 10px;
        border-radius: 50%;
        width: 50px;
        height: 50px; /* أو حسب رغبتك */
        backdrop-filter: blur(15px); /* بلور قوي لكن أنعم */
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.322),
            transparent
        ); /* الظل يتلاشى للأسفل */
        z-index: 5; /* فوق overlay وتحت controls */
    }
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(15px); /* بلور قوي */
    background: rgba(0, 0, 0, 0.7); /* أسود ضبابي */
    display: flex;
    flex-direction: column;
    padding: 5px 10px;
    gap: 5px;
    font-size: 14px;
    z-index: 5;
    opacity: 0;
    /* transition: opacity 0.2s ease; */
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.progress {
    width: 0%;
    height: 100%;
    background: #ffffff;
    border-radius: 5px;
    transition: width 0.1s linear;
}

.tooltip-time {
    position: absolute;
    bottom: 110%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 5px;
    font-size: 11px;
    border-radius: 3px;
    display: none;
    white-space: nowrap;
    pointer-events: none;
}

.bottom-controls {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
}

.left-controls,
.right-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.2);
}

.time {
    font-size: 13px;
    color: #ccc;
    min-width: 70px;
    text-align: center;
}

.volume-slider {
    width: 60px;
    cursor: pointer;
    background-color: aqua !important;
}

.settings-menu {
    position: absolute;
    bottom: 45px;
    right: 10px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.settings-menu select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 3px 5px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .control-btn {
        font-size: 20px;
    }
    .volume-slider {
        width: 45px;
    }
    .time {
        font-size: 11px;
    }
}

/* زر التشغيل المركزي */
#middleBtn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px #fff solid;
    background: rgba(0, 0, 0);
    color: white;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    cursor: pointer;
    z-index: 6;
    transition:
        transform 0.2s,
        opacity 0.3s;
    opacity: 1;
}

#middleBtn:hover {
    transform: translate(-50%, -50%) scale(1.1);
}
