/* styles.css */

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --header-bg: #f0f0f0;
    --section-bg: #ffffff;
    --border-color: #ddd;
    --shadow: rgba(0, 0, 0, 0.1);
}

.dark-mode {
    --bg-color: #121212;
    --text-color: #ffffff;
    --header-bg: #1e1e1e;
    --section-bg: #1e1e1e;
    --border-color: #333;
    --shadow: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: var(--header-bg);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Main Video Section */
.main-video-section {
    margin-bottom: 2.5rem;
    background-color: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s;
}

.main-video-section h2 {
    text-align: center;
    margin: 0 0 1rem 0;
    font-size: 1.6rem;
}

.iframe-wrapper.main {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
}

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

.stats.main {
    margin-top: 1rem;
    text-align: center;
    min-height: 80px;
    font-size: 1rem;
    color: var(--text-color);
}

/* Secondary Videos Grid */
.secondary-videos {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.video-section.small {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    background-color: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 3px 8px var(--shadow);
    transition: all 0.3s;
}

.video-section.small h3 {
    text-align: center;
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
}

.iframe-wrapper.small {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 1px 6px var(--shadow);
}

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

.stats.small {
    margin-top: 0.75rem;
    text-align: center;
    min-height: 60px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .secondary-videos {
        flex-direction: column;
        align-items: center;
    }

    .video-section.small {
        max-width: 500px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 0.5rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    main {
        padding: 1rem;
    }

    .main-video-section {
        padding: 1rem;
    }
}

/* System Preference */
@media (prefers-color-scheme: dark) {
    :root:not(.dark-mode):not([data-theme="light"]) {
        --bg-color: #121212;
        --text-color: #ffffff;
        --header-bg: #1e1e1e;
        --section-bg: #1e1e1e;
        --border-color: #333;
        --shadow: rgba(0, 0, 0, 0.4);
    }
}
