*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

body{
    color: white;
    min-height: 100vh;

    background:
        radial-gradient(circle at 25% -10%,
            rgba(90,170,255,.16),
            transparent 50%),

        radial-gradient(circle at 85% 0%,
            rgba(35,75,180,.12),
            transparent 55%),

        linear-gradient(
            to bottom,
            #182338,
            #141d2f,
            #101827
        );

    background-attachment: fixed;
}

/* Header */

.header{
    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    align-items: center;

    padding: 18px 40px;

    background: rgba(10, 15, 25, 0.55);

    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);

    border: 1px solid rgba(255,255,255,.12);
    border-top: none;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        inset 0 -1px 0 rgba(255,255,255,.04),
        0 8px 32px rgba(0,0,0,.25),
        0 0 30px rgba(77,163,255,.08);
}

.header-left{

    display:flex;
    align-items:center;
    gap:40px;

}

.logo,
.logo:visited{

    color:white;
    text-decoration:none;

    font-size:28px;
    font-weight:bold;

    transition:.2s;

}

.logo:hover{

    color:#8db9ff;
    transform:scale(1.03);

}

/* Navigation */

.nav{

    display:flex;
    gap:30px;

}

.nav a{

    color:white;
    text-decoration:none;

    font-size:19px;
    font-weight:bold;

    transition:.2s;

}

.request a:hover{

    color:#8db9ff;
    transform:scale(1.05);

}

.request a.active{

    color:#8db9ff;

}

.request{
    display: flex;
    gap: 30px;

    margin-left: auto;
}

.request a{

    color:white;
    text-decoration:none;

    font-size:19px;
    font-weight:bold;

    transition:.2s;

}

.nav a:hover{

    color:#8db9ff;
    transform:scale(1.05);

}

.nav a.active{

    color:#8db9ff;

}

/* Search */

.search-box{

    display:flex;
    align-items:center;
    gap:12px;
    position:relative;
    width:420px;

    padding:8px 18px;

    border-radius:999px;

    background:#151d2c;

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

}

.search-box span{

    font-size:20px;
    opacity:.7;

}

.search{

    flex:1;

    background:none;
    border:none;
    outline:none;

    color:white;
    font-size:16px;

}

.search::placeholder{

    color:#7f8aa1;

}

.search-dropdown{

    position:absolute;

    top:calc(100% + 10px);
    left:0;

    width:100%;
    max-height:500px;

    overflow-y:auto;

    display:none;

    background:rgba(17,24,39,.97);

    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);

    border:1px solid rgba(255,255,255,.06);
    border-radius:18px;

    box-shadow:
        0 16px 40px rgba(0,0,0,.45),
        0 1px 0 rgba(77,163,255,.08);

    z-index:1000;

}

.search-result-item{

    display:flex;
    gap:14px;

    padding:12px;

    color:white;
    text-decoration:none;

    border-radius:12px;

    transition:.18s;

}

.search-result-item:hover {
    background: #333;
}

.search-result-item img{

    width:120px;
    aspect-ratio:16/9;

    object-fit:cover;

    border-radius:10px;

    flex-shrink:0;

}

.search-result-info{

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

    min-width:0;

}

.search-result-info h4{

    margin-bottom:6px;

    font-size:16px;
    font-weight:bold;

}

.search-result-info p{

    color:#8db9ff;
    font-size:14px;

    margin-bottom:6px;

}

.search-result-info small{

    color:#9f9f9f;

    line-height:1.4;

}

.search-dropdown::-webkit-scrollbar{
    width:8px;
}

