@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root { 
    --yt-black: #0f0f0f; 
    --yt-white: #ffffff; 
    --yt-grey: #272727; 
    --yt-hover: #3f3f3f; 
    --yt-border: rgba(255, 255, 255, 0.1); 
    --yt-text-sec: #aaaaaa; 
    --yt-primary: #3ea6ff; 
    --header-height: 56px; 
    --sidebar-width: 240px; 
    --yt-overlay: rgba(255, 255, 255, 0.1);
    --yt-overlay-light: rgba(255, 255, 255, 0.05);
    --yt-overlay-hover: rgba(255, 255, 255, 0.2);
    --yt-player-bg: #000000;
}

.light-theme { 
    --yt-black: #ffffff; 
    --yt-white: #0f0f0f; 
    --yt-grey: #f2f2f2; 
    --yt-hover: #e5e5e5; 
    --yt-border: rgba(0, 0, 0, 0.1); 
    --yt-text-sec: #606060; 
    --yt-primary: #065fd4; 
    --yt-overlay: rgba(0, 0, 0, 0.05);
    --yt-overlay-light: rgba(0, 0, 0, 0.02);
    --yt-overlay-hover: rgba(0, 0, 0, 0.1);
    --yt-player-bg: #f9f9f9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Roboto', Arial, sans-serif; background-color: var(--yt-black); color: var(--yt-white); overflow-x: hidden; transition: background-color 0.3s, color 0.3s; }

body:has(.watch-page-wrapper) footer, 
body:has(.watch-page-wrapper) .footer { display: none !important; }

/* ================= HEADER & SIDEBAR ================= */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); background: var(--yt-black); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 1001; border-bottom: 1px solid var(--yt-border); transition: background-color 0.3s, border-color 0.3s;}
.header-left { display: flex; align-items: center; gap: 16px; min-width: 150px; }
.menu-icon { font-size: 24px; cursor: pointer; padding: 8px; border-radius: 50%; color: var(--yt-white); }
.logo { display: flex; align-items: center; gap: 4px; text-decoration: none; color: var(--yt-white); font-size: 18px; font-weight: bold; letter-spacing: -1px; }
.logo i { color: #ff0000; font-size: 24px; }
.header-center { flex: 0 1 720px; display: flex; align-items: center; justify-content: center; gap: 8px; }

.search-box { flex: 1; display: flex; background: var(--yt-black); border: 1px solid var(--yt-border); border-radius: 40px; overflow: hidden; height: 40px; transition: border-color 0.3s, background-color 0.3s; max-width: 600px;}
.search-box input { flex: 1; background: transparent; border: none; color: var(--yt-white); padding: 0 16px; outline: none; font-size:16px;}
.search-btn { background: var(--yt-overlay-light); border: none; color: var(--yt-white); width: 64px; border-left: 1px solid var(--yt-border); cursor: pointer; transition: background-color 0.3s; }
.mic-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--yt-overlay-light); border: none; color: var(--yt-white); font-size: 18px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; flex-shrink: 0;}
.mic-btn:hover { background: var(--yt-overlay-hover); }
.mic-btn.listening { background: #cc0000; color: white; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(204, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(204, 0, 0, 0); } }

.header-right { display: flex; align-items: center; gap: 16px; position: relative;}
.theme-toggle-btn { background: transparent; color: var(--yt-white); border: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; transition: 0.2s; }
.theme-toggle-btn:hover { background: var(--yt-overlay); }

.btn-login-outline { display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--yt-primary); color: var(--yt-primary); padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.2s; text-decoration: none;}
.btn-login-outline:hover { background: var(--yt-overlay); }
.btn-register { display: flex; align-items: center; gap: 8px; background: var(--yt-primary); color: #000; border: 1px solid var(--yt-primary); padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.2s; text-decoration: none;}
.btn-register:hover { background: transparent; color: var(--yt-primary); }
.mobile-icon { display: none; }

.user-avatar-btn { width: 32px; height: 32px; border-radius: 50%; background: #764ba2; color: white; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; cursor: pointer; }
.user-dropdown { display: none; position: absolute; top: 40px; right: 0; background: var(--yt-black); border: 1px solid var(--yt-border); border-radius: 8px; width: 200px; box-shadow: 0 4px 12px rgba(0,0,0,0.5); z-index: 2001;}
.user-dropdown.show { display: block; }
.dropdown-item { display: block; padding: 12px 16px; color: var(--yt-white); text-decoration: none; font-size: 14px; }
.dropdown-item:hover { background: var(--yt-overlay); }

.sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); z-index: 99998; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, visibility 0.3s ease; }
.sidebar-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-sidebar-header { display: none; padding: 16px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--yt-border); margin-bottom: 12px; }
.mobile-sidebar-header .logo-text { color: var(--yt-white); font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.mobile-sidebar-close { background: transparent; border: none; color: var(--yt-white); font-size: 28px; cursor: pointer; padding: 0; line-height: 1; }

.sidebar { position: fixed; top: var(--header-height); left: 0; bottom: 0; width: var(--sidebar-width); background: var(--yt-black); padding: 12px; overflow-y: auto; z-index: 1000; border-right: 1px solid var(--yt-border); transition: background-color 0.3s, border-color 0.3s;}
.sidebar::-webkit-scrollbar { width: 8px; } .sidebar::-webkit-scrollbar-thumb { background: var(--yt-grey); border-radius: 4px; }
.sidebar-item { display: flex; align-items: center; gap: 20px; padding: 10px 12px; text-decoration: none; color: var(--yt-white); border-radius: 10px; font-size: 14px; transition: 0.2s; cursor: pointer; border: none; background: transparent; width: 100%; text-align: left; }
.sidebar-item:hover { background: var(--yt-hover); }
.sidebar-item.active { background: var(--yt-overlay); font-weight: 500; color: var(--yt-primary); }
.sidebar-item i { font-size: 20px; width: 24px; text-align: center;}
.sidebar-hr { height: 1px; background: var(--yt-border); margin: 12px 0; border: none; }
.sidebar-title { padding: 8px 12px; font-size: 16px; font-weight: 600; margin-top: 8px; color: var(--yt-white);}

/* ================= GRIDS & HOME ================= */
.main-wrapper { margin-left: var(--sidebar-width); padding: calc(var(--header-height) + 24px) 24px 40px; display: flex; flex-direction: column; gap: 24px; max-width: 1800px; margin-right: auto; min-height: 100vh;}
.top-nav { position: fixed; top: var(--header-height); left: var(--sidebar-width); right: 0; height: 56px; background: var(--yt-black); display: flex; align-items: center; padding: 0 24px; gap: 12px; z-index: 999; border-bottom: 1px solid var(--yt-border); overflow-x: auto; transition: background-color 0.3s, border-color 0.3s;}
.top-nav ~ .main-wrapper { padding-top: calc(var(--header-height) + 56px + 24px); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 32px 16px; width: 100%;}
.video-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; cursor: pointer; width: 100%; transition: transform 0.2s;}
.video-card:hover { transform: translateY(-4px); }
.video-thumb-wrapper { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--yt-grey);}
.video-thumb { width: 100%; height: 100%; object-fit: cover; transition: 0.2s;}
.video-info-row { display: flex; gap: 12px; align-items: flex-start; }
.grid-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--yt-grey); color: var(--yt-white); display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; margin-top: 2px; }
.grid-text-block { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.grid-title { font-size: 15px; font-weight: 500; color: var(--yt-white) !important; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-channel, .grid-meta { font-size: 13px; color: var(--yt-text-sec) !important; }

/* ================= SONG PAGE (WATCH) YENİ MİMARİ VE GÜNCEL CSS ================= */
.watch-page-wrapper { max-width: 1600px; margin: 0 auto; padding: 24px 2vw; transition: all 0.3s ease; width: 100%; display: flex; flex-direction: column; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 2.5fr) 400px; gap: 24px; max-width: 1800px; margin: 0 auto; padding: 24px 4vw; width: 100%; box-sizing: border-box; }
.left-section { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.right-section { width: 100%; display: flex; flex-direction: column; min-width: 0;}

.player-section { width: 100%; margin: 0; position: relative; } 
.details-section { width: 100%; }

.player-wrapper { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--yt-player-bg) !important; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.2); transition: border-radius 0.3s ease; z-index: 2; }
.player-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.player-wrapper:fullscreen { width: 100vw !important; height: 100vh !important; margin: 0 !important; border-radius: 0 !important; max-height: none !important; }

