/* 1. DEĞİŞKENLER VE GLOBAL AYARLAR */
:root {
    --barbo-yellow: #FFCC00;
    --barbo-orange: #FF8C00;
    --barbo-white: #FFFFFF;
    --barbo-dark: #333333;
    --barbo-bg: #FFFDF5;
    /* Göz yormayan krem arka plan */
    --barbo-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    --barbo-shadow-active: 0 4px 10px rgba(0, 0, 0, 0.1);
}

@keyframes superPulse {
    0% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.08);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

@keyframes heroPulse {
    from {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    }

    to {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 140, 0, 0.6);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Mobilde tıklama gölgesini siler */
}


body {
    font-family: 'Fredoka', sans-serif !important;
    background-color: var(--barbo-bg);
    overflow-x: hidden;
    color: var(--barbo-dark);
    line-height: 1.4;
}

/* 2. ÜST BAŞLIK (HEADER) */
.app-header {
    height: 70px;
    /* Biraz daha geniş ve ferah */
    background: linear-gradient(135deg, var(--barbo-yellow), var(--barbo-orange));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.logo {
    height: 65px;
}

#user-status {
    background: var(--barbo-white);
    color: var(--barbo-orange);
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 16px;
    /* Çocuklar için net okunur */
    box-shadow: 0 4px 0px #E6B800;
    /* Çizgi film tarzı derinlik */
}

/* 3. KARAKTER ŞERİDİ (BÖLÜMLER) */
#character-filter-section {
    display: none;
    padding: 25px 5px;
    background: #FFF9E6;
    border-bottom: 6px solid #FF8C00;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0;
}

/* Bölümler sekmesi aktifken bağımsız yerleşim */
body.sections-mode #character-filter-section {
    display: block;
    margin-top: 70px;
    /* Header altı */
}

body.home-mode #character-filter-section {
    display: none;
}

#character-filter-section::-webkit-scrollbar {
    display: none;
}

.char-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 95px;
    /* Daha geniş dokunma alanı */
    margin: 0 8px;
    cursor: pointer;
    vertical-align: top;
}

.char-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--barbo-yellow);
    background: radial-gradient(circle, #FFEB3B, #FFC107);
    /* İkon arkası sarı parıltı */
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--barbo-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.char-circle img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.char-card span {
    font-family: 'Fredoka', sans-serif;
    font-size: 18px;
    /* Büyük ve net isimler */
    font-weight: 800;
    color: var(--barbo-orange);
    text-shadow: 1px 1px 0px white;
}

.char-card:active .char-circle,
.char-card.active .char-circle {
    transform: scale(1.15) rotate(5deg) translateY(-5px);
    border-color: #FF4500;
    box-shadow: 0 5px 15px rgba(255, 69, 0, 0.3);
}

.char-card.active span {
    color: #FF4500;
    font-weight: 900;
}

/* 4. VİDEO LİSTESİ (GRID) */
#app-content {
    padding: 20px 15px 110px 15px;
    /* Top padding reduced */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.video-card {
    background: #FFF9E6;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--barbo-shadow);
    border: 3px solid #FFEFB9;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-card:active {
    transform: translateY(4px) scale(0.96);
    box-shadow: var(--barbo-shadow-active);
    border-color: var(--barbo-orange);
}

.thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #FFD700;
    color: #8B4513;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.video-info {
    padding: 3px 10px 6px 10px;
    /* Boşluğu minimuma indir */
    text-align: left;
    /* Netflix tarzı sola hizala */
}

.video-info h3 {
    font-size: 13px;
    /* Daha modern ve küçük başlık */
    color: #444;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* 5. ALT NAVİGASYON (FOOTER NAV) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 75px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 2000;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.08);
    padding: 0 10px;
}

.bottom-nav div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    gap: 4px;
    position: relative;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    color: #888;
}

/* Aktif (Pixar) Stil - Pill Background */
.bottom-nav div.active {
    background: #FFF3E0;
    /* Neşeli hafif turuncu/sarı bir arka plan */
}

.bottom-nav div .nav-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.bottom-nav div.active .nav-icon {
    transform: scale(1.3);
}

.bottom-nav div.active .nav-label {
    font-weight: 900;
}

/* Bireysel Renkler (Sadece Aktifken Parlasınlar) */
.nav-home.active {
    color: #FF5722 !important;
}

.nav-cats.active {
    color: #FFC107 !important;
}

.nav-profile.active {
    color: #4CAF50 !important;
}

/* 6. BUTONLAR VE MESAJLAR */
.btn-pay {
    width: 100%;
    background: linear-gradient(135deg, #FFCC00, #FF8C00);
    color: white;
    padding: 20px;
    border: none;
    border-radius: 20px;
    font-weight: 900;
    font-size: 20px;
    /* Ödeme butonu "bas bana" diyor */
    cursor: pointer;
    box-shadow: 0 6px 0px #CC7000;
    margin-bottom: 10px;
}

.info-box {
    border-radius: 18px;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

/* 7. PRELOADER */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paw-icon {
    font-size: 100px;
    color: var(--barbo-orange);
    animation: rotatePaw 1.5s infinite ease-in-out;
}

@keyframes rotatePaw {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2) rotate(15deg);
    }

    100% {
        transform: scale(1);
    }
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
}

