:root { 
    --yt-bg: #0f172a; 
    --card-bg: #1e293b; 
    --text: #f8fafc; 
    --dim: #94a3b8; 
    --hover-bg: #334155; 
    --accent: #38bdf8; 
    --error: #ef4444;
    --success: #10b981;
    --yt-red: #ff0000;
    --yt-like: #3ea6ff;
    
    /* Appended from new styles */
    --bg: #020617;
    --border: rgba(148, 163, 184, 0.35);
    --accent-soft: rgba(56, 189, 248, 0.15);
    --accent-strong: #0ea5e9;
    --text-soft: #9ca3af;
    --text-softer: #6b7280;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
}

body {
    margin: 0;
    padding: 0;
    background: var(--yt-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    overflow-x: hidden;
}

.yt-layout { 
    display: block; 
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

.yt-main { 
    margin-left: 300px !important; 
    padding: 10px 90px 20px 30px !important; 
    max-width: none !important; 
    width: calc(100% - 300px) !important; 
    box-sizing: border-box; 
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
}

@media (max-width: 768px) { 
    .yt-main { 
        margin-left: 0 !important; 
        width: 100% !important; 
        padding: 20px !important;
    } 
}

/* ==========================================================================
   HEADER / BRAND FIXES (Removed 'order' logic to prevent bottom alignment)
   ========================================================================== */
.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.logo-circle {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0%, #38bdf8, transparent 55%),
        radial-gradient(circle at 70% 100%, #0ea5e9, transparent 55%),
        linear-gradient(145deg, #020617, #0b1120);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.6), 0 18px 45px rgba(15, 23, 42, 0.95);
}

.logo-circle span {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #e5f2ff
}

.brand-text {
    display: flex;
    flex-direction: column
}

.brand-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-soft)
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

/* SHORTS GRID */
.shorts-grid { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 12px; 
    margin-bottom: 40px; 
}

@media (max-width: 1400px) { 
    .shorts-grid { grid-template-columns: repeat(4, 1fr); } 
}

@media (max-width: 1200px) { 
    .shorts-grid { grid-template-columns: repeat(3, 1fr); } 
}

@media (max-width: 992px) { 
    .shorts-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 576px) { 
    .shorts-grid { grid-template-columns: 1fr; } 
}

/* VIDEO GRID */
.video-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
}

@media (max-width: 1400px) { 
    .video-grid { grid-template-columns: repeat(3, 1fr); } 
}

@media (max-width: 992px) { 
    .video-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 576px) { 
    .video-grid { grid-template-columns: 1fr; } 
}

/* VIDEO CARD */
.v-card { 
    position: relative; 
    transition: transform 0.2s, box-shadow 0.2s; 
    display: flex; 
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid #334155;
    height: 340px;
    cursor: pointer;
}

.v-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.v-card.menu-open { 
    z-index: 100;
    overflow: visible;
} 

.v-thumb { 
    display: block; 
    width: 100%; 
    height: 180px;
    background: #000; 
    position: relative; 
    overflow: hidden;
}

.v-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s;
    background: #1e293b;
}

.v-thumb:hover img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.v-thumb:hover .play-button {
    opacity: 1;
}

.play-button svg {
    width: 30px;
    height: 30px;
    fill: white;
    margin-left: 4px;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
}

.v-info { 
    padding: 12px 12px 8px 12px;
    display: flex; 
    gap: 8px;
    position: relative; 
    flex-grow: 1;
    min-height: 120px;
}

.v-details { 
    flex: 1; 
    min-width: 0; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.v-title { 
    display: block; 
    color: var(--text); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box; 
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; 
    overflow: hidden;
    transition: color 0.2s;
    max-height: 2.6em;
    cursor: pointer;
}

.v-title:hover {
    color: var(--accent);
}

.v-channel { 
    font-size: 0.85rem;
    color: var(--dim); 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}

.v-meta {
    font-size: 0.8rem;
    color: var(--dim);
    margin-top: 4px;
    display: flex;
    gap: 6px;
    align-items: center;
}

/* MENU BUTTON */
.v-menu-btn { 
    background: none; 
    border: none; 
    color: var(--text); 
    cursor: pointer; 
    padding: 4px;
    border-radius: 50%; 
    opacity: 0.7; 
    flex-shrink: 0; 
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.v-menu-btn:hover { 
    opacity: 1; 
    background: var(--hover-bg); 
}

/* DROPDOWN MENU */
.v-dropdown { 
    position: absolute; 
    top: 40px; 
    right: 0; 
    background: #1e293b; 
    border: 1px solid #334155; 
    border-radius: 12px; 
    padding: 8px 0; 
    width: 200px; 
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    display: none; 
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.v-dropdown.show { 
    display: block; 
}

.v-item { 
    padding: 8px 12px;
    display: flex; 
    align-items: center; 
    gap: 10px;
    cursor: pointer; 
    color: #e2e8f0; 
    font-size: 0.85rem;
    transition: background 0.2s;
}

.v-item:hover { 
    background: #334155; 
}

.v-item svg { 
    width: 18px;
    height: 18px;
    fill: currentColor; 
    flex-shrink: 0;
}

/* SHORTS CARD */
.short-card { 
    position: relative; 
    transition: transform 0.2s, box-shadow 0.2s; 
    display: flex; 
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid #334155;
    height: 380px;
    cursor: pointer;
}

.short-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.short-thumb { 
    display: block; 
    width: 100%; 
    height: 280px;
    background: #000; 
    position: relative; 
    overflow: hidden;
}

.short-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s;
    background: #1e293b;
}

.short-thumb:hover img {
    transform: scale(1.05);
}

.short-info { 
    padding: 12px;
    display: flex; 
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.short-title { 
    color: var(--text); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box; 
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; 
    overflow: hidden;
    max-height: 2.6em;
}

.short-channel { 
    font-size: 0.8rem;
    color: var(--dim); 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.short-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    z-index: 10;
    font-weight: bold;
}

.view-count {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    z-index: 10;
}

.embeddable-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    z-index: 10;
    font-weight: bold;
}

/* VIDEO PLAYER MODAL */
.video-player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
}

.video-player-modal.active {
    display: block;
}

.video-player-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.video-player-main {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

@media (max-width: 992px) {
    .video-player-main {
        grid-template-columns: 1fr;
    }
}

.video-player-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-player-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: white;
    flex-direction: column;
    gap: 15px;
}

.video-player-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.video-info-section {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-top: 15px;
    border: 1px solid #334155;
}

.video-title-modal {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.video-stats-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
}

.video-channel-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
}

.channel-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--accent);
}