.search-dropdown::-webkit-scrollbar-thumb{
    background:#3d4b63;
    border-radius:999px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover{
    background:#4da3ff;
}

/* Layout */

.container{
    padding:20px 40px;

}

/* Cards */

.grid{

    display:grid;

    grid-template-columns:repeat(auto-fit, 300px);

    justify-content:center;

    gap:24px;
    padding:8px 0 16px;
}

.card{
    cursor:pointer;
    transition:.2s;
    border-radius:16px;

    color:white;
    text-decoration:none;
}

.card:hover{
    transform:scale(1.04);
}

.card:hover .thumb{

    box-shadow:
        0 0 0 3px rgba(255,255,255,.9),
        0 10px 30px rgba(255,255,255,.15);

    outline:1px solid rgba(255,255,255,.25);

}

.thumb{

    position:relative;

    width:100%;
    aspect-ratio:16/9;

    overflow:hidden;

    border-radius:14px;

    background:#2d2d2d;

}

.thumb > img:first-child{
    width:100%;
    height:100%;
    object-fit:cover;
}

.duration{
    position:absolute;
    right:8px;
    bottom:8px;
    background:rgba(0,0,0,.8);
    padding:4px 7px;
    border-radius:5px;
    font-size:13px;
}

.card h3{

    margin-top:12px;
    font-size:18px;

}

.card p{

    margin-top:5px;
    color:#9f9f9f;

}

.video-section{

    margin-bottom:40px;

}

.section-title{
    margin-left:10px;
    font-size:24px;
}

.video-row{
    display:flex;
    gap:24px;

    overflow-x:auto;
    overflow-y:visible;

    padding:8px 0 16px;
    justify-content:flex-start;
}

.video-row-container{
    position: relative;
}

.video-row::-webkit-scrollbar{

    display:none;

}

.video-row .card{

    width:300px;
    flex:0 0 auto;
}

.scroll-btn{
    position:absolute;
    top:25%;

    width:46px;
    height:80px;

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

    padding:0;

    border:none;
    border-radius:10px;

    background:rgba(0,0,0,.55);
    color:white;

    font-size:32px;
    line-height:1;
    font-family:Arial, sans-serif;

    cursor:pointer;

    opacity:0;
    transition:.2s;

    z-index:5;
}

.video-row-container:hover .scroll-btn{
    opacity:1;
}

.scroll-btn:hover{
    background:rgba(0,0,0,.8);
}

.scroll-btn.left{
    left:0;
}

.scroll-btn.right{
    right:0;
}

.scroll-btn spanR{
    transform:translateX(-15px);
}

.fade-in{

    animation:pageFade .5s ease;

}

@keyframes pageFade{

    from{

        opacity:0;
        transform:translateY(10px);
    }

    to{

        opacity:1;
        transform:translateY(0);
    }

}

.thumbnail{
    width:100%;
    aspect-ratio:16/9;

    object-fit:cover;

    border-radius:18px;

    box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.layout{
    display:grid;

    grid-template-columns:600px minmax(0, 1fr);

    gap:55px;

    align-items:start;
}

.title{
    font-size:56px;
    line-height:1.05;

    margin-bottom:8px;
    text-shadow:0 4px 12px rgba(0,0,0,.35);
}

.description{

    font-size:18px;
    line-height:1.7;

    max-width:750px;

    margin:24px 0 36px;
    text-shadow:0 4px 12px rgba(0,0,0,.35);
}

.buttons{
    display:flex;
    gap:18px;
}

.info{
    display:flex;
    flex-direction:column;
    width:100%;
    text-shadow:0 4px 12px rgba(0,0,0,.35);
}

.watch-btn{

    display:inline-flex;
    align-items:center;
    gap:14px;

    width:fit-content;

    padding:15px 15px;

    border-radius:18px;

    background:linear-gradient(
        to bottom,
        #5ea8ff,
        #4b90e8
    );

    color:white;
    text-decoration:none;

    font-size:22px;
    font-weight:700;

    box-shadow:
        0 8px 24px rgba(77, 163, 255, 0.196);

    transition:
        transform .2s,
        box-shadow .2s,
        filter .2s;
}

.watch-btn:hover{

    transform:translateY(-2px);

    filter:brightness(1.05);

    box-shadow:
        0 14px 32px rgba(77, 163, 255, 0.18);

}

.watch-btn:active{

    transform:scale(.98);

}

#app{
    opacity:0;
}

#app.loaded{
    opacity:1;
    transition:.25s;
}

.play{

    width:0;
    height:0;

    border-top:10px solid transparent;
    border-bottom:10px solid transparent;
    border-left:16px solid white;

}

.progress-bar{
    position:absolute;
    left:8px;
    right:8px;
    bottom:4px;

    height:8px;
    border-radius:999px;
    overflow:hidden;

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

.progress-fill{
    height:100%;
    background:#4da3ff;
    border-radius:999px;
}

.footer{
    margin-top: 80px;
    padding: 40px 0;
    text-align: center;

    color: rgba(255,255,255,.5);
    font-size: 14px;

    border-top: 1px solid rgba(255,255,255,.08);
}

/* ===================== MOBILE RESPONSIVE ===================== */

@media (max-width: 1024px) {
    .header {
        padding: 16px 24px;
    }
    
    .search-box {
        width: 320px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .video-row .card {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-left {
        gap: 20px;
    }
    
    .nav, .request {
        display: none; /* Hide nav on very small screens; add hamburger later */
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
        order: 3;
    }
    
    .container {
        padding: 16px 16px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 18px;
    }
    
    .video-row {
        gap: 16px;
        padding: 4px 0 12px;
    }
    
    .video-row .card {
        width: 220px;
    }
    
    .card h3 {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 22px;
        margin-left: 0;
    }
    
    /* Watch page */
    .layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .title {
        font-size: 38px;
        line-height: 1.1;
    }
    
    .description {
        font-size: 16px;
        margin: 20px 0 28px;
    }
    
    .watch-btn {
        font-size: 19px;
        padding: 14px 20px;
    }
    
    .thumbnail {
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 14px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    
    .video-row .card {
        width: 100%;
        max-width: 100%;
    }
    
    .video-row {
        gap: 14px;
    }
    
    .card h3 {
        font-size: 15.5px;
    }
    
    .search-box {
        padding: 10px 14px;
    }
    
    .search {
        font-size: 15px;
    }
    
    .title {
        font-size: 32px;
    }
    
    .footer {
        font-size: 13px;
        padding: 30px 0;
    }
}

/* Text wrapping improvements */
h1, h2, h3, h4, .title, .card h3 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.card p, .description, .search-result-info small {
    word-break: break-word;
    overflow-wrap: break-word;
}

.movie-logo{
    position:absolute;

    left:50%;
    top:80%;

    transform:translate(-50%, -50%);

    width:70%;
    max-height:35%;

    object-fit:contain;

    pointer-events:none;

    filter:
        drop-shadow(0 6px 12px rgba(0,0,0,.8))
        drop-shadow(0 0 20px rgba(0,0,0,.4));
}
