:root{
    --bg:#071426;
    --panel:#101f3b;
    --text:#ffffff;
    --muted:#aab8d0;
}

*{
    box-sizing:border-box;
}

html{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
}

body{
    margin:0;
    width:100%;
    max-width:100%;
    min-height:100vh;
    overflow-x:hidden;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color:var(--text);

    background:
        radial-gradient(
            circle at 80% -10%,
            #32215d 0,
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #071426,
            #0c1730
        );

    padding-bottom:110px;
}

button{
    font:inherit;
    cursor:pointer;
}

.top{
    width:min(1280px,92%);
    margin:auto;

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:22px 0;
}

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

.brand-icon{
    width:58px;
    height:58px;

    display:grid;
    place-items:center;

    border-radius:19px;

    font-size:31px;

    background:
        linear-gradient(
            135deg,
            #ffc300,
            #ff4d8d
        );

    box-shadow:
        0 10px 30px
        rgba(255,77,141,.25);
}

.brand h1{
    margin:0;
    font-size:29px;
}

.brand p{
    margin:2px 0 0;
    color:var(--muted);
}

.top-actions{
    display:flex;
    gap:10px;
}

.search-button,
.parent-button{
    border:1px solid rgba(255,255,255,.09);

    background:
        rgba(255,255,255,.07);

    color:white;

    border-radius:20px;

    min-height:46px;

    padding:0 17px;
}

main{
    width:min(1280px,92%);
    margin:auto;
}

.hero{
    position:relative;

    min-height:330px;

    overflow:hidden;

    border-radius:36px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:44px;

    background:
        radial-gradient(
            circle at 78% 25%,
            rgba(255,255,255,.18),
            transparent 18%
        ),
        linear-gradient(
            130deg,
            #2361e8,
            #6240d0 60%,
            #ae3bc7
        );

    box-shadow:
        0 25px 70px
        rgba(0,0,0,.28);
}

.hero:after{
    content:"";

    position:absolute;

    width:300px;
    height:300px;

    right:-70px;
    bottom:-160px;

    border-radius:50%;

    background:
        rgba(255,255,255,.09);
}

.hero-content{
    position:relative;
    z-index:2;
}

.hello{
    display:inline-block;

    padding:8px 15px;

    border-radius:18px;

    background:
        rgba(255,255,255,.15);

    font-weight:700;
}

.hero h2{
    max-width:700px;

    margin:
        14px 0 10px;

    font-size:
        clamp(36px,5vw,62px);

    line-height:1.02;
}

.hero p{
    margin:0;

    font-size:20px;

    color:
        rgba(255,255,255,.83);
}

.hero-play{
    margin-top:24px;

    border:0;

    border-radius:30px;

    padding:15px 26px;

    background:white;

    color:#17265c;

    font-weight:900;

    box-shadow:
        0 8px 25px
        rgba(0,0,0,.18);
}

.hero-art{
    position:relative;
    z-index:2;

    font-size:
        clamp(110px,16vw,205px);

    transform:
        rotate(-8deg);

    filter:
        drop-shadow(
            0 25px 20px
            rgba(0,0,0,.2)
        );
}

.section{
    margin-top:42px;
}

.section-title span{
    color:#7889aa;

    font-size:12px;

    font-weight:900;

    letter-spacing:2px;
}

.section-title h3{
    margin:
        5px 0 18px;

    font-size:26px;
}

.catalog-grid{
    display:grid;

    grid-template-columns:
        repeat(3,1fr);

    gap:18px;
}

.collection-card{
    position:relative;

    min-height:245px;

    border:0;

    border-radius:30px;

    padding:25px;

    color:white;

    text-align:left;

    overflow:hidden;

    display:flex;
    flex-direction:column;
    justify-content:flex-end;

    box-shadow:
        0 16px 35px
        rgba(0,0,0,.18);

    transition:
        transform .18s ease;
}

.collection-card:hover{
    transform:
        translateY(-5px);
}

.collection-card.orange{
    background:
        linear-gradient(
            135deg,
            #ff9d00,
            #ff477e
        );
}