.channel-details {
    flex: 1;
}

.channel-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.channel-subs {
    font-size: 0.85rem;
    color: var(--dim);
}

.subscribe-btn {
    background: var(--yt-red);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.subscribe-btn:hover {
    background: #cc0000;
}

.video-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.video-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hover-bg);
    border: 1px solid #334155;
    color: var(--text);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.video-action-btn:hover {
    background: #334155;
}

.video-action-btn.active {
    background: var(--yt-like);
    color: white;
    border-color: var(--yt-like);
}

.video-action-btn svg {
    width: 20px;
    height: 20px;
}

.video-description {
    background: var(--hover-bg);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
}

.video-description pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: inherit;
}

/* RECOMMENDED VIDEOS SIDEBAR */
.recommended-videos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommended-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.recommended-video {
    display: flex;
    gap: 12px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.recommended-video:hover {
    background: var(--hover-bg);
}

.recommended-thumb {
    width: 120px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.recommended-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-info {
    flex: 1;
    min-width: 0;
}

.recommended-video-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommended-channel {
    font-size: 0.8rem;
    color: var(--dim);
    margin-bottom: 4px;
}

.recommended-stats {
    font-size: 0.75rem;
    color: var(--dim);
}

/* MODAL CONTROLS */
.video-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10000;
    transition: background 0.2s;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.video-modal-menu {
    position: absolute;
    top: 20px;
    right: 70px;
    z-index: 10000;
}

.video-modal-menu-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-modal-menu-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.video-modal-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 8px 0;
    width: 200px;
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
}

.video-modal-dropdown.show {
    display: block;
}

/* PLAYER CONTROLS */
.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-player-wrapper:hover .player-controls {
    opacity: 1;
}

.play-pause-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.time-display {
    color: white;
    font-size: 0.9rem;
    font-family: monospace;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.progress {
    height: 100%;
    background: var(--yt-red);
    width: 0%;
    transition: width 0.1s;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.volume-slider {
    width: 80px;
    opacity: 0;
    transition: opacity 0.3s;
}

.volume-control:hover .volume-slider {
    opacity: 1;
}

.fullscreen-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

/* SHORTS PLAYER MODAL - INFINITE SCROLL VERSION */
.shorts-player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    overflow: hidden;
}

.shorts-player-modal.active {
    display: block;
}

.shorts-player-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.shorts-video-player {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shorts-video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.shorts-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.shorts-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    pointer-events: auto;
}

.shorts-video-info {
    color: white;
    margin-bottom: 20px;
}

.shorts-channel-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.shorts-video-title {
    font-size: 1rem;
    margin-bottom: 10px;
}

.shorts-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #ccc;
}

.shorts-actions {
    position: absolute;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.shorts-action-btn {
    background: none;
    border: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.2s;
    pointer-events: auto;
}

.shorts-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.shorts-action-btn svg {
    width: 28px;
    height: 28px;
    margin-bottom: 5px;
}

.shorts-action-count {
    font-size: 0.8rem;
    color: #ccc;
}

.shorts-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10;
    pointer-events: auto;
}

.shorts-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.shorts-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.shorts-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.like-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.like-animation.active {
    opacity: 1;
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Progress bar for video */
.shorts-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.shorts-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.1s linear;
}

/* Volume control */
.shorts-volume {
    position: absolute;
    right: 80px;
    top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.shorts-volume-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shorts-volume-slider {
    width: 80px;
    opacity: 0;
    transition: opacity 0.3s;
}

.shorts-volume:hover .shorts-volume-slider {
    opacity: 1;
}

/* Infinite scroll loading indicator */
.shorts-loading-more {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 100;
    display: none;
}

.shorts-loading-more.active {
    display: block;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.section-header h3 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.refresh-btn {
    background: var(--hover-bg);
    border: 1px solid #334155;
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: var(--accent);
    color: #000;
}

.no-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--dim);
    font-size: 1rem;
    grid-column: 1 / -1;
}

.api-status {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.api-status.connected {
    border-color: #10b981;
    color: #10b981;
}

.api-status.disconnected {
    border-color: #ef4444;
    color: #ef4444;
}

.sentinel { 
    height: 80px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--dim); 
    padding: 20px;
    margin-top: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--hover-bg);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.end-of-list {
    text-align: center;
    padding: 30px 20px;
    color: var(--dim);
    font-style: italic;
    grid-column: 1 / -1;
    border-top: 1px solid #334155;
    margin-top: 20px;
}

.load-more-btn {
    display: block;
    margin: 30px auto;
    padding: 12px 24px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    background: var(--dim);
    cursor: not-allowed;
    transform: none;
}

/* Video Quality Selector */
.quality-selector {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.quality-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #334155;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.quality-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.quality-dropdown {
    position: absolute;
    top: 40px;
    left: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 0;
    min-width: 120px;
    z-index: 11;
    display: none;
}

.quality-dropdown.show {
    display: block;
}

.quality-option {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.quality-option:hover {
    background: #334155;
}

.quality-option.active {
    color: var(--accent);
    font-weight: 600;
}

/* style.css - QTP Videos Styles */

.qtp-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.qtp-modal[aria-hidden="false"] {
    display: block;
}

.qtp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.qtp-modal-panel {
    position: relative;
    max-width: 520px;
    margin: 8vh auto;
    background: rgba(2, 6, 23, .98);
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .85);
    overflow: hidden;
}

.qtp-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.qtp-modal-title {
    font-weight: 700;
    color: #e5e7eb;
}

.qtp-modal-sub {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.qtp-modal-x {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .25);
    background: rgba(15, 23, 42, .65);
    color: #e5e7eb;
    cursor: pointer;
}

.qtp-modal-body {
    padding: 14px 16px 16px;
}

.qtp-new-playlist {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.qtp-new-playlist input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .25);
    background: rgba(15, 23, 42, .6);
    color: #e5e7eb;
}

