/* ===== BASE ===== */
body {
    background: radial-gradient(circle at top, #000000, #0a0a12 70%);
    color: #eaeaea;
    font-family: 'Segoe UI', sans-serif;
}

/* ===== TEXT ===== */
.text-muted-soft {
    color: rgba(255,255,255,0.6);
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(10,10,20,0.6);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.navbar-brand {
    letter-spacing: 1px;
}

.nav-link {
    color: rgba(255,255,255,0.7) !important;
    transition: .2s;
}

.nav-link:hover {
    color: #fff !important;
}

/* ===== CARD ===== */
.movie-card {
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    transition: all .25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.movie-card:hover {
    box-shadow: 0 0 20px rgba(255,255,255,0.05),
                0 10px 30px rgba(0,0,0,0.6);
}
/* ===== IMAGE ===== */
.movie-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    filter: brightness(0.95);
}

/* ===== TITLE ===== */
.movie-title {
    font-size: 14px;
    padding: 10px;
    color: #ddd;
}

/* ===== EP BADGE ===== */
.badge-ep {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255, 60, 60, 0.85); /* แดง */
    color: #fff;
    backdrop-filter: blur(6px);
}

/* ===== SOUND BADGE ===== */
.badge-sound {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(60, 140, 255, 0.85); /* ฟ้า */
    color: #fff;
    backdrop-filter: blur(6px);
}

.badge-ep,
.badge-sound {
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    letter-spacing: 0.3px;
}

.badge-sub {
    background: rgba(40, 200, 120, 0.85);
    color: #fff;
}

/* ===== SEARCH ===== */
.search-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    backdrop-filter: blur(8px);
}

.search-box:focus {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
    box-shadow: none;
}


/* ===== CONTENT BOX ===== */
.box {
    background: rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: .3s;
}

/* light effect */
.box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.05), transparent);
    opacity: 0;
    transition: .3s;
}

.box:hover::before {
    opacity: 1;
}

.box:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

/* ===== PLAYER ===== */
.player {
    width: 100%;
    height: 520px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: #000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    transition: .3s;
}

.player:hover {
    box-shadow: 0 0 20px rgba(255,255,255,0.05),
                0 10px 40px rgba(0,0,0,0.9);
}

/* ===== EPISODES ===== */
.episodes {
    margin-top: 10px;
}

.episodes a {
    display: inline-block;
    padding: 8px 14px;
    margin: 5px;
    font-size: 13px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
    transition: all .25s ease;
}

/* hover */
.episodes a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: translateY(-2px);
}

/* active episode */
.episodes a.active {
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    background: rgba(255,255,255,0.05);
    border: none;
    color: #ccc;
    margin: 0 3px;
    border-radius: 8px;
}

.pagination .page-item.active .page-link {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.pagination .page-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(180deg, rgba(10,10,20,0.8), #0a0a12);
}

footer a {
    color: rgba(255,255,255,0.6);
    transition: .2s;
}

footer a:hover {
    color: #fff;
}

/* ===== BADGE ===== */
.badge.bg-dark {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ===== SCROLL BAR (โคตรสวย) ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a12;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== GRID LAYOUT ===== */
.anime-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
    gap:16px;
}

/* ===== CARD ===== */
.anime-card{
    text-decoration:none;
    color:#fff;
    display:flex;
    flex-direction:column;
    border-radius:16px;
    overflow:hidden;
    background:rgba(255,255,255,0.03);
    border:1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    transition:.35s ease;
    position:relative;
}

.anime-card:hover{
    transform:translateY(-10px) scale(1.04);
    border-color:rgba(255,255,255,0.2);
    box-shadow:0 20px 60px rgba(0,0,0,0.8);
}

/* ===== POSTER ===== */
.poster{
    position:relative;
    width:100%;
    aspect-ratio:2/3;
    overflow:hidden;
}

.poster img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.5s ease;
}

.anime-card:hover img{
    transform:scale(1.12);
}

/* ===== DARK GRADIENT ===== */
.gradient{
    position:absolute;
    inset:0;
    background:linear-gradient(
        to top,
        rgba(0,0,0,0.85),
        rgba(0,0,0,0.2),
        transparent
    );
}

/* ===== HOVER LAYER (Netflix feel) ===== */
.hover-layer{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    opacity:0;
    transition:.3s ease;
    background:rgba(0,0,0,0.25);
}

.anime-card:hover .hover-layer{
    opacity:1;
}

.play-btn{
    width:44px;
    height:44px;
    border-radius:50%;
    background:rgba(255,255,255,0.15);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    backdrop-filter: blur(10px);
    border:1px solid rgba(255,255,255,0.2);
    margin-bottom:8px;
}

.hint{
    font-size:12px;
    color:rgba(255,255,255,0.8);
}

/* ===== BADGES ===== */
.top-badges{
    position:absolute;
    top:10px;
    left:10px;
    right:10px;
    display:flex;
    justify-content:space-between;
}

.badge{
    font-size:11px;
    padding:5px 8px;
    border-radius:10px;
    font-weight:700;
    backdrop-filter: blur(10px);
}

.badge.ep{
    background:rgba(255,60,60,0.85);
}

.badge.sound{
    background:rgba(60,140,255,0.85);
}

/* ===== TITLE ===== */
.info{
    padding:10px 8px;
    background:rgba(0,0,0,0.25);
}

.title{
    font-size:13px;
    font-weight:500;
    color:#eaeaea;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}