/* ============================================================
   ANIME STREAMING - DARK MODERN THEME
   Glassmorphism + Gradient + Smooth Animation + Mobile First
   ============================================================ */

/* Bootstrap .text-muted default abu-gelap, override agar terbaca di tema gelap */
.text-muted { color: var(--text-muted) !important; }

:root {
    --bg-body: #0b0d13;
    --bg-card: #141824;
    --bg-glass: rgba(20, 24, 36, 0.55);
    --bg-glass-strong: rgba(20, 24, 36, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-main: #e8ecf4;
    --text-muted: #8b93a7;
    --primary: #6c5ce7;
    --primary-2: #a855f7;
    --accent: #ff3d71;
    --gradient-main: linear-gradient(135deg, #6c5ce7 0%, #a855f7 50%, #ff3d71 100%);
    --gradient-soft: linear-gradient(135deg, rgba(108, 92, 231, 0.35), rgba(168, 85, 247, 0.35));
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 25px rgba(124, 77, 255, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(1200px 600px at 90% -10%, rgba(108, 92, 231, 0.18), transparent 60%),
        radial-gradient(1000px 500px at -10% 20%, rgba(255, 61, 113, 0.12), transparent 55%),
        var(--bg-body);
    color: var(--text-main);
    font-family: 'Poppins', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--text-main); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-2); }
img { max-width: 100%; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #2b3245; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============ GLASS NAVBAR ============ */
.glass-navbar {
    background: var(--bg-glass-strong);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-glass);
    padding: .6rem 0;
}
.glass-navbar .navbar-toggler { border-color: var(--border-glass); }
.brand-icon {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gradient-main);
    border-radius: 12px;
    color: #fff; font-size: 1.1rem;
    box-shadow: var(--shadow-glow);
}
.brand-text {
    font-weight: 800; font-size: 1.25rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-logo {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    border-radius: 8px;
}
.glass-navbar .nav-link { color: var(--text-muted); font-weight: 500; font-size: .92rem; padding: .5rem .85rem !important; }
.glass-navbar .nav-link:hover, .glass-navbar .nav-link.active { color: #fff; }
.glass-navbar .nav-link.active {
    background: var(--gradient-soft);
    border-radius: 8px;
}
.glass-dropdown {
    background: var(--bg-glass-strong);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
}
.glass-dropdown .dropdown-item { color: var(--text-main); }
.glass-dropdown .dropdown-item:hover { background: var(--gradient-soft); color: #fff; }
.glass-dropdown .dropdown-divider { border-color: var(--border-glass); }

.btn-gradient {
    background: var(--gradient-main);
    border: none; color: #fff; font-weight: 600;
    border-radius: 10px; transition: transform .2s ease, box-shadow .2s ease;
}
.btn-gradient:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-outline-light { border-radius: 10px; }

/* ============ AVATAR ============ */
.avatar-sm {
    width: 34px; height: 34px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; color: #fff;
    flex-shrink: 0;
}
.avatar-lg {
    width: 120px; height: 120px; border-radius: 50%;
    background: var(--gradient-main);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 3rem; color: #fff; font-weight: 800;
    border: 4px solid var(--border-glass);
    box-shadow: var(--shadow);
}

/* ============ SEARCH BOX ============ */
.search-box { position: relative; }
.search-box > i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: .85rem; z-index: 2;
}
.search-box .form-control {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border-glass);
    color: #fff; border-radius: 30px; padding-left: 34px; min-width: 220px;
}
.search-box .form-control:focus { background: rgba(255,255,255,.1); border-color: var(--primary); box-shadow: none; }
.search-box .form-control::placeholder { color: var(--text-muted); }

.search-results {
    position: absolute; top: 42px; left: 0; right: 0;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    max-height: 420px; overflow-y: auto;
    z-index: 1000; display: none;
    box-shadow: var(--shadow);
}
.search-results.show { display: block; }
.search-results-mobile { position: fixed; left: 12px; right: 12px; top: 62px; z-index: 1001; }
.search-result-item { display: flex; gap: 12px; padding: 10px 14px; align-items: center; }
.search-result-item:hover { background: var(--gradient-soft); }
.search-result-item img { width: 46px; height: 62px; object-fit: cover; border-radius: 6px; }
.search-result-title { font-weight: 600; font-size: .9rem; line-height: 1.2; }
.search-result-meta { font-size: .75rem; color: var(--text-muted); }
.search-no-result { padding: 18px; text-align: center; color: var(--text-muted); font-size: .9rem; }

/* ============ SECTION HEADER ============ */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.2rem;
}
.section-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.25rem; font-weight: 700; margin: 0;
}
.section-title::before {
    content: ''; width: 5px; height: 26px;
    background: var(--gradient-main);
    border-radius: 4px;
}
.section-title .icon {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--gradient-soft); color: #fff; border-radius: 9px; font-size: 1rem;
}
.section-link { font-size: .85rem; color: var(--text-muted); }
.section-link:hover { color: var(--primary-2); }

