/* Temel Ayarlar ve Renkler (Koyu Tema) */
:root {
    --bg-color: #0f0f0f;
    --surface-color: #212121;
    --text-primary: #f1f1f1;
    --text-secondary: #aaaaaa;
    --accent-color: #ffffff;
    --accent-hover: #cccccc;
    --player-controls-bg: rgba(0, 0, 0, 0.7);
    --logo-height: 130px; /* LOGO BOYUTU: Bu sayıyı değiştirerek logonu büyüt/küçült */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px; /* LOGO KONUM: Üstteki sayıyı artırarak üst boşluğu ayarla */
    height: auto;
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo img {
    height: var(--logo-height);
    display: block;
}

/* Ana Sayfa İçeriği */
.container {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.section-title {
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 600;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    row-gap: 40px;
}

.video-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

.thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Sığdır ama yanları kesme/doldurma, siyah boşluk bırak */
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0,0,0,0.8);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-title {
   .video-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    line-clamp: 2; /* Bunu eklersen o uyarı kaybolur */
}
}

.channel-name {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Video İzleme Sayfası */
.watch-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Özel Video Player Tasarımı */
.custom-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player video {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 10px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* İlerleme Çubuğu */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255,255,255,0.2);
    cursor: pointer;
    border-radius: 2px;
    position: relative;
    transition: height 0.1s ease;
}

.progress-bar:hover {
    height: 6px;
}

.progress-filled {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    border-radius: 2px;
    position: relative;
}

.progress-filled::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transition: transform 0.1s ease;
}

.progress-bar:hover .progress-filled::after {
    transform: translateY(-50%) scale(1);
}

/* Kontrol Butonları */
.control-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease;
    position: relative;
    z-index: 10; /* Diğer katmanların üstüne çıkarır */
}

.control-btn:hover {
    transform: scale(1.1);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

.time-display {
    font-size: 13px;
    color: #fff;
    font-weight: 400;
}

/* Ses Ayarı */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#volume-slider {
    width: 0;
    opacity: 0;
    transition: width 0.3s, opacity 0.3s;
    cursor: pointer;
    accent-color: white;
}

.volume-container:hover #volume-slider {
    width: 80px;
    opacity: 1;
}

/* Video Altı Detaylar */
.video-details {
    margin-top: 20px;
}

.video-title-large {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.subscribers {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.video-description {
    background-color: var(--surface-color);
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-bottom: 40px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background-color: var(--surface-color);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.page-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.page-btn.active {
    background-color: var(--accent-color);
    color: #000;
}

/* Ad Containers */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 8px 0;
    overflow: hidden;
}

.ad-leaderboard {
    padding: 4px 0;
}

.ad-mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .ad-mobile-only {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 8px 0;
    }
}

/* Pre-Roll Ad Overlay */
.preroll-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preroll-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

#ad-video {
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
}

.preroll-timer {
    position: absolute;
    bottom: 16px;
    left: 16px;
    color: #ccc;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 4px;
}

.preroll-skip {
    position: absolute;
    bottom: 16px;
    right: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 12px 24px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 60;
    min-height: 48px;
    min-width: 48px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.preroll-skip:hover,
.preroll-skip:active {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Skyscraper Ads - Left & Right */
.skyscraper-left,
.skyscraper-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    width: 160px;
    height: 600px;
}

.skyscraper-left {
    left: 8px;
}

.skyscraper-right {
    right: 8px;
}

@media (max-width: 1400px) {
    .skyscraper-left,
    .skyscraper-right {
        display: none;
    }
}

@media (min-width: 1401px) {
    .container {
        max-width: 1000px;
    }
    .watch-container {
        max-width: 900px;
    }
}
.left-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
    transition: transform 0.1s ease;
}

.control-btn:active svg {
    transform: scale(0.9);
}

#skip-backward-btn, 
#skip-forward-btn {
    pointer-events: auto;
    cursor: pointer;
}

