/* =========================================
   VARIABEL CANDY THEME
========================================= */
:root {
    --bg: #0b0b12;
    --surface: rgba(20, 20, 30, 0.5);
    --accent: #FF6BC6;
    --accent-2: #45C4FF;
    --accent-3: #B371FF;
    --text: #f8f8ff;
    --muted: #a4a4b8;
    --font-head: 'Syne', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-pill: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    cursor: none;
    overflow-x: hidden;
}

/* =========================================
   CURSOR CANDY GLOW
========================================= */
#cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

#cursor-ring {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-2);
    box-shadow: 0 0 15px rgba(69, 196, 255, 0.4);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s;
}

#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    z-index: 10000;
}

/* =========================================
   HERO SECTION
========================================= */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(11, 11, 18, 0.3), rgba(11, 11, 18, 1));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.badge {
    padding: 8px 20px;
    border: 1px solid rgba(255, 107, 198, 0.4);
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--text);
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    background: rgba(255, 107, 198, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    font-family: var(--font-head);
    font-size: clamp(60px, 12vw, 120px);
    line-height: 0.9;
    margin-bottom: 20px;
}

.candy-text {
    background: linear-gradient(45deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: normal;
}

#hero p {
    color: var(--text);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.btn-primary {
    padding: 16px 36px;
    background: linear-gradient(45deg, var(--accent), var(--accent-3));
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: none;
    font-family: var(--font-body);
    font-size: 16px;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 107, 198, 0.5);
}

/* =========================================
   ANIME ARCHIVE
========================================= */
#anime-archive {
    position: relative;
    background-color: var(--bg);
    padding: 80px 5% 120px 5%;
    overflow: hidden;
}

#blob-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-blob {
    position: absolute;
    width: 350px;
    height: 350px;
    filter: blur(40px);
    will-change: transform;
}

.archive-section {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto 80px auto;
}

.candy-title {
    font-family: var(--font-head);
    font-size: 32px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
}

.candy-number {
    font-size: 16px;
    background: linear-gradient(45deg, var(--accent-2), var(--accent));
    padding: 5px 12px;
    border-radius: 12px;
    font-weight: 800;
}

/* =========================================
   CANDY GRID & CARDS
========================================= */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

.anime-card {
    position: relative;
    height: 380px;
    z-index: 1;
}

.card-inner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(15px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s, border-color 0.4s;
    position: relative;
    z-index: 2;
}

.anime-card:hover {
    z-index: 10;
}

.anime-card:hover .card-inner {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 107, 198, 0.5);
    box-shadow: 0 15px 40px rgba(255, 107, 198, 0.2), inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.hover-character {
    position: absolute;
    bottom: 230px;
    right: 37.7px;
    width: 140px;
    height: auto;
    object-fit: contain;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px) translateX(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.anime-card:hover .hover-character {
    opacity: 1;
    transform: translateY(-90px) translateX(30px) scale(1.1);
}

.card-banner {
    height: 60%;
    width: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.anime-card:hover .card-banner {
    transform: scale(1.05);
}

.card-content {
    height: 40%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: transparent;
    z-index: 2;
    position: relative;
}

.anime-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-status {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-ongoing {
    background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    color: #d13076;
}

.status-completed {
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
    color: #0b6c5a;
}

.status-plan {
    background: rgba(255, 255, 255, 0.1);
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.anime-desc {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
}

/* =========================================
   SEARCH & FILTER CANDY
========================================= */
.candy-filter {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    align-items: center;
}

#searchInput,
#genreFilter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 14px 20px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#genreFilter option {
    background-color: #0b0b12;
    color: var(--text);
}

#searchInput:focus,
#genreFilter:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-2);
    box-shadow: 0 0 15px rgba(69, 196, 255, 0.2);
}

/* =========================================
   EXPANDABLE COMPLETED
========================================= */
.completed-wrapper {
    position: relative;
    /* Ruang gaib biar kepala anime gak kepotong pas pop-out */
    padding-top: 120px;
    margin-top: -120px;
    padding-left: 40px;
    margin-left: -40px;
    padding-right: 40px;
    margin-right: -40px;

    max-height: 530px;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}

.completed-wrapper.expanded {
    max-height: 4000px;
}

.candy-fade {
    background: linear-gradient(to top, var(--bg) 10%, transparent);
    height: 180px;
    display: flex;
    justify-content: center;
}

.btn-selengkapnya {
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: none;
    font-family: var(--font-body);
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    height: fit-content;
    white-space: nowrap;
}

.btn-selengkapnya:hover {
    background: linear-gradient(45deg, var(--accent-2), var(--accent-3));
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(69, 196, 255, 0.3);
}

/* =========================================
   GAME SHOWCASE (BENTO GRID)
========================================= */
#game-showcase {
    background-color: #0d0d16;
    padding: 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.game-header {
    margin-bottom: 20px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 25px;
}

.bento-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    /* Teks ada di bawah */
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s, border-color 0.4s;
    cursor: none;
}

/* Span Grid System untuk Bento */
.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-square {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-superwide {
    grid-column: span 4;
    grid-row: span 1;
}

.bento-item:hover {
    transform: translateY(-8px);
    border-color: var(--accent-2);
    box-shadow: 0 20px 40px rgba(69, 196, 255, 0.2);
    z-index: 10;
}

.game-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.6s ease;
}

.bento-item:hover .game-bg {
    transform: scale(1.05);
}

/* Gradient Overlay ditarik dari bawah biar teks selalu jelas */
.bento-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 11, 18, 0.95) 0%, rgba(11, 11, 18, 0.2) 60%, transparent 100%);
    z-index: 2;
}

.game-info {
    position: relative;
    z-index: 3;
    width: 100%;
}

.game-title {
    font-family: var(--font-head);
    /* Ukuran font responsif ngikutin kotak */
    font-size: clamp(24px, 2.5vw, 36px);
    color: #fff;
    margin-bottom: 5px;
    line-height: 1.1;
}

.game-genre {
    color: var(--accent-2);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

/* =========================================
   FOOTER
========================================= */
#site-footer {
    padding: 60px;
    text-align: center;
    background: #0d0d16;
    font-size: 14px;
    color: var(--muted);
}

.footer-logo {
    font-family: var(--font-head);
    font-size: 24px;
    color: #fff;
    margin-bottom: 10px;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
========================================= */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .bento-large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .bento-wide {
        grid-column: span 2;
        grid-row: span 1;
    }

    .bento-square {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento-superwide {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 600px) {
    .candy-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .bento-large,
    .bento-wide,
    .bento-square,
    .bento-superwide {
        grid-column: span 1;
        grid-row: span 1;
    }
}