.collection-card.purple{
    background:
        linear-gradient(
            135deg,
            #6930c3,
            #f72585
        );
}

.collection-card.green{
    background:
        linear-gradient(
            135deg,
            #00b894,
            #0984e3
        );
}

.collection-card.blue{
    background:
        linear-gradient(
            135deg,
            #0077b6,
            #4361ee
        );
}

.collection-card .icon{
    position:absolute;

    top:20px;
    right:22px;

    font-size:82px;

    filter:
        drop-shadow(
            0 12px 12px
            rgba(0,0,0,.15)
        );
}

.collection-card strong{
    font-size:25px;
}

.collection-card small{
    margin-top:5px;

    font-size:15px;

    color:
        rgba(255,255,255,.8);
}

.category-row{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.category{
    border:
        1px solid
        rgba(255,255,255,.08);

    border-radius:22px;

    padding:14px 21px;

    background:
        rgba(255,255,255,.07);

    color:white;

    font-weight:700;
}

.category:hover{
    background:
        rgba(255,255,255,.13);
}

.loading{
    grid-column:1/-1;

    padding:40px;

    text-align:center;

    color:var(--muted);
}

.bottom-nav{
    position:fixed;

    left:50%;
    bottom:18px;

    transform:
        translateX(-50%);

    z-index:20;

    display:flex;
    gap:5px;

    padding:8px;

    border:
        1px solid
        rgba(255,255,255,.1);

    border-radius:29px;

    background:
        rgba(4,12,28,.90);

    backdrop-filter:
        blur(20px);

    box-shadow:
        0 15px 50px
        rgba(0,0,0,.35);
}

.bottom-nav button{
    min-width:105px;

    border:0;

    border-radius:22px;

    padding:8px 15px;

    background:transparent;

    color:#98a7c2;
}

.bottom-nav button.active{
    background:
        rgba(255,255,255,.1);

    color:white;
}

.bottom-nav b{
    display:block;
    font-size:22px;
}

.bottom-nav span{
    display:block;

    margin-top:3px;

    font-size:12px;
}

.modal{
    position:fixed;

    inset:0;

    z-index:100;

    display:grid;
    place-items:center;

    padding:20px;
}

.modal.hidden{
    display:none;
}

.modal-backdrop{
    position:absolute;

    inset:0;

    background:
        rgba(0,0,0,.72);

    backdrop-filter:
        blur(10px);
}

.modal-card{
    position:relative;
    z-index:2;

    width:min(700px,100%);

    max-height:85vh;

    overflow-y:auto;

    padding:35px;

    border:
        1px solid
        rgba(255,255,255,.1);

    border-radius:32px;

    background:#101d35;

    box-shadow:
        0 30px 100px
        rgba(0,0,0,.5);
}

.modal-close{
    position:absolute;

    top:18px;
    right:18px;

    width:42px;
    height:42px;

    border:0;
    border-radius:50%;

    background:
        rgba(255,255,255,.1);

    color:white;

    font-size:18px;
}

.modal-icon{
    font-size:80px;
}

.modal-card h2{
    margin:
        10px 0 5px;

    font-size:34px;
}

.modal-card > p{
    color:var(--muted);
}

.episode-list{
    margin-top:25px;
}

.empty-collection{
    padding:30px;

    border-radius:22px;

    background:
        rgba(255,255,255,.06);

    text-align:center;

    color:#b7c4da;
}

@media(max-width:800px){

    .catalog-grid{
        grid-template-columns:
            repeat(2,1fr);
    }

    .hero{
        min-height:280px;
        padding:30px;
    }

    .hero-art{
        font-size:110px;
    }

}

@media(max-width:560px){

    .top{
        padding:15px 0;
    }

    .brand-icon{
        width:48px;
        height:48px;
    }

    .brand h1{
        font-size:23px;
    }

    .brand p{
        display:none;
    }

    .parent-button{
        font-size:0;
        width:46px;
        padding:0;
    }

    .parent-button:after{
        content:"🔒";
        font-size:18px;
    }

    .hero{
        min-height:270px;
        padding:25px;
    }

    .hero h2{
        font-size:38px;
    }

    .hero p{
        font-size:16px;
    }

    .hero-art{
        display:none;
    }

    .catalog-grid{
        gap:12px;
    }

    .collection-card{
        min-height:190px;
        padding:18px;
    }

    .collection-card .icon{
        font-size:60px;
    }

    .collection-card strong{
        font-size:19px;
    }

    .bottom-nav{
        width:
            calc(100% - 24px);

        justify-content:space-around;
    }

    .bottom-nav button{
        min-width:0;
        flex:1;
    }

}

/* =========================================================
   BABY TV - PLAYER
   ========================================================= */

.video-item{
    width:100%;
    border:0;
    margin:0 0 12px;
    padding:15px;
    border-radius:20px;
    background:rgba(255,255,255,.07);
    color:white;
    display:flex;
    align-items:center;
    gap:14px;
    text-align:left;
}

.video-item:hover{
    background:rgba(255,255,255,.12);
}

.video-item-icon{
    width:55px;
    height:55px;
    flex:0 0 55px;
    display:grid;
    place-items:center;
    border-radius:16px;
    background:rgba(255,255,255,.1);
    font-size:27px;
}

.video-item strong{
    display:block;
    font-size:16px;
}

.video-item small{
    display:block;
    margin-top:4px;
    color:#9eacc5;
}

.player-overlay{
    position:fixed;
    inset:0;
    z-index:300;
    background:#000;
    display:flex;
    flex-direction:column;
}

.player-overlay.hidden{
    display:none;
}

.player-top{
    min-height:65px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 18px;
    background:#071426;
}

.player-title{
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    padding-right:15px;
    font-weight:800;
}

.player-close{
    border:0;
    border-radius:18px;
    padding:11px 18px;
    background:#fff;
    color:#071426;
    font-weight:900;
}

.player-body{
    flex:1;
    min-height:0;
    display:grid;
    place-items:center;
    background:#000;
}

.player-body iframe,
.player-body video{
    width:100%;
    height:100%;
    border:0;
    background:#000;
}

.external-box{
    text-align:center;
    padding:35px;
}

.external-box .big{
    font-size:80px;
}

.external-box a{
    display:inline-block;
    margin-top:20px;
    padding:15px 25px;
    border-radius:25px;
    background:white;
    color:#111;
    text-decoration:none;
    font-weight:900;
}

/* =========================================================
   ADMIN
   ========================================================= */

.admin-overlay{
    position:fixed;
    inset:0;
    z-index:250;
    padding:25px;
    overflow-y:auto;
    background:rgba(3,10,24,.96);
}

.admin-overlay.hidden{
    display:none;
}

.admin-panel{
    width:min(850px,100%);
    margin:20px auto;
    padding:30px;
    border-radius:30px;
    background:#101f3b;
}

.admin-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
}

