:root {
    --bg: #0F1014;
    --surface: #1A1D24;
    --border: #2A2E37;
    --text: #F5F5F7;
    --text-muted: #9CA3AF;
    --accent: #F5C518;
    --favorite: #EF4444;
}

/* biar kontennya lebih lebar di layar besar, default bootstrap kekecilan */
@media (min-width: 1200px) {
    .container {
        max-width: 96%;
    }
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* navbar */
.navbar-app {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.navbar-app .navbar-brand {
    font-weight: 700;
    color: var(--text);
}
.navbar-app .nav-link {
    color: var(--text-muted);
}
.navbar-app .nav-link:hover,
.navbar-app .nav-item.active .nav-link {
    color: var(--text);
}
.navbar-app .dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
}
.navbar-app .dropdown-item {
    color: var(--text-muted);
}
.navbar-app .dropdown-item:hover {
    background: var(--border);
    color: var(--text);
}
.navbar-app .dropdown-item.active {
    background: var(--border);
    color: var(--accent);
}

.page-title {
    font-weight: 700;
    letter-spacing: -0.5px;
}
.page-subtitle {
    color: var(--text-muted);
    font-size: .9rem;
}

/* form pencarian */
.search-input,
.form-control.search-input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
}
.form-control.search-input:focus {
    background: var(--surface);
    border-color: var(--text-muted);
    color: var(--text);
    box-shadow: none;
}
.form-control.search-input::placeholder {
    color: var(--text-muted);
}

.btn-accent {
    background: var(--accent);
    color: #111;
    font-weight: 600;
    border-radius: 10px;
}
.btn-accent:hover {
    background: #ffd633;
    color: #111;
}

/* tab filter type */
.type-tabs {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.type-tabs a {
    color: var(--text-muted);
    border-radius: 8px;
    font-size: .875rem;
    text-decoration: none;
}
.type-tabs a:hover {
    color: var(--text);
}
.type-tabs a.active {
    background: var(--accent);
    color: #111;
    font-weight: 600;
}

.result-count {
    color: var(--text-muted);
    font-size: .875rem;
}

/* card movie */
.movie-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: transform .15s;
}
.movie-card:hover {
    transform: translateY(-4px);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
}
.poster-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    background: var(--border);
    transition: transform .3s;
}
.movie-card:hover .poster-img {
    transform: scale(1.05);
}

/* overlay pas hover poster */
.poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(15, 16, 20, .85), transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: var(--text);
    font-size: .85rem;
    opacity: 0;
    transition: opacity .25s;
    z-index: 1;
}
.movie-card:hover .poster-overlay {
    opacity: 1;
}

.badge-type {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 16, 20, .75);
    color: var(--accent);
    font-size: .75rem;
    border-radius: 20px;
}

/* tombol love di poster */
.btn-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 16, 20, .75);
    color: var(--text-muted);
    cursor: pointer;
}
.btn-favorite:hover {
    color: var(--favorite);
}
.btn-favorite.active {
    color: var(--favorite);
}
.btn-favorite:focus {
    outline: none;
}

.movie-title {
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    display: block;
}
.movie-title:hover {
    color: var(--accent);
    text-decoration: none;
}
.movie-meta {
    color: var(--text-muted);
    font-size: .8rem;
    margin-top: 2px;
}

/* shimmer buat lazy load & skeleton */
img.lazy,
.shimmer {
    background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

/* skeleton card pas load more */
.skeleton-poster {
    height: 320px;
}
.skeleton-line {
    height: 12px;
    border-radius: 6px;
}

/* animasi card baru masuk */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.movie-card {
    animation: fadeInUp .3s ease;
}

/* halaman detail */
.detail-hero {
    position: relative;
    height: 320px;
    border-radius: 16px;
}
.detail-backdrop {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background-size: cover;
    background-position: center 20%;
    filter: blur(6px) brightness(.45);
    transform: scale(1.02);
}
.detail-hero-title {
    position: absolute;
    left: 0;
    bottom: -28px;
    background: rgba(26, 29, 36, .85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 90%;
}
.breadcrumb-soft {
    font-size: .75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.breadcrumb-soft a {
    color: var(--text-muted);
}
.breadcrumb-soft a:hover {
    color: var(--text);
    text-decoration: none;
}

.detail-poster {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    background: var(--border);
}

.detail-label {
    color: var(--text-muted);
    font-size: .8rem;
    margin-bottom: 2px;
}
.detail-value {
    color: var(--text);
    font-size: .95rem;
    margin-bottom: 14px;
}

/* badge rating nempel di poster detail */
.poster-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 16, 20, .8);
    color: var(--accent);
    font-weight: 600;
    border-radius: 8px;
    font-size: .875rem;
}

.rating-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
    height: 100%;
}
.rating-box .value {
    font-weight: 700;
}
.rating-box .source {
    color: var(--text-muted);
    font-size: .75rem;
}

.btn-fav-detail {
    background: transparent;
    border: 1px solid var(--favorite);
    color: var(--favorite);
    border-radius: 10px;
}
.btn-fav-detail.active {
    background: var(--favorite);
    color: #fff;
}
.btn-fav-detail:focus {
    outline: none;
}

.btn-back {
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.btn-back:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* tombol hapus di halaman favorite */
.btn-remove {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    font-size: .8rem;
    width: 100%;
}
.btn-remove:hover {
    border-color: var(--favorite);
    color: var(--favorite);
}

/* login */
.login-img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    display: block;
}
.login-form {
    max-width: 420px;
}
.login-form label {
    color: var(--text-muted);
    font-size: .875rem;
}
.login-form .form-control {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
}
.login-form .form-control:focus {
    background: var(--surface);
    border-color: var(--text-muted);
    color: var(--text);
    box-shadow: none;
}

/* empty state */
.empty-state {
    color: var(--text-muted);
}
.empty-state i {
    color: var(--border);
}

.text-soft {
    color: var(--text-muted) !important;
}

/* tombol balik ke atas */
.btn-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #111;
    display: none;
    z-index: 300;
    cursor: pointer;
}
.btn-top.show {
    display: block;
}
