/* =================================
   1. GLOBAL & ROOT VARIABLES
   ================================= */

:root {
    /* -- PALET WARNA BARU "INFERNO GOLD" -- */
    --primary-color-start: #ff8c00;  /* Oranye Api */
    --primary-color-end: #ffc837;    /* Emas Berkilau */
    --dark-bg: #0d1117;              /* Charcoal Blue (Sangat Gelap) */
    --light-bg: #161b22;             /* Elemen lebih terang */
    --text-primary: #e6edf3;          /* Putih Pudar (Soft White) */
    --text-secondary: #8b949e;       /* Abu-abu Netral */
    --border-color: #30363d;         /* Border Gelap */
    
    /* -- PENGATURAN LAIN -- */
    --border-radius-main: 12px;     /* Radius lebih halus */
    --transition-speed: 0.3s;       /* Kecepatan transisi global */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    text-align: center;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 0px 0;
    background-color: transparent;
}

a {
    color: var(--primary-color-start);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color-end);
    text-decoration: none;
}

/* =================================
   2. TYPOGRAPHY
   ================================= */

h1, h2, h3 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-weight: 800;
    margin: 20px 0 15px 0;
}

h2 {
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    margin-bottom: 50px;
    font-weight: 700;
}

p {
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ====================================================== */
/* 2. HEADER & NAVIGASI
/* ====================================================== */

header {
    padding: 15px 0;
    background-color: rgba(13, 17, 23, 0.7); /* Background lebih gelap */
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-logo a { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-primary); text-decoration: none; }
.nav-menu { display: none; }
@media (min-width: 992px) { .nav-menu { display: flex; } }
.nav-menu a { color: var(--text-primary); margin-left: 25px; font-weight: 600; position: relative; padding-bottom: 5px; }
.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-image: linear-gradient(to right, var(--primary-color-start), var(--primary-color-end));
    transition: width var(--transition-speed) ease;
}
.nav-menu a:hover::after { width: 100%; }

/* Mobile Nav (tidak banyak berubah, hanya warna) */
.hamburger-menu { display: block; cursor: pointer; z-index: 1001; width: 30px; height: 30px; }
@media (min-width: 992px) { .hamburger-menu { display: none; } }
.mobile-nav-overlay { height: 100%; width: 0; position: fixed; z-index: 1002; top: 0; left: 0; background-color: rgba(13, 17, 23, 0.98); overflow-x: hidden; transition: 0.3s ease-in-out; backdrop-filter: blur(10px); }
.mobile-nav-content { position: relative; top: 2%; width: 100%; text-align: center; margin-top: 10px; }
.mobile-nav-content a { padding: 15px; text-decoration: none; font-size: 1.6rem; color: var(--text-secondary); display: block; transition: all 0.3s ease; }
.mobile-nav-content a:hover, .mobile-nav-content a:focus { color: var(--primary-color-end); transform: scale(1.05); }
.mobile-nav-overlay .close-btn { position: absolute; top: 20px; right: 45px; font-size: 3rem; color: #fff; text-decoration: none !important; }

/* =================================
   4. HERO SECTION & ANIMATION
   ================================= */

#hero { padding: 40px 20px 80px 20px; }
.animated-hero-svg { width: 180px; height: auto; margin-bottom: -20px; animation: floatAnimation 4s ease-in-out infinite; }
@keyframes floatAnimation { 0% { transform: translateY(0px); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0px); } }

.text-logo {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--primary-color-start) 0%, var(--primary-color-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =================================
   5. BUTTONS & FORMS
   ================================= */

#search-container { margin-top: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }
#search-input {
    width: 100%; box-sizing: border-box; padding: 15px 25px; font-size: 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 50px; background-color: var(--light-bg); color: var(--text-primary);
    transition: all var(--transition-speed) ease;
}
#search-input:focus {
    outline: none;
    border-color: var(--primary-color-start);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.cta-button {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-color-start), var(--primary-color-end));
    color: white; padding: 12px 28px; text-decoration: none; font-size: 1.25rem; font-weight: 700;
    border-radius: 50px; cursor: pointer; border: none;
    background-size: 200% 100%; /* Untuk animasi shimmer */
    transition: all 0.4s ease;
}

.cta-button:hover,
.cta-button:focus {
    background-position: -100% 0; /* Animasi shimmer */
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.4);
    text-decoration: none; color: white;
}

/* ====================================================== */
/* 3. GRID & KARTU KONSISTEN (EFEK PREMIUM)
/* ====================================================== */

.card-grid { display: grid; gap: 20px; margin-top: 40px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .card-grid { grid-template-columns: repeat(4, 1fr); gap: 25px; } }

.game-card, .category-card, .related-card {
    background: var(--light-bg);
    border-radius: var(--border-radius-main);
    overflow: hidden;
    text-decoration: none; color: var(--text-primary); display: flex; flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color); /* Border default */
    transition: all var(--transition-speed) ease;
}

/* EFEK GRADIENT BORDER SAAT HOVER */
.game-card::before, .category-card::before, .related-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: var(--border-radius-main);
    border: 2px solid transparent;
    background: linear-gradient(120deg, var(--primary-color-start), var(--primary-color-end)) border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.game-card:hover, .category-card:hover, .related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: transparent; /* Sembunyikan border asli */
}