.admin-head h2{
    margin:0;
}

.admin-close{
    width:45px;
    height:45px;
    border:0;
    border-radius:50%;
    background:rgba(255,255,255,.1);
    color:white;
}

.admin-note{
    margin:20px 0;
    padding:15px;
    border-radius:17px;
    background:rgba(255,193,7,.1);
    color:#ffd76b;
}

.admin-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.admin-field{
    display:flex;
    flex-direction:column;
    gap:7px;
}

.admin-field.full{
    grid-column:1/-1;
}

.admin-field label{
    font-size:13px;
    font-weight:800;
    color:#b9c5da;
}

.admin-field input,
.admin-field select{
    width:100%;
    min-height:48px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:15px;
    padding:0 14px;
    background:#08162c;
    color:white;
    outline:none;
}

.admin-save{
    margin-top:18px;
    border:0;
    border-radius:18px;
    padding:14px 22px;
    background:#4cc9f0;
    color:#04111e;
    font-weight:900;
}

.admin-message{
    margin-top:15px;
    min-height:25px;
}

.admin-video-list{
    margin-top:30px;
}

.admin-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    margin-top:10px;
    padding:14px;
    border-radius:16px;
    background:rgba(255,255,255,.06);
}

.admin-row button{
    border:0;
    border-radius:12px;
    padding:9px 12px;
    background:#ff4d6d;
    color:white;
}