.lux-watermark { position: absolute; top: 16px; left: 20px; background: rgba(0,0,0,0.6); color: #fff; padding: 6px 12px; border-radius: 8px; font-weight: 800; font-size: 16px; pointer-events: none; z-index: 50; backdrop-filter: blur(4px); letter-spacing: 2px;}
.lux-watermark span { color: var(--yt-primary); }

.watch-title { font-size: clamp(16px, 4vw, 20px); font-weight: 800; color: var(--yt-white) !important; margin: 0 0 12px 0; line-height: 1.4; word-break: break-word; }
.watch-actions-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; width: 100%; margin-bottom: 16px; }
.watch-channel-info { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.watch-avatar { width: clamp(36px, 8vw, 40px); height: clamp(36px, 8vw, 40px); border-radius: 50%; background: var(--yt-grey); color: var(--yt-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; border: 1px solid var(--yt-border); text-decoration: none; flex-shrink: 0;}
.watch-channel-text { display: flex; flex-direction: column; justify-content: center; }
.watch-channel-name { font-weight: 700; color: var(--yt-white) !important; font-size: 15px; display: flex; align-items: center; gap: 4px; text-decoration: none; }
.watch-channel-subs { font-size: 12px; color: var(--yt-text-sec); }
.btn-subscribe { background: var(--yt-white); color: var(--yt-black); border: none; padding: 0 16px; height: 36px; border-radius: 18px; font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color 0.2s; white-space: nowrap; margin-left: 8px; display: flex; align-items: center; gap: 6px; }
.btn-subscribe.active { background: var(--yt-overlay-hover); color: var(--yt-white); }

.watch-buttons-group { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
.watch-buttons-group::-webkit-scrollbar { display: none; }
.pill-btn-group { display: flex; background: var(--yt-overlay-light); border-radius: 18px; height: 36px; align-items: center; flex-shrink: 0; }
.pill-btn { background: transparent; color: var(--yt-white); border: none; padding: 0 16px; height: 100%; font-weight: 500; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; white-space: nowrap; }
.pill-btn:hover, .pill-btn.active { background: var(--yt-overlay-hover); }
.pill-btn-left { border-radius: 18px 0 0 18px; border-right: 1px solid var(--yt-border); }
.pill-btn-right { border-radius: 0 18px 18px 0; padding: 0 12px; }
.pill-btn-single { background: var(--yt-overlay-light); color: var(--yt-white); border: none; padding: 0 16px; height: 36px; border-radius: 18px; font-weight: 500; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; white-space: nowrap; flex-shrink: 0; }
.pill-btn-single:hover, .pill-btn-single.active { background: var(--yt-overlay-hover); }

.watch-desc-box { background: var(--yt-overlay-light) !important; border-radius: 12px; padding: 16px; width: 100%; box-sizing: border-box; border: 1px solid var(--yt-border) !important; cursor: pointer; transition: 0.2s; margin-bottom: 24px; }
.watch-desc-box:hover { background: var(--yt-overlay); }
.watch-desc-stats { font-weight: 600; font-size: 14px; margin-bottom: 12px; color: var(--yt-white) !important; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.watch-desc-content { color: var(--yt-white) !important; line-height: 1.6; font-size: 14px; word-break: break-word; overflow: hidden; }
.watch-desc-content * { color: var(--yt-white) !important; background-color: transparent !important; }
.watch-desc-wrapper { max-height: 80px; overflow: hidden; transition: max-height 0.3s ease; }
.watch-desc-wrapper.expanded { max-height: 5000px !important; }

/* YOUTUBE CHIPS */
.yt-chips { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.yt-chips::-webkit-scrollbar { display: none; }
.yt-chip { background: var(--yt-overlay-light); color: var(--yt-white); border: 1px solid var(--yt-border); padding: 6px 12px; border-radius: 8px; white-space: nowrap; font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.2s; }
.yt-chip.active { background: var(--yt-white); color: var(--yt-black); border-color: var(--yt-white); }
.yt-chip:hover:not(.active) { background: var(--yt-overlay-hover); }

/* YORUMLAR */
.comments-container { width: 100%; padding-top: 16px; border-top: 1px solid var(--yt-border); margin-top: 16px;}
.comments-title { font-size: clamp(16px, 4vw, 20px); font-weight: 700; margin-bottom: 24px; color: var(--yt-white); display: flex; align-items: center; gap: 8px; }
.comment-input-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 32px; }
.comment-input-wrapper { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.comment-input-wrapper input { background: transparent; border: none; border-bottom: 1px solid var(--yt-border); color: var(--yt-white); outline: none; padding: 8px 0; font-size: clamp(13px, 3.5vw, 14px); transition: border-color 0.3s; }
.comment-input-wrapper input:focus { border-bottom: 2px solid var(--yt-white); padding-bottom: 7px; }
.comment-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; display: none; }
.comment-actions button { background: transparent; color: var(--yt-white); font-weight: 500; font-size: clamp(12px, 3vw, 14px); border: none; cursor: pointer; padding: 8px 16px; border-radius: 18px; transition: 0.2s;}
.comment-actions button.primary { background: var(--yt-primary); color: #000; font-weight: 600; }

.comment-item { display: flex; gap: 16px; margin-bottom: 20px; }
.comment-author-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.comment-author { font-size: 13px; font-weight: 600; color: var(--yt-white); }
.comment-time { font-size: 12px; color: var(--yt-text-sec); }
.comment-text { font-size: 14px; line-height: 1.5; margin-bottom: 8px; color: var(--yt-white); }
.comment-interaction { display: flex; align-items: center; gap: 16px; color: var(--yt-text-sec); }
.comment-interaction span { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; cursor: pointer; transition: color 0.2s; }
.comment-interaction span:hover { color: var(--yt-white); }
.comment-interaction i { font-size: 14px; }

/* ================= MİNİ OYNATICI (PICTURE-IN-PICTURE) ================= */
.player-wrapper.mini-player-mode {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: auto;
    aspect-ratio: 16 / 9;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border-radius: 12px;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: none; 
}
@keyframes popIn {
    0% { transform: scale(0.8) translateY(50px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.mini-player-close {
    display: none;
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--yt-primary);
    color: #000;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}
.mini-player-close:hover { transform: scale(1.1); }
.player-wrapper.mini-player-mode .mini-player-close { display: flex; align-items: center; justify-content: center; }

@media (max-width: 768px) {
    .player-wrapper.mini-player-mode { width: 250px; bottom: 16px; right: 16px; }
}

/* ================= THEATER MODE VE WATCH RESPONSIVE ================= */
.next-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

@media (min-width: 1920px) {
    .watch-page-wrapper { max-width: 2560px; padding: 32px 4vw; }
    .watch-layout { grid-template-columns: minmax(0, 3fr) 480px; gap: 32px; }
    .next-thumb { width: 200px !important; }
    .next-item-title { font-size: 16px !important; }
    .watch-title { font-size: 26px !important; }
}

@media (max-width: 1200px) {
    .watch-layout { grid-template-columns: minmax(0, 2fr) 350px; gap: 20px; }
}

@media (max-width: 1024px) {
    .watch-layout { display: flex; flex-direction: column; }
    .right-section { width: 100%; margin-top: 24px; }
    .next-list-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
    .next-item { flex-direction: column; align-items: stretch; background: transparent; }
    .next-thumb { width: 100% !important; aspect-ratio: 16/9; margin-bottom: 12px; }
}

@media (max-width: 768px) {
    .watch-page-wrapper { padding: 0; }
    .player-section { margin-bottom: 16px; }
    .player-wrapper { border-radius: 0; }
    .details-section, .right-section { padding: 0 16px; }
    .watch-actions-bar { flex-direction: column; align-items: stretch; gap: 16px; }
    .watch-buttons-group { overflow-x: auto; padding-bottom: 8px; justify-content: flex-start; scrollbar-width: none; }
    .watch-buttons-group::-webkit-scrollbar { display: none; }
    .watch-title { font-size: 18px; margin-top: 12px; }
}

body.theater-mode .sidebar { width: 72px !important; padding: 12px 4px !important; overflow-y: auto !important; overflow-x: hidden !important; scrollbar-width: none; -ms-overflow-style: none; }
body.theater-mode .sidebar::-webkit-scrollbar { display: none; }
body.theater-mode .sidebar-title, body.theater-mode .sidebar-hr, body.theater-mode .sidebar-footer, body.theater-mode .sidebar-login-promo { display: none !important; }
body.theater-mode .sidebar-item { flex-direction: column !important; gap: 6px !important; font-size: 10px !important; padding: 16px 4px !important; justify-content: center !important; text-align: center !important; line-height: 1.2 !important; border-radius: 8px !important; }
body.theater-mode .sidebar-item i { margin: 0 !important; font-size: 24px !important; width: auto !important; }
body.theater-mode .main-wrapper { margin-left: 72px !important; padding-top: var(--header-height) !important; padding-left: 0; padding-right: 0;}
body.theater-mode .top-nav { left: 72px !important; }
body.theater-mode .watch-layout { flex-direction: column; padding: 0; gap: 0; max-width: 100%; }
body.theater-mode .left-section { gap: 0; width: 100%; max-width: 100%; padding: 0; }
body.theater-mode .player-section { background: #000; margin-bottom: 24px; display: flex; justify-content: center; }
body.theater-mode .player-wrapper { width: 100vw; max-width: 100vw; margin-left: calc(-50vw + 50%); height: 75vh; max-height: 800px; border-radius: 0; }
body.theater-mode .details-section { max-width: 1400px; margin: 0 auto; padding: 0 4vw; width: 100%; box-sizing: border-box; margin-bottom: 24px; }
body.theater-mode .right-section { width: 100% !important; max-width: 1400px !important; margin: 0 auto; padding: 0 4vw; box-sizing: border-box; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--yt-border); }
body.theater-mode .next-list-container { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 20px 16px !important; }
body.theater-mode .next-item { flex-direction: column; align-items: stretch; padding: 0; background: transparent; }
body.theater-mode .next-item:hover { background: transparent; }
body.theater-mode .next-thumb { width: 100%; aspect-ratio: 16/9; }
body.theater-mode .next-info { padding-top: 8px; }

/* MODALS */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 10000; align-items: center; justify-content: center; }
.modal-box { background: var(--yt-black); border: 1px solid var(--yt-border); padding: 24px; border-radius: 12px; width: 400px; max-width: 90%; position: relative;}
.btn-full { width: 100%; padding: 12px; background: var(--yt-primary); color: #000; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; transition: 0.2s;}

/* ================= KUSURSUZ RESPONSIVE MOBİL UYUMU ================= */
@media (max-width: 1200px) {
    .sidebar-footer { display: none !important; }
}
@media (max-width: 1100px) { 
    .sidebar { width: 72px !important; padding: 12px 4px !important; overflow-y: auto !important; overflow-x: hidden !important; scrollbar-width: none; -ms-overflow-style: none; } 
    .sidebar::-webkit-scrollbar { display: none; }
    .sidebar-item { flex-direction: column !important; gap: 6px !important; font-size: 10px !important; padding: 16px 4px !important; justify-content: center !important; text-align: center !important; line-height: 1.2 !important; border-radius: 8px !important; } 
    .sidebar-item i { font-size: 24px !important; margin: 0 !important; width: auto !important; } 
    .sidebar-title, .sidebar-hr, .sidebar-submenu, .sidebar-login-promo { display: none !important; } 
    .main-wrapper { margin-left: 72px; padding-left: 16px; padding-right: 16px; } 
    .top-nav { left: 72px; } 
    .watch-layout { flex-direction: column; padding: 0; gap: 0;}
    .left-section { gap: 12px; }
    .player-section { margin-bottom: 0; }
    .player-wrapper { border-radius: 0; }
    .details-section { padding: 0 16px; }
    .right-section { width: 100%; padding: 16px; border-top: 1px solid var(--yt-border); margin-top: 16px;}
    .next-list-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 16px; }
    .next-item { flex-direction: column; align-items: stretch; padding: 0; }
    .next-thumb { width: 100%; aspect-ratio: 16/9; }
}
@media (max-width: 900px) { 
    #theaterModeBtn { display: none !important; } 
    .sidebar { position: fixed !important; top: 0; left: -300px; width: 260px !important; height: 100vh !important; z-index: 99999; background-color: var(--yt-black) !important; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 4px 0 15px rgba(0,0,0,0.5); }
    .sidebar.mobile-open { left: 0; }
    .mobile-sidebar-header { display: flex; }
    .sidebar-item { flex-direction: row !important; font-size: 14px !important; padding: 10px 12px !important; justify-content: flex-start !important; text-align: left !important; }
    .sidebar-item i { font-size: 20px !important; width: 24px !important; margin-right: 20px !important; }
    .sidebar-title, .sidebar-hr { display: block !important; }
}
@media (max-width: 768px) { 
    .sidebar { display: none !important; } 
    .top-nav { left: 0; } 
    .main-wrapper { margin-left: 0; padding-top: calc(var(--header-height) + 16px); } 
    .hide-on-mobile { display: none !important; }
    .mobile-icon { display: block !important; }
    .btn-login-outline, .btn-register { padding: 8px !important; border-radius: 50% !important; width: 36px; height: 36px; justify-content: center; border: 1px solid var(--yt-border); background: var(--yt-overlay-light); color: var(--yt-white);}
    .btn-login-outline i, .btn-register i { margin: 0; font-size: 16px; }
    .btn-register { background: var(--yt-primary); color: #000; border: none; }
    .logo-text-desktop { display: none; }
    .header-left { gap: 8px; min-width: auto; }
    .header-right { gap: 8px; }
    .header-center { margin: 0 8px; }
    .search-box input { padding: 0 10px; font-size: 14px; }
    .search-btn { width: 40px; }
    .mic-btn { width: 36px; height: 36px; font-size: 16px; margin-left: 4px; }
    .theme-toggle-btn { width: 36px; height: 36px; font-size: 16px; }
}
@media (max-width: 600px) { 
    .details-section, .right-section { padding: 0 12px; }
    .right-section { padding-top: 12px; margin-top: 12px; border-top: none; }
    .watch-actions-bar { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 12px;}
    .watch-channel-info { width: 100%; justify-content: space-between; }
    .watch-buttons-group { width: 100%; justify-content: flex-start; }
    .next-list-container { display: flex; flex-direction: column; gap: 12px; }
    .next-item { flex-direction: row; align-items: flex-start; padding: 4px; }
    .next-item:hover { background: var(--yt-overlay-light); }
    .next-thumb { width: 160px; aspect-ratio: 16/9; }
}

/* ================= SKELETON LOADING ================= */
#pjax-container { transition: opacity 0.15s ease-in-out; }
body.pjax-loading #pjax-container { opacity: 0; pointer-events: none; }
body.pjax-loading .skeleton-overlay { display: block; }
.skeleton-overlay { position: fixed; top: var(--header-height); left: var(--sidebar-width); right: 0; bottom: 0; background: var(--yt-black); z-index: 900; display: none; padding: 24px 4vw; overflow: hidden; }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%); background-size: 200% 100%; animation: lux-shimmer 1.5s infinite linear; border-radius: 8px; }
.light-theme .skeleton { background: linear-gradient(90deg, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.05) 75%); background-size: 200% 100%; }
@keyframes lux-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-layout { display: flex; gap: 24px; width: 100%; max-width: 1800px; margin: 0 auto; }
.skel-left { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.skel-right { width: 400px; display: flex; flex-direction: column; gap: 16px; flex-shrink: 0; }
.skel-player { width: 100%; aspect-ratio: 16/9; border-radius: 12px; margin-bottom: 8px;}
.skel-title { width: 80%; height: 28px; }
.skel-title.short { width: 40%; height: 28px; margin-bottom: 12px; }
.skel-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.skel-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skel-thumb { width: 168px; aspect-ratio: 16/9; flex-shrink: 0; }
.skel-text-box { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skel-text { width: 100%; height: 16px; }
.skel-text.short { width: 60%; }
@media (max-width: 1100px) { .skeleton-overlay { left: 72px; padding: 16px; } .skel-layout { flex-direction: column; } .skel-right { width: 100%; margin-top: 24px; } .skel-thumb { width: 100%; aspect-ratio: 16/9; } }
@media (max-width: 768px) { .skeleton-overlay { left: 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ================= İÇ İÇE YANITLAR (NESTED COMMENTS) ================= */
.comment-item-wrapper { margin-bottom: 20px; width: 100%; }
.comment-item { margin-bottom: 0; } 
.comment-reply-form { margin-top: 12px; display: none; margin-left: 56px; }
.comment-reply-form input { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--yt-border); color: var(--yt-white); padding: 6px 0; outline: none; font-size: 13px; margin-bottom: 8px; transition: border-color 0.3s; }
.comment-reply-form input:focus { border-bottom: 2px solid var(--yt-primary); }
.replies-container { display: none; margin-top: 8px; }
.show-replies-btn { margin-left: 56px; color: var(--yt-primary); font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 0; transition: 0.2s; }
.show-replies-btn:hover { text-decoration: underline; }
.comment-interaction span.reply-trigger { font-weight: 600; margin-left: 8px; cursor: pointer; transition: 0.2s; }
.comment-interaction span.reply-trigger:hover { color: var(--yt-white); }

/* ================= SÜRÜKLE-BIRAK (DRAG & DROP) ================= */
.next-list-container { display: flex; flex-direction: column; gap: 12px; }
.next-item { display: flex; flex-direction: row; gap: 10px; text-decoration: none; cursor: grab; border-radius: 8px; padding: 4px; transition: 0.2s; color: inherit; align-items: stretch; position: relative;}
.next-item:active { cursor: grabbing; }
.next-item:hover { background: var(--yt-overlay-light); }
.next-item.dragging { opacity: 0.5; background: var(--yt-overlay) !important; border: 1px dashed var(--yt-primary); transform: scale(0.98); }
.next-thumb { width: 168px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--yt-grey); flex-shrink: 0; position: relative; }
.next-thumb img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.next-item:hover .next-thumb img { transform: scale(1.05); }
.next-badge { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.8); color: #fff; padding: 2px 4px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.next-info { display: flex; flex-direction: column; flex: 1; min-width: 0; padding-top: 2px; }
.next-item-title { font-size: 14px; font-weight: 600; color: var(--yt-white) !important; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.next-item-meta { font-size: 12px; color: var(--yt-text-sec) !important; line-height: 1.4; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;}
.drag-handle { display: none; align-items: center; justify-content: center; width: 30px; color: var(--yt-text-sec); font-size: 20px; }
.next-item:hover .drag-handle { display: flex; }

/* ================= ÇALMA LİSTESİ MODALI ================= */
.playlist-checkbox-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; font-size: 14px; color: var(--yt-white); transition: 0.2s; }
.playlist-checkbox-item:hover { color: var(--yt-primary); }
.playlist-checkbox-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--yt-primary); cursor: pointer; }

/* ================= OTOMATİK OYNATMA ANAHTARI ================= */
.lux-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; cursor: pointer; }
.lux-switch input { opacity: 0; width: 0; height: 0; }
.lux-slider { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--yt-grey); transition: .3s; border-radius: 20px; }
.lux-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
.lux-switch input:checked + .lux-slider { background-color: var(--yt-primary); }
.lux-switch input:checked + .lux-slider:before { transform: translateX(16px); }

/* ZAMAN DAMGASI (TIMESTAMP) */
.timestamp-link { color: var(--yt-primary); text-decoration: none; font-weight: 500; cursor: pointer; }
.timestamp-link:hover { text-decoration: underline; }

/* ================= ZAMAN AYARLI PAYLAŞIM ================= */
.share-time-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.share-time-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--yt-primary); cursor: pointer; }
.share-time-row label { color: var(--yt-white); font-size: 14px; cursor: pointer; user-select: none; }
.share-time-row span { font-weight: 600; color: var(--yt-primary); }

/* ================= BİLDİRİM SİSTEMİ STİLLERİ ================= */
.notif-wrapper { position: relative; display: flex; align-items: center; }
.notif-btn { background: transparent; border: none; color: var(--yt-white); font-size: 22px; cursor: pointer; padding: 8px; border-radius: 50%; position: relative; }
.notif-btn:hover { background: var(--yt-overlay); }
.notif-badge { position: absolute; top: 4px; right: 4px; background: #cc0000; color: #fff; font-size: 10px; font-weight: bold; min-width: 16px; height: 16px; border-radius: 50%; display: none; align-items: center; justify-content: center; border: 2px solid var(--yt-black); }
.notif-dropdown { position: absolute; top: 45px; right: 0; width: 360px; background: var(--yt-black); border: 1px solid var(--yt-border); border-radius: 8px; display: none; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 2000; }
.notif-dropdown.show { display: flex; animation: fadeIn 0.2s ease; }
.notif-header { padding: 12px 16px; border-bottom: 1px solid var(--yt-border); font-weight: 500; color: var(--yt-white); }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--yt-white); border-bottom: 1px solid var(--yt-border); transition: 0.2s; }
.notif-item:hover { background: var(--yt-hover); }
.notif-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--yt-grey); display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; color: var(--yt-white); }
.notif-text { font-size: 13px; line-height: 1.4; flex: 1; }
.notif-text small { color: var(--yt-text-sec); display: block; margin-top: 4px; }