.qtp-new-playlist button {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, .45);
    background: rgba(56, 189, 248, .12);
    color: #e5e7eb;
    cursor: pointer;
}

.qtp-playlist-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 46vh;
    overflow: auto;
}

.qtp-playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .25);
    background: rgba(15, 23, 42, .5);
    cursor: pointer;
}

.qtp-playlist-item:hover {
    background: rgba(56, 189, 248, .08);
}

.qtp-pl-name {
    color: #e5e7eb;
    font-weight: 600;
}

.qtp-pl-id {
    color: #9ca3af;
    font-size: 12px;
}

.page {
    max-width: 100%;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem
}

/* QTP HEADER */
header {
    margin-bottom: 1rem
}

.nav-shell {
    margin-top: 0.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-shell::-webkit-scrollbar {
    display: none;
}

.nav-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: min-content;
}

.nav-main {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    min-width: min-content;
}

.nav-main-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-soft);
    padding-bottom: 0.35rem;
    white-space: nowrap;
}

.nav-links {
    display: inline-flex;
    align-items: flex-end;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-links a {
    font-size: 0.82rem;
    padding: 0.5rem 0.6rem 0.4rem;
    border-bottom: 2px solid transparent;
    color: var(--text-soft);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links a:hover {
    color: var(--accent);
    border-bottom-color: rgba(148, 163, 184, 0.7)
}

.nav-links a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 500
}

/* LAYOUT */

.yt-content {
    flex: 1;
    min-width: 0
}

.yt-chips-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
}

