/*
Theme Name: YouTube Brand Style Theme Final
Theme URI: https://example.com/
Author: Mandeep Singh
Description: Final YouTube-style theme with live search, thumbnails only in cards, and day/night toggle.
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: style-theme
*/

:root {
    --yt-bg: #0f0f0f;
    --yt-surface: #181818;
    --yt-surface-alt: #202020;
    --yt-primary: #ff0000;
    --yt-accent: #3ea6ff;
    --yt-text-main: #ffffff;
    --yt-text-muted: #aaaaaa;
}

:root[data-theme="light"] {
    --yt-bg: #f9f9f9;
    --yt-surface: #ffffff;
    --yt-surface-alt: #f1f1f1;
    --yt-primary: #ff0000;
    --yt-accent: #065fd4;
    --yt-text-main: #0f0f0f;
    --yt-text-muted: #606060;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--yt-bg);
    color: var(--yt-text-main);
}

a { color: var(--yt-accent); text-decoration: none; }

a:hover { text-decoration: underline; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    background-color: var(--yt-surface-alt);
    border-bottom: 1px solid #303030;
}

.brand-mark { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.04em; }

.brand-icon {
    width: 26px; height: 18px; border-radius: 4px; background: var(--yt-primary); position: relative;
}

.brand-icon::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-40%, -50%);
    border-style: solid;
    border-width: 5px 0 5px 9px;
    border-color: transparent transparent transparent #ffffff;
}

.brand-text { font-size: 18px; }

.search-form { max-width: 480px; width: 100%; display: flex; }

.search-form input[type="search"] {
    flex: 1; padding: 8px 10px;
    border: 1px solid #303030; border-right: none;
    background-color: #121212; color: var(--yt-text-main);
}

:root[data-theme="light"] .search-form input[type="search"] { background-color: #ffffff; }

.search-form button {
    padding: 8px 16px; border: 1px solid #303030;
    background-color: #303030; color: var(--yt-text-main); cursor: pointer;
}

.header-right { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.theme-toggle {
    padding: 6px 10px; border-radius: 999px; border: 1px solid #303030;
    background: transparent; color: var(--yt-text-main);
    cursor: pointer; font-size: 12px;
}

.site-shell { display: flex; min-height: calc(100vh - 52px); }

.sidebar { width: 240px; background-color: var(--yt-surface-alt); padding: 12px 8px; }

.sidebar nav ul { list-style: none; padding: 0; margin: 0; }

.sidebar nav li { border-radius: 8px; }

.sidebar nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px; color: var(--yt-text-main); font-size: 14px;
}

.sidebar nav li:hover { background: #383838; }

.content-area { flex: 1; padding: 16px; }

.section-heading { font-size: 18px; margin: 8px 0 16px; }

.video-grid {
    display: grid;
        grid-template-columns: repeat(3, 1fr);
    /*grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));*/
    gap: 16px;
	padding:20px 15px;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.video-card { background-color: var(--yt-surface); border-radius: 12px; overflow: hidden; }

.video-thumb {
    position: relative; background: #000; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
}

.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-duration {
    position: absolute; right: 6px; bottom: 6px;
    padding: 2px 4px; font-size: 11px;
    background: rgba(0,0,0,0.8); border-radius: 3px;
}

.video-meta-shell { display: flex; padding: 10px 12px 12px; gap: 10px; }

.channel-avatar { width: 36px; height: 36px; border-radius: 50%; background: #555; }

.video-text-block { flex: 1; }

.video-title { font-size: 14px; font-weight: 500; margin: 0 0 4px; }

.video-meta { font-size: 12px; color: var(--yt-text-muted); }

.single-shell {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1.2fr);
    gap: 16px;
}

.player-shell { background: #000; border-radius: 12px; overflow: hidden; }

.player-shell iframe,
.player-shell video,
.player-shell img { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; object-fit: cover; }

.single-title { font-size: 20px; margin: 12px 0 6px; }

.single-meta { font-size: 13px; color: var(--yt-text-muted); margin-bottom: 12px; }

.single-content { font-size: 14px; line-height: 1.6; }

.sidebar-right h3 { font-size: 14px; margin: 0 0 8px; }

.sidebar-right .video-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); }

.sidebar-right .video-meta-shell { padding: 6px 8px; }

.sidebar-right .video-title { font-size: 13px; }

.site-footer {
    padding: 16px; text-align: center; font-size: 13px;
    color: var(--yt-text-muted); background-color: var(--yt-surface-alt);
}

@media (max-width: 900px) {
    .site-shell { flex-direction: column; }
    .sidebar { width: 100%; display: flex; overflow-x: auto; }
    .sidebar nav ul { display: flex; gap: 4px; }
    .single-shell { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 100px) {
    .brand-text { display: none; }
    .search-form { max-width: 20px; }
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-text-block {
    display: flex;
    flex-direction: column; /* stack title + tagline */
}

.brand-mark img {
    max-height: 40px;
    width: auto;
}
body.category .video-thumb {
    display: none;
}
.sidebar-right article{margin-bottom:10px; border:1px solid #222;}