@media(max-width:600px){
    .admin-grid{
        grid-template-columns:1fr;
    }

    .admin-field.full{
        grid-column:auto;
    }

    .admin-overlay{
        padding:10px;
    }

    .admin-panel{
        padding:20px;
    }
}

/* =========================================================
   BABY TV - PLAYER
   ========================================================= */

.video-item{
    width:100%;
    border:0;
    margin:0 0 12px;
    padding:15px;
    border-radius:20px;
    background:rgba(255,255,255,.07);
    color:white;
    display:flex;
    align-items:center;
    gap:14px;
    text-align:left;
}

.video-item:hover{
    background:rgba(255,255,255,.12);
}

.video-item-icon{
    width:55px;
    height:55px;
    flex:0 0 55px;
    display:grid;
    place-items:center;
    border-radius:16px;
    background:rgba(255,255,255,.1);
    font-size:27px;
}

.video-item strong{
    display:block;
    font-size:16px;
}

.video-item small{
    display:block;
    margin-top:4px;
    color:#9eacc5;
}

.player-overlay{
    position:fixed;
    inset:0;
    z-index:300;
    background:#000;
    display:flex;
    flex-direction:column;
}

.player-overlay.hidden{
    display:none;
}

.player-top{
    min-height:65px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 18px;
    background:#071426;
}

.player-title{
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    padding-right:15px;
    font-weight:800;
}

.player-close{
    border:0;
    border-radius:18px;
    padding:11px 18px;
    background:#fff;
    color:#071426;
    font-weight:900;
}

.player-body{
    flex:1;
    min-height:0;
    display:grid;
    place-items:center;
    background:#000;
}

.player-body iframe,
.player-body video{
    width:100%;
    height:100%;
    border:0;
    background:#000;
}

.external-box{
    text-align:center;
    padding:35px;
}

.external-box .big{
    font-size:80px;
}

.external-box a{
    display:inline-block;
    margin-top:20px;
    padding:15px 25px;
    border-radius:25px;
    background:white;
    color:#111;
    text-decoration:none;
    font-weight:900;
}

/* =========================================================
   ADMIN
   ========================================================= */

.admin-overlay{
    position:fixed;
    inset:0;
    z-index:250;
    padding:25px;
    overflow-y:auto;
    background:rgba(3,10,24,.96);
}

.admin-overlay.hidden{
    display:none;
}

.admin-panel{
    width:min(850px,100%);
    margin:20px auto;
    padding:30px;
    border-radius:30px;
    background:#101f3b;
}

.admin-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
}

.admin-head h2{
    margin:0;
}

.admin-close{
    width:45px;
    height:45px;
    border:0;
    border-radius:50%;
    background:rgba(255,255,255,.1);
    color:white;
}

.admin-note{
    margin:20px 0;
    padding:15px;
    border-radius:17px;
    background:rgba(255,193,7,.1);
    color:#ffd76b;
}

.admin-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.admin-field{
    display:flex;
    flex-direction:column;
    gap:7px;
}

.admin-field.full{
    grid-column:1/-1;
}

.admin-field label{
    font-size:13px;
    font-weight:800;
    color:#b9c5da;
}

.admin-field input,
.admin-field select{
    width:100%;
    min-height:48px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:15px;
    padding:0 14px;
    background:#08162c;
    color:white;
    outline:none;
}

.admin-save{
    margin-top:18px;
    border:0;
    border-radius:18px;
    padding:14px 22px;
    background:#4cc9f0;
    color:#04111e;
    font-weight:900;
}

.admin-message{
    margin-top:15px;
    min-height:25px;
}

.admin-video-list{
    margin-top:30px;
}

.admin-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    margin-top:10px;
    padding:14px;
    border-radius:16px;
    background:rgba(255,255,255,.06);
}

.admin-row button{
    border:0;
    border-radius:12px;
    padding:9px 12px;
    background:#ff4d6d;
    color:white;
}

@media(max-width:600px){
    .admin-grid{
        grid-template-columns:1fr;
    }

    .admin-field.full{
        grid-column:auto;
    }

    .admin-overlay{
        padding:10px;
    }

    .admin-panel{
        padding:20px;
    }
}