/* 8. SÜPER AYARLAR VE EBEVEYN KONTROLÜ (NETFLIX KIDS STYLE)  backdrop-filter: blur(8px); */

/* Parental Barrier Modal */
#parental-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 40000;
    align-items: center;
    justify-content: center;

}

.barrier-content {
    background: #FF8C00;
    padding: 40px;
    border-radius: 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    border: 8px solid #FFCC00;
    color: white;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.barrier-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.barrier-question {
    font-size: 40px;
    font-weight: 800;
    margin: 20px 0;
    color: #FFF;
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 20px;
}

/* Settings Panel */
#settings-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFF9E6;
    z-index: 35000;
    overflow-y: auto;
    padding-bottom: 50px;
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.settings-header {
    background: linear-gradient(135deg, #FFCC00, #FF8C00);
    padding: 25px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.settings-header h1 {
    color: white;
    font-size: 24px;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
}

.settings-body {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.settings-item {
    background: white;
    margin-bottom: 15px;
    padding: 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid #FDF3D0;
}

.settings-item-info h3 {
    color: #FF8C00;
    font-size: 18px;
    margin-bottom: 4px;
}

.settings-item-info p {
    font-size: 13px;
    color: #888;
}

/* Switch Toggle Custom */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #FF8C00;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Dark Mode Support */
body.dark-mode {
    background-color: #1a1a1a !important;
    color: #f1f1f1 !important;
}

body.dark-mode #app-content,
body.dark-mode #character-filter-section,
body.dark-mode #settings-panel {
    background-color: #1a1a1a !important;
}

body.dark-mode .video-card,
body.dark-mode .settings-item,
body.dark-mode .price-card,
body.dark-mode .modal-content {
    background-color: #2a2a2a !important;
    border-color: #333 !important;
    color: white !important;
}

body.dark-mode .video-info h3,
body.dark-mode .settings-item-info h3,
body.dark-mode .price-card h3 {
    color: #FFB74D !important;
}

body.dark-mode .bottom-nav {
    background-color: #1a1a1a !important;
    border-color: #333 !important;
}

.limit-select {
    padding: 10px;
    border-radius: 12px;
    border: 2px solid #FFCC00;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    color: #FF8C00;
    font-weight: bold;
    background: white;
}

/* 9. EKRAN KILIDI SISTEMI */
#player-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.01);
    z-index: 1000;
    pointer-events: auto;
}

#lock-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    z-index: 2000;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
    transition: all 0.5s ease;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
}

#lock-btn.visible {
    opacity: 1;
    visibility: visible;
}

#lock-btn.locked {
    background: rgba(244, 67, 54, 0.9);
    transform: scale(1.1);
}

#lock-btn:active {
    transform: scale(0.9);
}


/* Sıradaki Videolar İçin Kart Tasarımı */
.suggestion-card {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #FFF9E6;
    padding: 12px;
    border-radius: 20px;
    cursor: pointer;
    margin-bottom: 15px;
    border: 2px solid #FFCC00;
    position: relative;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: 0.2s;
}

.suggestion-card:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#hero-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    /* Zırh gibi koruma: aspect-ratio öncelikli */
    max-height: 56.25vw;
    /* 100 * 9/16 */
    background: #000;
    margin-top: 0;
    overflow: hidden;
    z-index: 1000;
}

#hero-v0 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#trust-info-bar {
    margin-top: 70px;
    background: rgba(255, 140, 0, 0.05);
    border-bottom: 1px solid rgba(255, 140, 0, 0.1);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 8px 0;
    color: #FF8C00;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    z-index: 1500;
}

@media (max-width: 768px) {
    #trust-info-bar span {
        display: inline-block;
        padding-left: 100%;
        animation: ticker 15s linear infinite;
    }
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}



.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hero-btn-group {
    display: flex;
    gap: 12px;
}

.btn-hero-play {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: orange;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    transition: 0.3s;
}

.btn-hero-play:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.4);
}



#hero-mute-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    opacity: 0.6;
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, #FFF9E6 0%, rgba(255, 249, 230, 0) 100%);
    pointer-events: none;
    z-index: 20;
}

body.dark-mode .hero-gradient {
    background: linear-gradient(to top, #1a1a1a 0%, rgba(26, 26, 26, 0) 100%);
}

#pwa-top-pill {
    display: none;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    color: #FF8C00;
    font-weight: 800;
    padding: 10px 22px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: superPulse 2s infinite ease-in-out;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
}

#pwa-settings-item {
    display: none;
    transition: 0.3s;
}

#pwa-settings-item:active {
    transform: scale(0.95);
}