html {
    scrollbar-gutter: stable;
}

:root {
    --bg-color: #FEFCFF;
    --text-color: #333;
    --accent-color: #7D4CBA;
    --border-color: #e5e5e5;
    --font-heading: 'Oleo Script', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition-speed: 0.3s;
    --sidebar-bg: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Transition Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Google Fonts Icon */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;

    /* Prevent layout shift */
    width: 24px;
    height: 24px;
    overflow: hidden;
    flex-shrink: 0;

    /* FOUT Fix: Hide initially, reveal when loaded */
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.fonts-loaded .material-symbols-outlined {
    opacity: 1;
}

/* =========================================
   LIVESTREAM PAGE SPECIFIC STYLES
   ========================================= */
.livestream-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.livestream-header {
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--sidebar-bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.livestream-header .logo {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.livestream-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.livestream-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(125, 76, 186, 0.04);
}

.stream-title {
    font-size: 3rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 12px;
}

.stream-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
    margin-bottom: 30px;
}

/* Video player iframe container */
.stream-player-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stream-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.stream-direct-link {
    text-align: center;
    margin-bottom: 35px;
    font-size: 0.9rem;
    color: #666;
}

.stream-direct-link a {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-speed);
}

.stream-direct-link a:hover {
    text-decoration: underline;
}

/* Schedule */
.stream-schedule {
    margin-bottom: 40px;
}

.stream-schedule h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.schedule-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background-color: #faf7fd;
    border: 1px solid #f0e8f7;
    border-radius: 8px;
    padding: 20px;
}

.schedule-time-badge {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: #F3E8FF;
    color: var(--accent-color);
    text-transform: uppercase;
    white-space: nowrap;
}

.schedule-details h3 {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.schedule-details .time {
    font-size: 0.95rem;
    color: #444;
    font-weight: 500;
    margin-bottom: 4px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .livestream-header {
        padding: 15px 20px;
    }

    .livestream-header .logo {
        font-size: 1.8rem;
    }

    .livestream-container {
        padding: 20px 15px;
    }

    .livestream-card {
        padding: 25px 20px;
    }

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

    .schedule-item {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
}