/* =========================================================
   BABY TV - YOUTUBE SEARCH
   ========================================================= */

.youtube-search-box{
    margin:22px 0;
    padding:20px;
    border-radius:24px;
    background:rgba(255,255,255,.055);
    border:1px solid rgba(255,255,255,.08);
}

.youtube-search-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    margin-bottom:16px;
}

.youtube-search-title h3{
    margin:3px 0 0;
    font-size:22px;
}

.youtube-search-title small{
    color:#93a6c6;
    font-weight:900;
    letter-spacing:.08em;
}

.youtube-badge{
    padding:8px 12px;
    border-radius:999px;
    background:#fff;
    color:#111;
    font-size:12px;
    font-weight:900;
}

.youtube-search-controls{
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px;
}

.youtube-search-controls input{
    min-height:52px;
    padding:0 16px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:17px;
    outline:none;
    background:#07152b;
    color:#fff;
    font-size:16px;
}

.youtube-search-controls button,
.youtube-search-options button{
    border:0;
    border-radius:17px;
    padding:0 18px;
    min-height:48px;
    font-weight:900;
    cursor:pointer;
}

#youtubeSearchButton{
    background:#fff;
    color:#071426;
}

#youtubeImportSelected{
    background:#4cc9f0;
    color:#04111e;
}

#youtubeSelectAll{
    background:rgba(255,255,255,.1);
    color:#fff;
}

.youtube-search-options{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
    margin-top:13px;
}

.youtube-search-options label{
    color:#aebbd0;
    font-size:13px;
    font-weight:800;
}

.youtube-search-options select{
    min-height:48px;
    max-width:240px;
    padding:0 12px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:15px;
    background:#07152b;
    color:#fff;
}

.youtube-search-status{
    margin:17px 0 10px;
    color:#b8c4d9;
    font-size:14px;
}

.youtube-results{
    display:grid;
    grid-template-columns:
        repeat(auto-fill,minmax(210px,1fr));
    gap:14px;
    margin-top:15px;
}

.youtube-result{
    position:relative;
    overflow:hidden;
    border-radius:20px;
    background:#09182f;
    border:2px solid transparent;
    transition:.15s ease;
}

.youtube-result.selected{
    border-color:#4cc9f0;
    transform:translateY(-2px);
}

.youtube-thumb{
    position:relative;
    aspect-ratio:16/9;
    overflow:hidden;
    background:#020812;
}

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

.youtube-check{
    position:absolute;
    top:10px;
    left:10px;
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:rgba(0,0,0,.78);
    backdrop-filter:blur(5px);
}

.youtube-check input{
    width:19px;
    height:19px;
    accent-color:#4cc9f0;
}

.youtube-duration{
    position:absolute;
    right:8px;
    bottom:8px;
    padding:4px 7px;
    border-radius:7px;
    background:rgba(0,0,0,.82);
    color:#fff;
    font-size:11px;
    font-weight:900;
}

.youtube-info{
    padding:13px;
}

.youtube-info strong{
    display:-webkit-box;
    overflow:hidden;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    line-height:1.3;
    font-size:14px;
}

.youtube-channel{
    margin-top:7px;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    color:#96a8c6;
    font-size:12px;
}

.youtube-preview{
    width:100%;
    margin-top:10px;
    padding:9px;
    border:0;
    border-radius:11px;
    background:rgba(255,255,255,.08);
    color:#fff;
    cursor:pointer;
    font-weight:800;
}

.youtube-empty{
    grid-column:1/-1;
    padding:30px;
    text-align:center;
    border-radius:20px;
    background:rgba(255,255,255,.04);
    color:#aebbd0;
}

@media(max-width:650px){
    .youtube-search-controls{
        grid-template-columns:1fr;
    }

    .youtube-search-controls button{
        min-height:50px;
    }

    .youtube-results{
        grid-template-columns:
            repeat(2,minmax(0,1fr));
        gap:10px;
    }

    .youtube-search-box{
        padding:14px;
    }

    .youtube-info{
        padding:10px;
    }
}

