/* =============================================
   AlbaPlayer - Frontend Player Styles
   ============================================= */

:root {
    --alba-primary:   #e8232a;
    --alba-secondary: #f0a500;
    --alba-dark:      #0d0f14;
    --alba-dark2:     #161921;
    --alba-border:    #2f3447;
    --alba-text:      #e8eaf0;
    --alba-text2:     #9da3b4;
    --alba-radius:    8px;
}

/* =============================================
   WRAPPER
   ============================================= */
.alba-player-wrapper {
    background: #000;
    border-radius: var(--alba-radius);
    overflow: hidden;
    margin: 0 0 20px;
    position: relative;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
}

/* =============================================
   COPYRIGHT BAR
   ============================================= */
.alba-copyright-bar {
    background: rgba(0,0,0,.7);
    padding: 5px 14px;
    text-align: left;
    font-size: 12px;
    position: relative;
    z-index: 5;
}

.alba-copyright-bar a {
    color: var(--alba-primary);
    text-decoration: none;
    font-weight: 600;
}

/* =============================================
   SERVER TABS
   ============================================= */
.alba-server-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    background: #111;
    padding: 6px 8px;
    border-bottom: 1px solid #222;
}

.alba-server-tab {
    padding: 6px 16px;
    background: #222;
    border: 1px solid #333;
    border-radius: 4px;
    color: #ccc;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    font-family: inherit;
    white-space: nowrap;
}

.alba-server-tab:hover {
    background: #333;
    color: #fff;
}

.alba-server-tab.active {
    background: var(--alba-primary);
    border-color: var(--alba-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(232,35,42,.3);
}

.alba-server-tab.loading {
    opacity: .6;
    cursor: wait;
}

/* =============================================
   PLAYER CONTAINER
   ============================================= */
.alba-player-container {
    position: relative;
    background: #000;
    min-height: 360px;
}

/* The player element (16:9) */
.alba-player-el {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.alba-player-el video,
.alba-player-el .plyr,
.alba-player-el .clappr-player,
.alba-player-el #dplayer {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

/* iframe embed */
.alba-iframe-wrap {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.alba-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Code embed */
.alba-code-player { background: #000; min-height: 300px; }

/* Loading spinner */
.alba-player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 2;
}

.alba-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: var(--alba-primary);
    border-radius: 50%;
    animation: alba-spin .8s linear infinite;
    display: block;
}

@keyframes alba-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* =============================================
   CONTROLS BAR
   ============================================= */
.alba-controls-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #111;
    padding: 8px 14px;
    border-top: 1px solid #222;
    flex-wrap: wrap;
}

.alba-ctrl-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #222;
    border: 1px solid #333;
    border-radius: 4px;
    color: #ccc;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    font-family: inherit;
}

.alba-ctrl-btn:hover {
    background: #333;
    color: #fff;
}

.alba-ctrl-btn svg { flex-shrink: 0; }

.alba-player-label {
    margin-right: auto;
    font-size: 12px;
    color: #555;
    font-weight: 600;
}

/* =============================================
   ADS
   ============================================= */
.alba-ad {
    text-align: center;
    background: #0a0a0a;
    padding: 8px;
    clear: both;
}

/* Overlay Ad */
.alba-ad-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 50;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
}

.alba-ad-overlay-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.alba-ad-overlay-close:hover { background: var(--alba-primary); }

.alba-ad-overlay-content { max-width: 600px; width: 100%; }

/* =============================================
   TELEGRAM BOX
   ============================================= */
.alba-telegram-box {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-top: 1px solid #26a5e4;
    padding: 16px;
    position: relative;
}

.alba-telegram-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.alba-telegram-icon {
    color: #26a5e4;
    flex-shrink: 0;
}

.alba-telegram-text {
    flex: 1;
    min-width: 180px;
}

.alba-telegram-text h4 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.alba-telegram-text p {
    font-size: 12px;
    color: #aaa;
    margin: 0;
    line-height: 1.5;
}

.alba-telegram-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 22px;
    background: #26a5e4;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s;
    font-family: inherit;
    flex-shrink: 0;
}

.alba-telegram-btn:hover { background: #1a90cc; color: #fff; }

.alba-telegram-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,.1);
    border: none;
    color: #aaa;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: .2s;
}

.alba-telegram-close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* =============================================
   PLYR OVERRIDES
   ============================================= */
.alba-player-el .plyr--video { height: 100%; }

.plyr--video .plyr__control:hover,
.plyr__control--overlaid:hover {
    background: var(--alba-primary) !important;
}

.plyr--full-ui input[type=range] {
    color: var(--alba-primary) !important;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
    .alba-server-tab { padding: 5px 10px; font-size: 12px; }
    .alba-telegram-inner { flex-direction: column; text-align: center; }
    .alba-telegram-btn { width: 100%; justify-content: center; }
    .alba-controls-bar { padding: 6px 10px; }
}
