/* File: style.css (Versi FINAL FIX) */

/* --- GLOBAL RESET & TYPOGRAPHY --- */
:root {
    --primary-color: #00FFFF; 
    --secondary-color: #333;
    --background-dark: #121212;
    --text-light: #ffffff;
    --text-muted: #aaaaaa;
    --font-family: 'Arial', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-dark);
    color: var(--text-light);
    line-height: 1.6;
    scroll-behavior: smooth; 
}

.section-padding {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 2.2em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-open {
    overflow: hidden;
}

/* 🚀 FIX UTAMA 1: OPACITY/LAYAR GELAP */
.hero { 
    opacity: 0; /* Dimulai dengan tersembunyi */
    transition: opacity 1s ease-in-out; 
}
.hero.loaded { 
    opacity: 1; /* Menjadi terlihat setelah JS memicu class ini */
}

/* FIX MODAL DISPLAY */
.modal { display: none; }
.modal.active { display: flex; }

/* --- NAVIGATION BAR --- */
nav {
    background-color: rgba(18, 18, 18, 0.95);
    color: var(--text-light);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
}

.nav-studio-name {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.5em;
    font-weight: bold;
}

.nav-logo-image {
    height: 30px; 
    margin-right: 10px;
    border-radius: 4px;
}

.nav-menu-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5em;
    cursor: pointer;
    display: block; 
}

/* --- MENU OVERLAY --- */
#menuOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.98);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#menuOverlay.open {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.menu-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-light);
    font-size: 3em;
    cursor: pointer;
}

.menu-links {
    list-style: none;
    text-align: center;
}

.menu-links li {
    margin: 20px 0;
}

.menu-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 2em;
    text-transform: uppercase;
    transition: color 0.2s;
}

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

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: url('bg.jpg') no-repeat center center/cover; 
    
    position: relative;
    overflow: hidden;
    color: var(--text-light);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); 
    z-index: 1;
}

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

.hero-title {
    font-size: 4em;
    margin-bottom: 20px; 
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tagline {
    font-size: 1.2em;
    
    /* 🚀 FIX UTAMA 2: JARAK TOMBOL */
    margin-bottom: 50px; 
    max-width: 850px; 
    padding: 0 5%;   
    min-height: 50px; 
    height: auto;    
    text-align: center; 
}

/* --- TYPING ANIMATION --- */
.cursor {
    display: inline-block;
    color: var(--primary-color);
    animation: blink 0.75s step-end infinite;
    font-weight: bold;
    font-size: 1.2em; 
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* --- ANIMASI FADE-LOOP UNTUK JUDUL & TOMBOL --- */
@keyframes pulseFade {
    0% {
        opacity: 0.5;
        filter: brightness(1.0);
    }
    50% {
        opacity: 1.0;
        filter: brightness(1.2); 
    }
    100% {
        opacity: 0.5;
        filter: brightness(1.0);
    }
}

.fade-loop {
    animation: pulseFade 4s ease-in-out infinite alternate; 
}

.btn-primary-scroll.fade-loop {
    animation-delay: 0.5s; 
}
/* --------------------------------------------------- */

.btn-primary-scroll {
    background-color: var(--primary-color);
    color: var(--background-dark);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary-scroll:hover {
    background-color: #00DDDD; 
}

/* --- GAMES SECTION --- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
}

.game-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
}

.game-image-wrapper {
    width: 100%;
    height: 180px; 
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-info {
    padding: 15px;
}

.game-title {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-description {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 10px;
    height: 36px; 
    overflow: hidden;
}

.game-dev {
    font-size: 0.8em;
    color: #888;
}

/* --- ABOUT SECTION --- */
.about-section {
    background-color: #1e1e1e;
    text-align: center;
    padding: 80px 5%;
}

.about-section p {
    max-width: 800px;
    margin: 20px auto 0;
    font-size: 1.1em;
}


/* --- FOOTER --- */
footer {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: 40px 5%;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto 20px;
}

.footer-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.8em;
    margin: 0 15px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.footer-copy {
    margin-top: 20px;
    font-size: 0.9em;
    color: var(--text-muted);
}

/* --- MODAL STYLES --- */
.modal {
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.9);
    padding-top: 50px;
}

.modal-content {
    background-color: #222;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.close-modal {
    color: var(--text-muted);
    font-size: 30px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
}

.modal-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.modal-title {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 10px;
}

.modal-description {
    font-size: 1em;
    color: var(--text-light);
    margin-bottom: 25px;
}

/* Gallery/Slider */
.gallery-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 8px;
}

.gallery-slides {
    display: flex;
    transition: transform 0.5s ease;
}

.gallery-slide {
    min-width: 100%;
}

.gallery-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5em;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.3s;
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-dots {
    text-align: center;
    margin-top: 10px;
}

.gallery-dot {
    height: 10px;
    width: 10px;
    margin: 0 4px;
    background-color: var(--text-muted);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
}

.gallery-dot.active,
.gallery-dot:hover {
    background-color: var(--primary-color);
}


/* Download Section */
.download-section {
    padding-top: 15px;
    border-top: 1px solid #444;
}

.platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-platform {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    transition: opacity 0.2s;
}

/* Custom platform colors */
.btn-taptap { background-color: #3b5998; }
.btn-itchio { background-color: #fa5c5c; }
.btn-amazon { background-color: #ff9900; }
.btn-roblox { background-color: #00b0ff; }

.btn-platform:hover { opacity: 0.8; }

.supported-platforms {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9em;
}

.platform-icon {
    margin-right: 10px;
    font-size: 1.2em;
    color: var(--primary-color);
}

/* Other Games Section */
#other-games-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

#other-games-container .section-title {
    color: var(--text-light);
    font-size: 1.3em;
    margin-bottom: 15px;
}

.other-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.other-game-card {
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
}

.other-game-card:hover {
    transform: scale(1.05);
}

.other-game-card .game-image-wrapper {
    height: 120px;
}

.other-game-card .game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.other-game-card .game-title {
    font-size: 0.9em;
    padding: 10px;
    margin: 0;
}


/* --- SCROLL ANIMATION (Fade-in saat terlihat) --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(20px); 
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- MEDIA QUERIES (Responsiveness) --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3em;
    }
    
    .tagline {
        font-size: 1em;
        max-width: 90%; 
    }
    
    .games-grid {
        grid-template-columns: 1fr; 
    }
    
    .game-card .game-image-wrapper {
        height: 200px;
    }

    .modal-content {
        margin: 20px auto;
        padding: 20px;
    }
    
    .other-games-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .platform-buttons {
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .nav-menu-btn {
        display: none; 
    }
}