/* Variabel Warna Tema (Default: Dark Mode) */
:root {
    --bg-color: linear-gradient(to bottom right, #000, #001a33);
    --text-color: #ffffff;
    --nav-bg: #1e1e1e;
    --card-bg: #252525;
    --primary-color: #6cbcff;
    --cat-bg: #2d2d2d;
    --cat-active-bg: #6cbcff;
    --cat-active-text: #121212;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* Variabel Warna Light Mode */
[data-theme="light"] {
    --bg-color: linear-gradient(to bottom right, #ffffff, #e6f2ff);
    --text-color: #212529;
    --nav-bg: #ffffff;
    --card-bg: #ffffff;
    --primary-color: #6cbcff;
    --cat-bg: #e9ecef;
    --cat-active-bg: #6cbcff;
    --cat-active-text: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

@font-face {
    font-family: 'Agero'; /* Ini nama bebas yang akan kamu panggil nanti */
    src: url('font/agero.ttf') format('truetype'); /* Path menuju file font kamu */
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Biar teks web langsung muncul duluan sambil nunggu font termuat */
}

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

body {
    background: var(--bg-color);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

/* Header & Navbar */
.navbar {
    position: fixed !important;
    top: 16px !important;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1380px;
    height: 68px;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 22px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.08);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

@supports not (backdrop-filter: blur(16px)) {
    .navbar { background: rgba(0,0,0,0.95); }
}

[data-theme="light"] .navbar {
    box-shadow:
        0 8px 32px rgba(255,255,255,0.45),
        inset 0 1px 0 rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.12) !important;
}

.nav-content {
    max-width: 1400px; 
    margin: 0 auto; 
    height: 100%; 
    padding: 0 32px;
    display: flex; 
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Agero', sans-serif; /* Menggunakan font Agero, kalau gagal bakal pakai sans-serif bawaan HP */
    font-size: 24px; /* Sesuaikan ukurannya */
    font-weight: normal; /* Beberapa font kustom sudah tebal dari sananya, jadi atur sesuai kebutuhan */
    letter-spacing: 0.5px; /* Opsional: Atur jarak antar huruf biar makin estetik */
    margin-left: -1px;
    transform: translateY(1px);
    display: inline-block;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn i {
    font-size: 20px;
    pointer-events: none;
}

.icon-btn {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    width: 42px;
    height: 42px;
    font-size: 20px;
    color: var(--text-color);
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 4px 20px rgba(0,0,0,0.25);
}

[data-theme="light"] .icon-btn {
    background: rgba(0,0,0,0.06) !important;
    box-shadow:
        inset 0 1px 0 rgba(0,0,0,0.06),
        0 4px 20px rgba(255,255,255,0.25);
    border: 1px solid rgba(64,64,64,0.5) !important;
}

.icon-btn:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 14px 40px rgba(0,0,0,.45),
        0 0 25px rgba(90,176,255,.18);
}

[data-theme="light"] .icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow:
        0 14px 40px rgba(255,255,255,.45),
        0 0 25px rgba(90,176,255,.18);
}

/* Search Container Layout */
.search-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* WAJIB: Biar tingginya sejajar dan gak keluar navbar */
    background: transparent;
    display: flex;
    align-items: center;
    padding: 0 32px; /* Samakan dengan padding nav-content */
    gap: 10px;
    z-index: 10;
    animation: fadeIn 0.25s ease-in-out;
}

.search-container.hidden {
    display: none;
}

.search-input-wrapper {
    position: relative;
    flex: 1; 
    width: 100%;
}

#search-input {
    width: 100%; /* INI KUNCI UTAMANYA: Biar gak menciut di Desktop/Mobile */
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 25px;
    color: var(--text-color);
    padding: 10px 20px 10px 42px; /* Jarak 42px di kiri untuk tempat icon */
    font-size: 16px;
    outline: none;
    /* Catatan: flex-grow: 1 dihapus karena sekarang dia di dalam div biasa */
}

[data-theme="light"] #search-input {
    background: rgba(0,0,0,0.06) !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
}

#search-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow:
        0 0 0 4px rgba(90,176,255,.08),
        0 0 18px rgba(90,176,255,.25);
}

