/* player.css - تنسيقات المشغل المنفصلة */
:root {
    --ep-primary: #ff0000;
    --ep-background: #000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    background-color: var(--ep-background); 
    margin: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.elzem-player-wrapper { 
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

#ep-player-area { 
    flex: 1;
    background: #000;
    position: relative;
}

/* Top Header - Simple Design */
.ep-top-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    border-bottom: 0px solid #000000;
    height: 40px;
}

.ep-top-header > * {
    pointer-events: auto;
}

/* Player Controls Styling - Simple Header */
.ep-controls-overlay {
    display: flex;
    gap: 10px;
}

.ep-control-btn {
    background-color: #ff0000 !important;
    color: white; 
    border: none;
    cursor: pointer; 
    width: 40px; 
    height: 40px;
    border-radius: 5px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 18px; 
    transition: all 0.3s ease;
    font-weight: bold;
}

.ep-control-btn:hover { 
    background-color: #cc0000 !important;
    transform: scale(1.05);
}

.ep-logo-overlay {
    position: fixed;
    top: 35px !important;
    right: 55px !important;
    z-index: 1000;
    pointer-events: none;
}

.ep-logo-overlay img {
    height: 45px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.ep-logo-overlay:hover img {
    opacity: 1;
}

/* Server Buttons - Controlled from Admin Panel */
.ep-servers-container {
    background: #000000;
    padding: 5px;
    border-top: 0px solid #00000;
    z-index: 9998;
}

.ep-servers-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.ep-server-btn {
    background-color: #189107;
    color: #000000; 
    border: none;
    padding: 8px 8px;
    border-radius: 1px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.ep-server-btn:hover {
    background-color: #555;
}

.ep-server-btn.active {
    background-color: #ff0000;
    transform: translateY(-2px);
}

/* Share Modal - Fixed to not open automatically */
.ep-share-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.ep-share-modal.open {
    display: flex !important;
}

.ep-share-content {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    border: 2px solid #ff0000;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.ep-share-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.ep-social-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: transform 0.2s;
}

.ep-social-btn:hover {
    transform: translateY(-2px);
}

.ep-social-btn.whatsapp { background: #25D366; }
.ep-social-btn.facebook { background: #3b5998; }
.ep-social-btn.twitter { background: #1da1f2; }
.ep-social-btn.telegram { background: #0088cc; }

.ep-iframe-code {
    width: 100%;
    padding: 10px;
    background: #000;
    color: #fff;
    border: 1px solid #ff0000;
    border-radius: 5px;
    margin: 10px 0;
    font-family: monospace;
    resize: none;
}

/* Channel Title */
.ep-channel-title {
    color: white;
    font-size: 16px;
    font-weight: bold;
    margin: 0 15px;
    text-align: center;
    flex: 1;
}

/* Close button for modal */
.ep-modal-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff0000;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Additional Styles from your second CSS */
.ep-video-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

#ep-player-area,
#ep-player-area iframe,
#ep-player-area video {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.ep-poster {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 10;
}

.ep-logo {
    position: absolute;
    top: 15px; left: 15px;
    z-index: 20;
    max-width: 120px;
    opacity: 0.8;
}

.ep-logo img {
    max-width: 100%;
    height: auto;
}

/* Server Buttons Enhanced */
.ep-servers-bar { 
    padding: 8px; 
    background-color: #000; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    justify-content: flex-start; 
    box-sizing: border-box; 
    direction: ltr;
}

.server-btn {
    position: relative;
    padding: 10px 17px;
    background-color: transparent;
    color: #fff;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    transform-origin: center;
    z-index: 1;
}

.server-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 4px;
    border-radius: inherit;
    background: linear-gradient(270deg, red, orange, yellow, green, cyan, blue, violet);
    background-size: 400% 400%;
    animation: borderMove 6s linear infinite;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: -1;
}

@keyframes borderMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Top Bar & Actions */
.ep-actions-fixed {
    position: absolute;
    top: 1px;
    right: 1px;
    display: flex;
    gap: 10px;
    z-index: 90; 
    flex-direction: row;
    pointer-events: auto;
}

.ep-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    flex-shrink: 0;
}

.ep-actions-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 100;
    flex-direction: row;
}

.ep-action-btn {
    background: #fa0000;
    border: 1px solid #9f3922;
    font-size: 18px;
    color: #fff;
    padding: 3px 5px;
    cursor: pointer;
    border-radius: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ep-action-btn .dashicons {
    font-family: dashicons;
}

/* Content Box */
.ep-content-box {
    padding: 15px;
    text-align: center;
    background-color: #1a1a1a;
    color: #fff;
    flex-shrink: 0;
}

.ep-content-box h3 {
    margin: 0 0 5px 0;
}

.ep-content-box p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.ep-content-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--ep-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

/* Ads */
.elzem-ad-before-video,
.elzem-ad-after-video {
    text-align: center;
    padding: 5px;
}

#ep-overlay-ad {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.5);
}

.ep-overlay-content {
    position: relative;
}

#ep-overlay-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: black;
    color: white;
    border: 1px solid white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 25px;
    text-align: center;
    z-index: 51;
}