.game-card:hover::before, .category-card:hover::before, .related-card:hover::before {
    opacity: 1; /* Tampilkan gradient border saat hover */
}


.thumbnail-container { width: 100%; padding-top: 75%; position: relative; background-color: #333; }
.thumbnail-container img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-speed) ease, filter var(--transition-speed) ease; }
.game-card:hover img, .category-card:hover img, .related-card:hover img { transform: scale(1.1); filter: saturate(1.1); } /* Filter saturasi untuk gambar lebih hidup */

.thumbnail-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%); }
.category-card h3, .related-card h3 { position: absolute; bottom: 15px; left: 15px; right: 15px; margin: 0; font-size: 1.2rem; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.game-card .details { position: absolute; bottom: 0; left: 0; right: 0; padding: 15px; text-align: left; }
.game-card h3 { margin: 0 0 5px 0; font-size: 1.1rem; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.game-card .category { font-size: 0.8rem; color: var(--text-secondary); font-weight: 400; }
.game-card .play-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px; height: 60px;
    background: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
}
.game-card:hover .play-icon { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.game-card .play-icon svg { width: 30px; height: 30px; fill: var(--primary-color-end); margin-left: 5px; }


/* ====================================================== */
/* 8. LAYOUT ADMIN DENGAN SIDEBAR
/* ====================================================== */
.admin-body { background: var(--dark-bg); }
.admin-sidebar { width: 260px; background-color: var(--light-bg); height: 100vh; position: fixed; top: 0; left: 0; padding: 20px 0; border-right: 1px solid var(--border-color); z-index: 1001; display: flex; flex-direction: column; }
.admin-sidebar .sidebar-logo { padding: 0 25px 25px 25px; text-align: center; border-bottom: 1px solid var(--border-color); }
.admin-sidebar .sidebar-logo a { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; color: var(--text-primary); text-decoration: none; }
.admin-sidebar .sidebar-nav { list-style: none; padding: 0; margin: 20px 0; flex-grow: 1; }
.admin-sidebar .sidebar-nav a { display: flex; align-items: center; color: var(--text-secondary); padding: 15px 25px; text-decoration: none; font-weight: 600; transition: all var(--transition-speed) ease; border-left: 3px solid transparent; }
/* Efek hover/active sidebar yang elegan */
.admin-sidebar .sidebar-nav a:hover, .admin-sidebar .sidebar-nav a.active {
    background-color: rgba(255, 140, 0, 0.05);
    color: var(--primary-color-end);
    border-left: 3px solid var(--primary-color-start);
}
.admin-sidebar .sidebar-nav a i { margin-right: 15px; width: 25px; text-align: center; font-size: 1.1rem; }
.admin-sidebar .sidebar-footer { padding: 20px 0; border-top: 1px solid var(--border-color); }
.admin-sidebar .sidebar-footer a { display: block; text-align: center; padding: 10px 0; color: var(--text-secondary); }
.admin-content { padding: 20px; margin-left: 50px; }

@media (max-width: 992px) {
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .admin-sidebar.active { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}


/* -- SISA CSS DENGAN PENYESUAIAN WARNA -- */
#fullscreen-icon-btn { position: absolute; bottom: 15px; right: 15px; z-index: 10; background-color: rgba(22, 27, 34, 0.7); border: 1px solid var(--border-color); color: var(--text-primary); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: all var(--transition-speed) ease; display: flex; justify-content: center; align-items: center; }
#fullscreen-icon-btn:hover { background-color: var(--primary-color-start); border-color: var(--primary-color-end); }
.share-container { display: flex; gap: 10px; justify-content: center; margin: 30px 0; }
.share-button { background-color: var(--light-bg); border: 1px solid var(--border-color); color: var(--text-secondary); width: 45px; height: 45px; border-radius: 50%; cursor: pointer; transition: all var(--transition-speed) ease; display: inline-flex; justify-content: center; align-items: center; font-size: 1.1rem; text-decoration: none; }
.share-button:hover { background: linear-gradient(120deg, var(--primary-color-start), var(--primary-color-end)); border-color: transparent; color: white; transform: translateY(-3px); }
.detail-box h3 { font-size: 1.5rem; color: var(--primary-color-start); margin-top: 0; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; }
.importer-step { background: var(--light-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius-main); padding: 30px; margin-bottom: 40px; text-align: left; }
.importer-step h3 { margin-top: 0; font-size: 1.5rem; color: var(--primary-color-start); margin-bottom: 20px; }
.admin-table th { background-color: var(--dark-bg); font-weight: 600; color: var(--primary-color-start); }
.static-page { text-align: left; background-color: var(--light-bg); border-radius: var(--border-radius-main); padding: 40px; border: 1px solid var(--border-color); }
.footer { padding: 60px 20px 40px 20px; background-color: var(--dark-bg); border-top: 1px solid var(--border-color); }

/* (Rule CSS lain yang tidak tercantum di sini diasumsikan tetap sama atau tidak memerlukan perubahan signifikan) */