:root {
    /* 🎨 Color Palette (Teb3an l-alwan dyal Logo dyalek) */
    --bg-color: #e9edee;
    /* Background color (Light Gray) */
    --card-bg: #ffffff;
    /* Card/Container background (White) */
    /* Loun l-Azzra9/Tarkwaz (Accent/Line Color) */
    --primary-color: #06a79f;
    --text-main: #3c3e4a;
    /* Text color (Dark Charcoal) */
    --text-muted: #666666;
    --glow: 0 0 15px rgba(6, 167, 159, 0.4);
    /* Glow for active elements */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header / Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: var(--card-bg);
    /* White Navbar */
    border-bottom: 3px solid var(--primary-color);
    /* Strong Teal Line */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 80px;
}

.logo-container {
    height: 100%;
    width: 75px;
    display: flex;
    align-items: center;
}

.site-logo {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.live-badge {
    background-color: var(--primary-color);
    color: var(--card-bg);
    /* White text on Teal */
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: white;
    /* White dot inside Teal badge */
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* --- Main Content --- */
.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Video Player Wrapper --- */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid var(--card-bg);
    margin-bottom: 20px;
}

.video-wrapper.live-active {
    border: 4px solid var(--primary-color);
    /* Teal border when active */
}

video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Overlay for Loading/Offline */
.state-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.95);
    /* Semi-transparent black overlay */
    z-index: 10;
    text-align: center;
    padding: 20px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
    /* Teal spinner */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.error-details {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 10px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* --- New Info Section (Donation/Social) --- */
.info-panel {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.donation-text {
    font-size: 1.1rem;
    line-height: 1.8;
    /* Zedt l-line height bach yji l-qraya mri7a */
    margin-bottom: 20px;
    /* 🚫 Hayedna border-bottom li kan dashed bach nkhaliw l-design nqi */
    padding-bottom: 15px;
    text-align: justify;
    /* Bach l-paragraphes yjiw msetfin */
}

.donation-number {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    direction: ltr;
    /* WhatsApp number is LTR */
    display: block;
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
}

.social-links a {
    color: var(--text-main);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-links a:hover {
    color: var(--primary-color);
}

.social-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid #ddd;
    margin-top: auto;
    /* Push to the bottom */
    width: 100%;
}

i {
    font-size: 20px;
}

.video-watermark {
    position: absolute;
    left: 50%;
    bottom: 0px;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    opacity: 0.85;
}

.video-watermark img {
    max-width: 300px;
    width: 100%;
    height: auto;
}

/* Fullscreen styles */
.video-wrapper:fullscreen,
.video-wrapper:-webkit-full-screen,
.video-wrapper:-moz-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    padding-top: 0 !important;
    border-radius: 0 !important;
}

.video-wrapper:fullscreen video,
.video-wrapper:-webkit-full-screen video,
.video-wrapper:-moz-full-screen video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.video-wrapper:fullscreen .video-watermark,
.video-wrapper:-webkit-full-screen .video-watermark,
.video-wrapper:-moz-full-screen .video-watermark {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 2147483647 !important;
    opacity: 0.85 !important;
}


/* --- Responsive --- */
@media (max-width: 768px) {
    nav {
        height: 65px;
        padding: 10px 5%;
    }

    .site-logo {
        max-height: 40px;
    }

    .offline-message {
        font-size: 1.2rem;
    }

    .info-panel {
        padding: 20px;
        margin: 20px auto;
    }

    .donation-text {
        font-size: 1rem;
    }

    .social-links {
        gap: 15px;
    }
}