* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --background: #111827;
    --surface: #1f2937;
    --surface-light: #273449;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --accent: #38bdf8;
    --border: #374151;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-anchor: none;
    padding: 19px 12px 30px;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}


.sticky-area {
    position: sticky;
    top: 0;
    z-index: 100;
    margin: -19px -12px 0;
    padding: 19px 12px 10px;
    background: var(--background);
}

.header {
    margin-bottom: 12px;
    padding: 0;
    text-align: left;
    background: transparent;
    border: 0;
}

.brand-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

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

.brand-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #398cf5, #7659e8);
    font-size: 23px;
    box-shadow: 0 7px 24px #2878df44;
}

.header h1 {
    margin: 0;
    font-size: clamp(20px, 4vw, 25px);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.statistik {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
    margin-bottom: 16px;
}

.stat {
    min-width: 0;
    padding: 1px 4px;
    text-align: center;
    background: linear-gradient(145deg, var(--surface-light), var(--surface));
    border: 1px solid var(--border);
    border-radius: 5px;
}

.stat-label {
    min-height: 0;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

.pencarian {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.pencarian input,
.pencarian select {
    min-width: 0;
    padding: 10px 11px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
    font-size: 13px;
}

.pencarian input {
    flex: 1;
}

.pencarian select {
    width: 175px;
}

.pencarian input:focus,
.pencarian select:focus {
    border-color: var(--accent);
}

.jumlah-hasil {
    margin: 10px 2px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.katalog {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.kartu {
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
}

.thumbnail-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0b1220;
}

.thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 27px;
}

.tombol {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 8px auto 0;
    padding: 7px 10px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
}

.tonton {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    color: #fff;
    background: #0284c7;
    white-space: nowrap;
}

.download {
    color: #fff;
    background: #374151;
}

.detail {
    padding: 9px;
}

.nama {
    margin: 0;
    text-align: center;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text);
    font-size: 11px;
    line-height: 17px;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ukuran {
    margin-top: 6px;
    text-align: center;
    color: var(--muted);
    font-size: 9px;
}

.kosong {
    padding: 35px 15px;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
}

.kosong strong {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 14px;
}

.kosong div {
    font-size: 12px;
}

.paginasi {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.halaman {
    padding: 8px 12px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
}

.halaman:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.info-halaman {
    color: var(--muted);
    font-size: 11px;
}

.footer {
    padding: 18px 10px;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
    border-top: 1px solid var(--border);
}

#status-katalog {
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

@media (max-width: 700px) {
    .katalog {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }
}

@media (max-width: 360px) {
    .pencarian select {
        width: 145px;
    }

    .katalog {
        gap: 7px;
    }

    .detail {
        padding: 7px;
    }
}