/* ============ HERO BANNER / SLIDER ============ */
.hero-section { padding-top: 1.5rem; }
.hero-slide {
    position: relative; border-radius: 20px; overflow: hidden;
    min-height: 340px; display: flex; align-items: flex-end;
}
.hero-slide img.hero-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; filter: brightness(.35);
}
.hero-slide .hero-content {
    position: relative; z-index: 2; padding: 2.5rem; width: 100%;
    background: linear-gradient(to top, rgba(11,13,19,.95) 10%, transparent 90%);
}
.hero-title { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: .5rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: .6rem; }
.hero-desc { color: var(--text-muted); max-width: 640px; font-size: .92rem; }
.hero-actions { margin-top: 1rem; display: flex; gap: 10px; flex-wrap: wrap; }

.carousel-indicators { margin-bottom: 1rem; }
.carousel-indicators button { width: 26px !important; height: 4px !important; border-radius: 4px; background: #fff !important; opacity: .4; }
.carousel-indicators button.active { opacity: 1; }

/* ============ ANIME CARD ============ */
.anime-card {
    position: relative; background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    overflow: hidden; margin-bottom: 1.4rem;
    transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
}
.anime-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow), var(--shadow-glow);
}
.anime-card-link { display: block; }

.anime-cover { position: relative; aspect-ratio: 2/3; overflow: hidden; }
.anime-cover-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s ease;
}
.anime-card:hover .anime-cover-img { transform: scale(1.12); }