.search-icon { 
    position: absolute;
    left: 14px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #a0a0a0;
    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Kategori Bar (Horizontal Menu) */
.category-bar {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    overflow-x: auto;
    white-space: nowrap;
    background-color: var(--bg-color);
    align-items: center;
    justify-content: center;
    margin-top: 84px;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 10px 24px;
    border-radius: 25px;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

[data-theme="light"] .cat-btn {
    box-shadow: 0 2px 4px rgba(255,255,255,0.05);
}

.cat-btn.active {
    background: rgba(108, 188, 255, 0.15) !important;
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(108, 188, 255, 0.4) !important;
    color: #6cbcff; 
    transform: scale(1.05);
    box-shadow: 
        0 8px 25px rgba(108, 188, 255, 0.2), 
        inset 0 2px 4px rgba(255, 255, 255, 0.2), 
        inset 0 -2px 6px rgba(108, 188, 255, 0.1); 
}

[data-theme="light"] .cat-btn.active {
    background: rgba(108, 188, 255, 0.25) !important;
    border: 1px solid rgba(108, 188, 255, 0.6) !important;
    color: #0056b3;
    box-shadow: 
        0 6px 20px rgba(108, 188, 255, 0.3),
        inset 0 2px 6px rgba(255, 255, 255, 0.6);
}

.cat-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .cat-btn:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Script Grid System */
.content {
    padding: 0 20px 20px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.script-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Script Card Structure */
.script-card {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: 16px;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    overflow: hidden;
    box-shadow:
        0 8px 30px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.06);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .script-card {
    box-shadow:
        0 8px 30px rgba(255,255,255,0.35),
        inset 0 1px 0 rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.10) !important;
}

/* Hover Animasi 1: Card Terangkat Keatas */
.script-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 14px 40px rgba(0,0,0,.45),
        0 0 25px rgba(90,176,255,.18);
}

[data-theme="light"] .script-card:hover {
    box-shadow:
        0 14px 40px rgba(255,255,255,.45),
        0 0 25px rgba(90,176,255,.18);
}
    
/* Thumbnail Cover Container */
.card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 16px 16px 0 0; /* Rounded hanya atas, bawah flat kotak */
    background-color: #000000;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hover Animasi 2: Gambar membesar di dalam card */
.script-card:hover .card-cover img {
    transform: scale(1.05);
}

/* Bagian Detail Informasi Card */
.card-details {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--primary-color);
    color: #121212;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

[data-theme="light"] .card-label {
    color: #ffffff;
}

.card-date {
    font-size: 12px;
    color: #888888;
}

.footer {
    padding: 50px 20px 30px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 80px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
    text-align: center;
}

.footer-brand h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.footer-brand p {
    color: #888888;
    font-size: 13px;
    margin-bottom: 25px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
    justify-content: center;
}

.footer-links a {
    color: #c9d1d9;
    text-decoration: none;
    font-size: 13px;
    transition: .2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    justify-content: center;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all .25s ease;
}

[data-theme="light"] .footer-socials a {
    color: #000000;
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.08);
}

.footer-socials a:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 0 18px rgba(90,176,255,.25);
}

.footer-socials .yt:hover {
    border-color: #ff3b3b;
    box-shadow: 0 0 18px rgba(255,59,59,.55);
}

.footer-socials .ig:hover {
    border-color: #e1306c;
    box-shadow: 0 0 18px rgba(245, 96, 64,.55),
                0 0 18px rgba(225, 48, 108,.55),
                0 0 18px rgba(131, 58, 180,.55);
}

.footer-socials .tt:hover {
    border-color: #ffffff; 
    box-shadow: -2px -2px 18px rgba(37, 244, 238,.55), 
             2px 2px 18px rgba(254, 44, 85,.55);
}

[data-theme="light"] .footer-socials .tt:hover {
    border-color: #000000;
}

.footer-socials .dc:hover {
    border-color: #5865f2;
    box-shadow: 0 0 18px rgba(88, 101, 242,.55); 
}

.footer-socials img {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 13px;
}

a {
    cursor: default;
    }
