/**
 * Live Stream Page Styles
 * تصميم احترافي لصفحة البث المباشر
 */

/* ============================================
   Hero Section
   ============================================ */
.live-stream-page {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0f0f23 100%);
    min-height: 100vh;
}

.live-hero {
    padding: 40px 0 20px;
    background: linear-gradient(180deg, rgba(15, 15, 35, 0.9) 0%, transparent 100%);
}

.live-hero-content {
    color: #fff;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.live-badge.is-live {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #e74c3c;
    animation: live-pulse 2s infinite;
}

@keyframes live-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(231, 76, 60, 0);
    }
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

.live-badge.is-live .pulse-dot {
    background: #fff;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.badge-text {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.live-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, #a8a8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.live-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Video Player
   ============================================ */
.live-player-section {
    padding: 0 0 60px;
}

.live-player-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.live-player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.live-player-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Fullscreen styles */
.live-player-wrapper:fullscreen {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-player-wrapper:fullscreen .live-player-container {
    max-width: 100%;
    max-height: 100vh;
    padding-top: 0;
    height: 100vh;
    border-radius: 0;
}

/* ============================================
   Player Controls Overlay
   ============================================ */
.player-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.live-player-container:hover .player-controls-overlay {
    opacity: 1;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #e74c3c;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 1s infinite;
}

.views-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#speedBtn {
    width: auto;
    padding: 0 15px;
}

.speed-value {
    font-size: 12px;
    font-weight: 600;
}

/* Speed Menu */
.speed-menu {
    position: absolute;
    bottom: 100%;
    right: 20px;
    margin-bottom: 10px;
    background: rgba(20, 20, 40, 0.95);
    border-radius: 12px;
    padding: 10px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.speed-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.speed-menu-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    padding: 5px 10px;
    margin-bottom: 5px;
}

.speed-option {
    display: block;
    width: 100%;
    padding: 8px 15px;
    border: none;
    background: transparent;
    color: #fff;
    text-align: right;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
    font-size: 14px;
}

.speed-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.speed-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ============================================
   Stream Info Card
   ============================================ */
.stream-info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px 30px;
    backdrop-filter: blur(10px);
}

.stream-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stream-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.stream-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i {
    color: #667eea;
}

.stream-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-share,
.btn-external {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-share {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-external {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.btn-external:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* ============================================
   No Stream State
   ============================================ */
.no-stream-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-stream-content {
    text-align: center;
    padding: 60px 40px;
    max-width: 500px;
}

.no-stream-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.no-stream-icon i {
    font-size: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.no-stream-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.no-stream-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.social-follow {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.social-btn.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.social-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.social-btn.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .live-title {
        font-size: 2rem;
    }

    .live-player-container {
        border-radius: 12px;
    }

    .controls-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .live-hero {
        padding: 30px 0 15px;
    }

    .live-title {
        font-size: 1.6rem;
    }

    .live-description {
        font-size: 1rem;
    }

    .stream-info-card {
        padding: 20px;
    }

    .stream-title {
        font-size: 1.2rem;
    }

    .stream-actions {
        justify-content: center;
        width: 100%;
    }

    .btn-share,
    .btn-external {
        flex: 1;
        justify-content: center;
    }

    .player-controls-overlay {
        opacity: 1;
        padding: 15px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }

    #speedBtn {
        padding: 0 12px;
    }
}

@media (max-width: 576px) {
    .live-badge {
        padding: 6px 15px;
    }

    .badge-text {
        font-size: 12px;
    }

    .live-player-section {
        padding: 0 0 40px;
    }

    .live-player-container {
        border-radius: 8px;
    }

    .no-stream-content {
        padding: 40px 20px;
    }

    .no-stream-icon {
        width: 100px;
        height: 100px;
    }

    .no-stream-icon i {
        font-size: 40px;
    }

    .no-stream-title {
        font-size: 1.4rem;
    }

    .social-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* Override main container padding for this page */
.live-stream-page+footer,
.live-stream-page~footer {
    margin-top: 0;
}

main:has(.live-stream-page) {
    padding: 0 !important;
}

main:has(.live-stream-page)>.container {
    max-width: 100%;
    padding: 0;
}