@media (min-width: 768px) {
    .yt-chips-row {
        padding-right: 0;
        padding-left: 0;
        margin-left: 0;
        margin-right: 0;
    }
}

.yt-chips-row::-webkit-scrollbar {
    display: none;
}

.yt-chip {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-soft);
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.yt-chip.active,
.yt-chip:hover {
    background: radial-gradient(circle at top left, #38bdf8, #0ea5e9 40%, #1d4ed8 95%);
    color: #0b1120;
    border-color: transparent;
}

/* SHORTS */
.shorts-section {
    margin-bottom: 1.5rem
}

.shorts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem
}

.shorts-title {
    margin: 0;
    font-size: 1.2rem
}

.shorts-count {
    font-size: 0.85rem;
    color: var(--text-soft)
}

.shorts-row-wrapper {
    position: relative;
    padding: 0.75rem 2.5rem;
    border-radius: 1rem;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), #020617);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
    overflow: hidden;
}

@media (max-width: 480px) {
    .shorts-row-wrapper {
        padding: 0.75rem 2rem;
    }
}

.shorts-strip {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.shorts-strip::-webkit-scrollbar {
    height: 0.35rem
}

.shorts-strip::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px
}

.shorts-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.8);
    z-index: 2;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.2rem;
}

@media (max-width: 480px) {
    .shorts-scroll-btn {
        width: 2rem;
        height: 2rem;
    }
}