.anime-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
.badge { font-size: .6rem; font-weight: 700; letter-spacing: .5px; padding: .35em .6em; }
.badge-ongoing { background: linear-gradient(135deg,#ff3d71,#ff8e53); color: #fff; }
.badge-completed { background: linear-gradient(135deg,#10b981,#06b6d4); color: #fff; }
.badge-hd { background: rgba(0,0,0,.7); color: #fff; }
.badge-sub { background: rgba(108,92,231,.9); color: #fff; }

.anime-episode-count {
    position: absolute; bottom: 8px; right: 8px; z-index: 2;
    background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
    color: #fff; font-size: .65rem; font-weight: 600;
    padding: .3em .6em; border-radius: 8px;
}

.anime-info { padding: .8rem .9rem 1rem; }
.anime-title {
    font-size: .88rem; font-weight: 600; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 2.4em; margin-bottom: .1rem;
}
.anime-jp-title {
    font-size: .72rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .45rem;
}
.anime-meta {
    display: flex; flex-wrap: wrap; gap: 8px;
    font-size: .68rem; color: var(--text-muted); margin-bottom: .4rem;
}
.anime-meta span { display: inline-flex; align-items: center; gap: 3px; }
.anime-studio {
    font-size: .7rem; color: var(--primary-2); font-weight: 500;
    margin-bottom: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.anime-genres { display: flex; flex-wrap: wrap; gap: 4px; }
.genre-tag {
    font-size: .6rem; padding: .25em .5em;
    background: rgba(108,92,231,.15); color: #c3b8ff;
    border-radius: 6px;
}

/* ============ WIDGET / PANELS ============ */
.widget {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 1.2rem; margin-bottom: 1.5rem;
}
.widget-title {
    font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem;
    display: flex; align-items: center; gap: 8px;
}
.widget-title::before {
    content: ''; width: 4px; height: 18px; background: var(--gradient-main); border-radius: 3px;
}

/* sidebar sticky */
.sidebar-sticky { position: sticky; top: 80px; }

/* ============ SCHEDULE ============ */
.schedule-day {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius); margin-bottom: 1.4rem; overflow: hidden;
}
.schedule-day-header {
    background: var(--gradient-soft); padding: .8rem 1.2rem; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.schedule-item {
    display: flex; align-items: center; gap: 12px; padding: .7rem 1.2rem;
    border-top: 1px solid var(--border-glass);
    transition: background .2s ease;
}
.schedule-item:hover { background: rgba(255,255,255,.04); }
.schedule-item img { width: 40px; height: 54px; object-fit: cover; border-radius: 6px; }
.schedule-item-time { color: var(--primary-2); font-weight: 600; min-width: 46px; }
.schedule-item-title { font-weight: 500; font-size: .9rem; }

/* ============ GENRE LIST ============ */
.genre-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border-glass);
    padding: .6rem 1.1rem; border-radius: 30px; font-size: .88rem; font-weight: 500;
    transition: all .25s ease; margin: 0 .4rem .7rem 0;
}
.genre-pill:hover { background: var(--gradient-main); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.genre-pill .count { background: rgba(255,255,255,.15); padding: .1em .6em; border-radius: 20px; font-size: .72rem; }

/* ============ ANIME DETAIL ============ */
.detail-banner {
    position: relative; border-radius: 20px; overflow: hidden; min-height: 220px;
    margin-bottom: 2rem;
}
.detail-banner img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.3); position: absolute; inset: 0; }
.detail-banner .detail-banner-cover {
    position: relative; z-index: 2; display: flex; gap: 1.8rem;
    align-items: flex-end; padding: 2rem;
}
.detail-cover {
    width: 220px; height: 310px; object-fit: cover;
    border-radius: 14px; border: 3px solid var(--border-glass);
    box-shadow: var(--shadow); flex-shrink: 0;
}
.detail-head h1 { font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .2rem; }
.detail-jp { color: var(--text-muted); font-size: .95rem; margin-bottom: .8rem; }

.info-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px; margin-bottom: 1rem;
}
.info-item {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm); padding: .7rem 1rem;
}
.info-item .label { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.info-item .value { font-weight: 600; font-size: .92rem; }

.rating-big {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gradient-main); color: #fff; font-weight: 800;
    padding: .5rem 1.1rem; border-radius: 30px; font-size: 1rem;
    box-shadow: var(--shadow-glow);
}

.synopsis-text { color: var(--text-muted); line-height: 1.8; font-size: .95rem; }

/* episode list */
.episode-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px; max-height: 480px; overflow-y: auto; padding-right: 6px;
}
.episode-btn {
    display: flex; flex-direction: column; gap: 2px;
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm); padding: .7rem; text-align: center;
    transition: all .25s ease;
}
.episode-btn:hover { background: var(--gradient-main); color: #fff; transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.episode-btn .ep-num { font-weight: 700; font-size: .95rem; }
.episode-btn .ep-date { font-size: .65rem; opacity: .8; }
.episode-btn.active { background: var(--gradient-main); color: #fff; }

/* ============ PLAYER ============ */
.player-wrapper {
    background: #000; border-radius: var(--radius); overflow: hidden;
    position: relative; box-shadow: var(--shadow);
}
.player-wrapper.theater {
    position: fixed; inset: 0; z-index: 2000; border-radius: 0;
    background: #000; display: flex; align-items: center; justify-content: center;
}
.player-wrapper.theater video { max-height: 100vh; }
.player-wrapper video { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }

.custom-controls {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: .6rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,.92), transparent);
    position: absolute; left: 0; right: 0; bottom: 0;
    transition: opacity .3s ease;
}
.custom-controls.hidden { opacity: 0; pointer-events: none; }
.ctrl-btn {
    background: transparent; border: none; color: #fff; font-size: 1.1rem;
    padding: 4px 6px; cursor: pointer; border-radius: 6px;
    transition: background .2s, color .2s;
}
.ctrl-btn:hover { background: rgba(255,255,255,.15); }
.ctrl-btn.active { color: var(--primary-2); }
.progress-bar-wrap { flex: 1; min-width: 120px; height: 6px; background: rgba(255,255,255,.2); border-radius: 6px; cursor: pointer; position: relative; }
.progress-bar-fill {
    height: 100%; background: var(--gradient-main); border-radius: 6px; width: 0;
    position: relative;
}
.progress-bar-fill::after {
    content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
    width: 12px; height: 12px; background: #fff; border-radius: 50%;
}
.time-display { font-size: .75rem; color: #fff; font-variant-numeric: tabular-nums; }
.ctrl-group { display: flex; align-items: center; gap: 4px; }
.player-select {
    background: rgba(0,0,0,.7); color: #fff; border: 1px solid var(--border-glass);
    border-radius: 6px; font-size: .75rem; padding: .25rem .5rem; cursor: pointer;
}
.player-ads-badge {
    position: absolute; top: 12px; left: 12px; z-index: 5;
    background: rgba(0,0,0,.7); padding: .3rem .8rem; border-radius: 8px; font-size: .75rem;
}

/* ============ COMMENTS ============ */
.comment-item { display: flex; gap: 12px; margin-bottom: 1.2rem; }
.comment-body {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm); padding: .8rem 1rem; flex: 1;
}
.comment-username { font-weight: 600; font-size: .9rem; }
.comment-time { font-size: .7rem; color: var(--text-muted); }
.comment-text { font-size: .88rem; color: var(--text-muted); margin-top: .3rem; }

