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

/* Theme variables */
:root {
    /* Light theme (default) */
    --bg-color: white;
    --text-color: #333;
    --header-bg: #fff;
    --header-border: #eee;
    --link-color: #0077cc;
    --link-hover: #005fa3;
    --video-item-bg: #f9f9f9;
    --video-item-shadow: rgba(0, 0, 0, 0.1);
}

/* Dark theme */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --header-border: #333;
    --link-color: #64b5f6;
    --link-hover: #90caf9;
    --video-item-bg: #262626;
    --video-item-shadow: rgba(0, 0, 0, 0.3);
}

body {
    background-color: var(--bg-color);
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

/* Header styles to match main page */
.main-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.main-header nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-header nav li {
    padding: 0;
}

.main-header nav a {
    display: block;
    padding: 1rem 2rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.main-header nav a:hover {
    background-color: rgba(128, 128, 128, 0.1);
    color: var(--link-hover);
}

.main-header nav li.active a {
    color: var(--link-color);
    border-bottom: 3px solid var(--link-color);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--link-color);
}
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 70px 20px 20px; /* Added top padding to account for fixed header */
}
.video-item {
    flex: 0 1 calc(33.33% - 20px);
    box-sizing: border-box;
    padding: 10px;
    background-color: var(--video-item-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--video-item-shadow);
    transition: background-color 0.3s, box-shadow 0.3s;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 10px;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.description {
    font-size: 14px;
    color: var(--text-color);
    transition: color 0.3s;
    padding-left: 10px;
}

h1, h2, h3 {
    color: var(--text-color);
    transition: color 0.3s;
}
@media (max-width: 768px) {
    .video-item {
        flex: 1 1 100%;
    }
}