.shorts-scroll-btn:hover {
    color: var(--text);
    background: rgba(15, 23, 42, 1)
}

.shorts-scroll-btn.left {
    left: 0.5rem
}

.shorts-scroll-btn.right {
    right: 0.5rem
}

.short-card {
    flex: 0 0 140px;
    max-width: 140px;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .short-card {
        flex: 0 0 120px;
        max-width: 120px;
    }
}

.short-card-thumb {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden
}

.short-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform .22s, filter .22s
}

.short-card:hover .short-card-thumb img {
    transform: scale(1.06);
    filter: brightness(1.08)
}

.short-card-label {
    position: absolute;
    left: 0.4rem;
    bottom: 0.4rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.short-card-body {
    padding: 0.5rem 0.6rem 0.6rem
}

.short-card-title {
    font-size: 0.8rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.short-card-meta {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--text-soft)
}

/* FEED */
.yt-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem
}

.yt-feed-title {
    font-size: 1.3rem;
    margin: 0
}

@media (max-width: 480px) {
    .yt-feed-title {
        font-size: 1.1rem;
    }
}

.yt-counter {
    font-size: 0.9rem;
    color: var(--text-soft)
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.card {
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), #020617);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: hidden;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-thumb-button {
    display: block;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    width: 100%;
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9
}

.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform .22s, filter .22s
}

.card:hover .card-thumb-wrap img {
    transform: scale(1.04);
    filter: brightness(1.03)
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent 55%);
    display: flex;
    align-items: flex-end;
    padding: 0.65rem 0.75rem
}

.thumb-play-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.85rem
}

.thumb-play-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35)
}

.card-body {
    padding: 0.9rem 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem
}

.card-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.15rem
}

@media (max-width: 480px) {
    .card-title {
        font-size: 0.95rem;
    }
}

.card-title span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-soft)
}

.card-link-row {
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem
}

.card-link {
    font-size: 0.85rem;
    color: var(--accent)
}

.card-link:hover {
    text-decoration: underline
}

.card-tag {
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px dashed rgba(148, 163, 184, 0.65);
    color: var(--text-softer)
}

.card-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

@media (max-width: 480px) {
    .card-actions {
        justify-content: space-between;
    }
}

.card-action-btn {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-soft);
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    min-height: 36px;
    flex: 1;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 480px) {
    .card-action-btn {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
        min-width: 55px;
    }
}

.card-action-btn:hover {
    background: rgba(15, 23, 42, 1);
    color: var(--text)
}

.card-action-btn.is-on {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(56, 189, 248, 0.12)
}

.card-ad-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: #f97373;
    background: rgba(248, 113, 113, 0.08);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    margin-bottom: 0.5rem
}

.card-ad-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem
}

.card-ad-text {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-bottom: 0.5rem
}

.card-ad-tagline {
    font-size: 0.8rem;
    color: var(--text-softer)
}

#statusRow {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-soft);
    padding: 1rem;
}

.spinner {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.45);
    border-top-color: var(--accent);
    animation: spin .7s linear infinite
}

.sentinel {
    height: 1px;
    width: 100%
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* POPUP PLAYER */
.player-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .player-overlay {
        padding: 1.5rem;
    }
}

.player-overlay.is-open {
    display: flex
}

.player-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    background: #020617;
    border: none;
    box-shadow: none;
    padding: 1rem 1rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .player-modal {
        max-width: 960px;
        border-radius: 1.2rem;
        border: 1px solid rgba(148, 163, 184, 0.55);
        box-shadow: var(--shadow-soft);
        height: auto;
    }
}

.player-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.player-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .player-title {
        font-size: 1rem;
    }
}

.player-sub {
    font-size: 0.9rem;
    color: var(--text-soft)
}

.player-close {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-soft);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.player-close:hover {
    background: rgba(15, 23, 42, 1);
    color: var(--text)
}