/* ============ ADS ============ */
.ads-box {
    background: rgba(255,255,255,.04); border: 1px dashed var(--border-glass);
    border-radius: var(--radius-sm); padding: 1rem;
    display: flex; align-items: center; justify-content: center;
    min-height: 90px; text-align: center; font-size: .8rem; color: var(--text-muted);
    overflow: hidden;
}
.ads-player { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 3; pointer-events: none; }
.ads-player-overlay {
    position: absolute; inset: 0; z-index: 20; overflow: hidden;
    background: #000;
    display: flex; align-items: center; justify-content: center;
}
.ads-player-overlay .ads-player-click,
.ads-player-overlay .ads-player-html {
    display: block; width: 100%; height: 100%;
}
.ads-player-overlay .ads-player-frame { width: 100%; height: 100%; border: 0; }
.ads-skip-btn {
    position: absolute; bottom: 16px; right: 16px; z-index: 25;
    background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.45);
    padding: 8px 16px; border-radius: 8px; font-size: .85rem; cursor: not-allowed;
    backdrop-filter: blur(6px);
}
.ads-skip-btn.ready { background: var(--gradient-main); border: 0; cursor: pointer; font-weight: 700; }

/* ============ AUTH PAGES ============ */
.auth-wrap {
    min-height: 80vh; display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
}
.auth-card {
    background: var(--bg-glass); backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px; padding: 2.4rem; width: 100%; max-width: 430px;
    box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.6rem; font-weight: 800; text-align: center; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: .9rem; margin-bottom: 1.6rem; }
