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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.3s, color 0.3s;
}

body.light-mode {
    background: #f0f0f0;
    color: #111;
}
body.dark-mode {
    background: #121212;
    color: #eee;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #1a73e8;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1005;
    gap: 10px;
}

.home-icon {
    height: 30px;
}

.settings-icon {
    height: 25px;
}

.header h1 {
    flex-grow: 1;
    text-align: center;
    font-size: 1.5rem;
}

.header button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
}

.header a {
    display: flex;
    align-items: center;
}

.sidebar {
    position: fixed;
    top: 52px;
    left: -250px;
    width: 250px;
    height: 100%;
    background: #1e1e1e;
    color: #fff;
    padding: 0 10px;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 999;
}

.sidebar.open {
    left: 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 15px 0;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    background: #3b3b3b;
    transition: background 0.2s;
}

.sidebar ul li:hover {
    background: #333;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    z-index: 500;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.overlay.on {
    opacity: 1;
    pointer-events: auto;
}

.container {
    padding: 20px;
    transition: margin-left 0.3s;
}

.section-header h2 {
    margin-bottom: 15px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 15px;
}

.video-grid a {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s;
}

body.dark-mode .video-grid a {
    background: #1f1f1f;
}

.video-grid a:hover {
    transform: scale(1.05);
}

.video-grid img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
}

.video-grid p {
    padding: 10px;
    text-align: center;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    right: -300px;
    top: 54px;
    width: 150px;
    height: 100%;
    background: #2b2b2b;
    color: #fff;
    padding: 20px;
    transition: right 0.3s ease;
    z-index: 1001;
}

.settings-panel.open {
    right: 0;
}

.settings-panel h2 {
    margin-bottom: 15px;
}

.settings-panel label {
    display: block;
    margin: 10px 0;
}

.settings-panel button {
    margin-top: 20px;
    padding: 10px;
    width: 100%;
    border: none;
    cursor: pointer;
    background: #1a73e8;
    color: #fff;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.2rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    }
}