.player-frame-wrap {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.5);
    flex: 1;
    min-height: 0;
}

@media (min-width: 768px) {
    .player-frame-wrap {
        border-radius: 0.9rem;
    }
}

.player-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: none
}

.player-fallback {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-soft);
    text-align: center;
    flex-shrink: 0;
}

.player-fallback a {
    color: var(--accent)
}

.player-fallback a:hover {
    text-decoration: underline
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {

    .card-action-btn,
    .yt-chip,
    .short-card,
    .yt-icon-button {
        cursor: default;
    }

    .card-action-btn:active,
    .yt-chip:active,
    .short-card:active {
        opacity: 0.8;
    }
}

/* Recommendation badges */
.recommendation-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.recommendation-badge::before {
    content: '?';
}

.recommendation-reason {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    z-index: 2;
}

.card.recommended {
    border: 2px solid #667eea;
    position: relative;
}

.short-card.recommended {
    border: 2px solid #764ba2;
    position: relative;
}

.card-thumb-wrap, .short-card-thumb {
    position: relative;
}

/* Personalization indicator */
.personalized-feed {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.personalized-feed::before {
    content: '??';
    font-size: 16px;
}

/* View count badge */
.view-count-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    z-index: 2;
}

.popular-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
}

.popular-badge::before {
    content: '?';
}

/* ==========================================================================
   SIDEBAR & MORE MENU (NEW STYLES)
   ========================================================================== */
.yt-sidebar {
    width: 300px !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: visible !important;
    z-index: 1000;
    border-right: 1px solid #2f3336;
}

.sidebar-main-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 0;
    padding-bottom: 10px;
    flex-grow: 1;
    overflow: hidden;
}

.sidebar-main-nav a, #moreBtn {
    padding: 12px 15px;
    text-decoration: none;
    color: #e7e9ea;
    display: flex;
    align-items: left;
    gap: 15px;
    border-radius: 9999px;
    transition: background-color 0.2s;
    font-size: 1.1rem;
}

.sidebar-main-nav a:hover, #moreBtn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-main-nav a.active {
    font-weight: 700;
}

#moreModal {
    position: fixed;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: rgba(101, 119, 134, 0.2) 0px 0px 15px, rgba(101, 119, 134, 0.15) 0px 0px 3px 1px;
    width: 260px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    left: 15px;
}

#moreModal.active {
    display: flex;
}

#moreModal a {
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f1419;
    text-decoration: none;
    transition: background-color 0.2s;
    display: block;
}

#moreModal a:hover {
    background-color: rgba(15, 20, 25, 0.1);
}

#moreBtn {
    font-weight: 700;
    cursor: pointer;
    margin-top: 5px;
    border: none;
    background: none;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

/* Fallback for Dark Mode Environments */
@media (prefers-color-scheme: dark) {
    .yt-sidebar, #moreModal {
        background-color: #000000;
        border-color: #2f3336;
    }
    .sidebar-main-nav a, #moreBtn, #moreModal a {
        color: #e7e9ea;
    }
    .sidebar-main-nav a:hover, #moreBtn:hover, #moreModal a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    #moreModal {
        box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 15px, rgba(255, 255, 255, 0.15) 0px 0px 3px 1px;
    }
}



/* Fallback for Dark Mode Environments */
@media (prefers-color-scheme: dark) {
    .yt-sidebar, #moreModal {
        background-color: #000000;
        border-color: #2f3336;
    }
    .sidebar-main-nav a, #moreBtn, #moreModal a {
        color: #e7e9ea;
    }
    .sidebar-main-nav a:hover, #moreBtn:hover, #moreModal a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    #moreModal {
        box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 15px, rgba(255, 255, 255, 0.15) 0px 0px 3px 1px;
    }
}

/* Add this right at the end to force the sidebar to hide on mobile */
@media (max-width: 768px) {
    .yt-sidebar {
        display: none !important;
    }
}