/* ================= YENİ: KANAL / SANATÇI PROFİLİ (CHANNEL UI) STİLLERİ ================= */
.channel-wrapper { width: 100%; max-width: 1800px; margin: 0 auto; padding-bottom: 40px; }
.channel-banner { width: 100%; height: 200px; background: linear-gradient(45deg, var(--yt-primary), #764ba2); border-radius: 0 0 16px 16px; margin-bottom: 24px; position: relative; overflow: hidden;}
.channel-banner img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.channel-header { display: flex; align-items: center; gap: 24px; padding: 0 4vw; margin-bottom: 24px; flex-wrap: wrap; }
.channel-avatar { width: 128px; height: 128px; border-radius: 50%; background: var(--yt-grey); display: flex; align-items: center; justify-content: center; font-size: 48px; font-weight: 700; color: var(--yt-primary); border: 4px solid var(--yt-black); box-shadow: 0 4px 10px rgba(0,0,0,0.5); flex-shrink: 0; }
.channel-info { flex: 1; min-width: 250px; }
.channel-name { font-size: 24px; font-weight: 700; color: var(--yt-white); margin-bottom: 6px; display: flex; align-items: center; gap: 8px;}
.channel-meta { color: var(--yt-text-sec); font-size: 14px; margin-bottom: 12px; }
.channel-tabs { display: flex; gap: 32px; padding: 0 4vw; border-bottom: 1px solid var(--yt-border); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.channel-tabs::-webkit-scrollbar { display: none; }
.channel-tab { padding: 12px 0; font-weight: 500; color: var(--yt-text-sec); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; transition: 0.2s; }
.channel-tab:hover { color: var(--yt-white); }
.channel-tab.active { color: var(--yt-white); border-bottom-color: var(--yt-white); }
.channel-content { padding: 0 4vw; }
.tab-pane { display: none; animation: fadeIn 0.3s ease; }
.tab-pane.active { display: block; }
@media(max-width: 768px) { .channel-banner { height: 120px; border-radius: 0; } .channel-avatar { width: 80px; height: 80px; font-size: 32px; } .channel-header, .channel-tabs, .channel-content { padding: 0 16px; } }
/* ================= ABONE OL BUTONU IŞILTI (GLOW) EFEKTİ ================= */
.btn-subscribe {
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
}
.btn-subscribe:active {
    transform: scale(0.95);
}
.btn-subscribe::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}
.active.btn-subscribe::after {
    background: rgba(0, 0, 0, 0.2); 
}
.subscribe-glow::after {
    animation: ripple-glow 0.6s ease-out;
}
@keyframes ripple-glow {
    0% { width: 0; height: 0; opacity: 0.8; }
    100% { width: 200px; height: 200px; opacity: 0; }
}
/* ================= AMBİANS MODU (AMBIENT MODE) ================= */
.player-section {
    position: relative;
}
.ambient-layer {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 0;
    pointer-events: none;
    filter: blur(60px) saturate(200%) opacity(0.4);
    transition: opacity 0.5s ease, filter 0.5s ease;
    display: none; 
}
.ambient-layer iframe {
    width: 100%;
    height: 100%;
    border: none;
}
body.light-theme .ambient-layer {
    opacity: 0.2; 
    filter: blur(60px) saturate(150%);
}
.player-wrapper {
    position: relative;
    z-index: 2; 
}
/* ================= HOVER ÖNİZLEME (VIDEO PREVIEW) STİLLERİ ================= */
.video-thumb-wrapper, .next-thumb {
    position: relative;
    overflow: hidden;
    background: var(--yt-black); 
    border-radius: 8px; 
}

.hover-preview-iframe {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    pointer-events: none; 
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.video-thumb-wrapper.is-previewing .hover-preview-iframe,
.next-thumb.is-previewing .hover-preview-iframe {
    opacity: 1;
}

.video-thumb-wrapper.is-previewing > img,
.next-thumb.is-previewing > img {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}
/* ================= YATAY KAYDIRMA KUSURSUZLAŞTIRMA ================= */
.yt-chips, .watch-buttons-group, .channel-tabs {
    display: flex !important;
    flex-wrap: nowrap !important; 
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important; 
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
    padding-bottom: 8px; 
}

.yt-chips::-webkit-scrollbar, 
.watch-buttons-group::-webkit-scrollbar, 
.channel-tabs::-webkit-scrollbar {
    display: none;
}

.yt-chips.is-dragging-active, 
.watch-buttons-group.is-dragging-active, 
.channel-tabs.is-dragging-active {
    cursor: grabbing;
}

.yt-chip, .channel-tab, .pill-btn, .pill-btn-single {
    flex-shrink: 0 !important; 
    display: inline-flex;
    align-items: center;
}
/* ========================================================= */
/* 19. YENİ: CAM EFEKTİ (GLASSMORPHISM) PREMIUM ARAYÜZ       */
/* ========================================================= */

.header, .top-nav {
    background: rgba(15, 15, 15, 0.85) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sidebar {
    background: rgba(15, 15, 15, 0.85) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.user-dropdown, .notif-dropdown {
    background: rgba(20, 20, 20, 0.75) !important;
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
}

.modal-box {
    background: rgba(25, 25, 25, 0.7) !important;
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}

.watch-desc-box {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.watch-desc-box:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.light-theme .header, 
body.light-theme .top-nav, 
body.light-theme .sidebar {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .user-dropdown, 
body.light-theme .notif-dropdown, 
body.light-theme .modal-box {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .watch-desc-box {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}
body.light-theme .watch-desc-box:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}
/* ========================================================= */
/* 20. PREMIUM TEMBEL YÜKLEME (LAZY LOAD & BLUR EFEKTİ)      */
/* ========================================================= */
img.lux-lazy {
    opacity: 0;
    filter: blur(15px);
    transform: scale(1.05); 
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                filter 0.5s ease-out, 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, filter, transform;
}

img.lux-lazy.is-loaded {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

.video-thumb-wrapper.is-previewing > img,
.next-thumb.is-previewing > img {
    opacity: 0 !important; 
}