.form-control {
    background: rgba(255,255,255,.06); border: 1px solid var(--border-glass);
    color: #fff; border-radius: 10px; padding: .65rem .9rem;
}
.form-control:focus { background: rgba(255,255,255,.09); border-color: var(--primary); box-shadow: none; color: #fff; }
.form-control::placeholder { color: var(--text-muted); }
.form-label { font-size: .85rem; font-weight: 500; }

/* ============ PROFILE ============ */
.profile-head {
    background: var(--bg-glass); backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass); border-radius: 20px;
    padding: 2rem; display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius); padding: 1.2rem; text-align: center; margin-bottom: 1rem;
}
.stat-card .num { font-size: 1.8rem; font-weight: 800; background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .lbl { font-size: .78rem; color: var(--text-muted); }

/* ============ PAGINATION ============ */
.pagination { gap: 6px; }
.pagination .page-link {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    color: var(--text-main); border-radius: 10px; font-size: .85rem; padding: .45rem .8rem;
}
.pagination .page-link:hover { background: var(--gradient-soft); color: #fff; }
.pagination .active .page-link { background: var(--gradient-main); border-color: transparent; color: #fff; }

/* ============ SKELETON LOADING ============ */
.skeleton {
    background: linear-gradient(90deg, #161b29 25%, #1f2638 50%, #161b29 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius);
}
.skeleton-card { aspect-ratio: 2/3.4; margin-bottom: 1.4rem; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============ LOADING SPINNER ============ */
.spinner-wrap { display: flex; justify-content: center; padding: 3rem; }
.lds-ring { display: inline-block; position: relative; width: 60px; height: 60px; }
.lds-ring div {
    box-sizing: border-box; display: block; position: absolute; width: 48px; height: 48px;
    margin: 6px; border: 5px solid var(--primary); border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite; border-color: var(--primary) transparent transparent transparent;
}
.lds-ring div:nth-child(2) { animation-delay: -.45s; }
.lds-ring div:nth-child(3) { animation-delay: -.3s; }
.lds-ring div:nth-child(4) { animation-delay: -.15s; }
@keyframes lds-ring { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ============ FOOTER ============ */
.site-footer {
    background: rgba(11,13,19,.8); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-glass); margin-top: 3rem;
}
.footer-brand { font-weight: 800; }
.footer-brand i { color: var(--primary-2); }
.site-footer ul li { margin-bottom: .5rem; }
.site-footer ul li a { color: var(--text-muted); font-size: .85rem; }
.site-footer ul li a:hover { color: #fff; }
.social-icon {
    width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border-glass); border-radius: 10px;
    color: var(--text-muted); transition: all .25s ease;
}
.social-icon:hover { background: var(--gradient-main); color: #fff; transform: translateY(-3px); }
.copyright { border-top: 1px solid var(--border-glass); color: var(--text-muted); }

/* ============ BACK TO TOP ============ */
.back-to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 1500;
    width: 46px; height: 46px; border: none; border-radius: 12px;
    background: var(--gradient-main); color: #fff; font-size: 1.1rem;
    box-shadow: var(--shadow-glow); cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all .3s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* ============ ADMIN STYLES ============ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 250px; flex-shrink: 0;
    background: var(--bg-glass-strong); backdrop-filter: blur(18px);
    border-right: 1px solid var(--border-glass);
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 1.2rem .8rem; z-index: 100;
}
.admin-sidebar .brand { display: flex; align-items: center; gap: 10px; padding: .4rem .6rem 1.2rem; }
.admin-sidebar .nav-item { margin-bottom: 4px; }
.admin-sidebar .nav-link {
    color: var(--text-muted); padding: .7rem 1rem; border-radius: 10px;
    font-size: .9rem; font-weight: 500; display: flex; align-items: center; gap: 10px;
}
.admin-sidebar .nav-link i { font-size: 1.05rem; }
.admin-sidebar .nav-link:hover { background: var(--gradient-soft); color: #fff; }
.admin-sidebar .nav-link.active { background: var(--gradient-main); color: #fff; box-shadow: var(--shadow-glow); }
.admin-sidebar .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 1rem .6rem .4rem; }

.admin-main { flex: 1; min-width: 0; padding: 1.5rem; }
.admin-topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: var(--radius); padding: .9rem 1.3rem; margin-bottom: 1.5rem;
}
.admin-topbar h4 { margin: 0; font-weight: 700; font-size: 1.15rem; }
.admin-toggle { display: none; }

.admin-card {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1.4rem;
}
.admin-stat {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1.2rem;
    position: relative; overflow: hidden;
}
.admin-stat .stat-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff; margin-bottom: .8rem;
}
.admin-stat .stat-value { font-size: 1.7rem; font-weight: 800; }
.admin-stat .stat-label { font-size: .8rem; color: var(--text-muted); }
.bg-gradient-1 { background: linear-gradient(135deg,#6c5ce7,#a855f7); }
.bg-gradient-2 { background: linear-gradient(135deg,#ff3d71,#ff8e53); }
.bg-gradient-3 { background: linear-gradient(135deg,#10b981,#06b6d4); }
.bg-gradient-4 { background: linear-gradient(135deg,#f59e0b,#f97316); }

.admin-table { font-size: .88rem; --bs-table-color: var(--text-main); --bs-table-bg: transparent; }
.admin-table td, .admin-table th { color: var(--text-main); }
.admin-table thead { background: var(--gradient-soft); }
.admin-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: .7rem .8rem; }
.admin-table td { padding: .7rem .8rem; vertical-align: middle; border-color: var(--border-glass); }
.admin-table img { width: 40px; height: 54px; object-fit: cover; border-radius: 6px; }

.btn-sm { font-size: .78rem; }
.btn-action { padding: .3rem .6rem; border-radius: 8px; font-size: .78rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed; left: -260px; transition: left .3s ease;
        height: 100vh; z-index: 1200;
    }
    .admin-sidebar.open { left: 0; }
    .admin-toggle { display: inline-flex; }
    .search-box .form-control { min-width: 130px; }
}
@media (max-width: 575.98px) {
    .detail-cover { width: 150px; height: 212px; }
    .detail-banner .detail-banner-cover { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .hero-slide { min-height: 260px; }
    .hero-slide .hero-content { padding: 1.5rem; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}