/* ================================================
   style.css — Grid Survival Studio
   Classic Cartoon / Retro Fun Theme
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

/* ── CSS VARIABLES ── */
:root {
    --c-green:      #2ecc71;
    --c-green-dark: #27ae60;
    --c-blue:       #3498db;
    --c-blue-dark:  #2980b9;
    --c-yellow:     #f1c40f;
    --c-yellow-dark:#e67e22;
    --c-red:        #e74c3c;
    --c-red-dark:   #c0392b;
    --c-purple:     #9b59b6;
    --c-pink:       #e91e8c;
    --c-cyan:       #1abc9c;

    --bg-main:      #f0f4ff;
    --bg-card:      #ffffff;
    --bg-nav:       #ffffff;
    --bg-footer:    #2c3e50;
    --bg-hero:      linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

    --text-dark:    #2c3e50;
    --text-muted:   #7f8c8d;
    --text-light:   #ecf0f1;

    --border-r:     16px;
    --border-r-sm:  10px;
    --shadow:       4px 6px 0px rgba(0,0,0,0.18);
    --shadow-card:  0 8px 24px rgba(0,0,0,0.10);
    --shadow-hover: 6px 8px 0px rgba(0,0,0,0.22);

    --font-title:   'Fredoka One', cursive;
    --font-body:    'Nunito', sans-serif;
}

/* ── DARK MODE ── */
[data-theme="dark"] {
    --bg-main:   #1a1d2e;
    --bg-card:   #252840;
    --bg-nav:    #1a1d2e;
    --text-dark: #ecf0f1;
    --text-muted:#aaa;
    --shadow:    4px 6px 0px rgba(0,0,0,0.4);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 17px;
    transition: background 0.3s, color 0.3s;
}

.modal-open { overflow: hidden; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 8px; background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--c-purple); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-pink); }

/* ────────────────────────────────────────────────
   NAVIGATION
──────────────────────────────────────────────── */
nav {
    background-color: var(--bg-nav);
    border-bottom: 4px solid var(--c-purple);
    box-shadow: 0 4px 16px rgba(155,89,182,0.15);
    padding: 14px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-studio-name {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--c-purple);
    font-family: var(--font-title);
    font-size: 1.4em;
    letter-spacing: 1px;
    gap: 10px;
}

.nav-logo-image {
    height: 36px;
    border-radius: 8px;
    border: 3px solid var(--c-purple);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

#themeToggle {
    background: var(--c-yellow);
    border: 3px solid #000;
    border-radius: var(--border-r-sm);
    color: #000;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85em;
    padding: 6px 14px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.1s, box-shadow 0.1s;
}
#themeToggle:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #000;
}
#themeToggle:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

.nav-menu-btn {
    background: var(--c-purple);
    border: 3px solid #000;
    border-radius: var(--border-r-sm);
    color: #fff;
    font-size: 1.1em;
    padding: 6px 14px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
}
.nav-menu-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #000;
}
.nav-menu-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* ────────────────────────────────────────────────
   MENU OVERLAY
──────────────────────────────────────────────── */
#menuOverlay {
    position: fixed;
    inset: 0;
    background: rgba(30,20,60,0.96);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.25s;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#menuOverlay.open {
    display: flex;
    opacity: 1;
}

.menu-close-btn {
    position: absolute;
    top: 18px;
    right: 24px;
    color: var(--c-red);
    font-size: 2.5em;
    cursor: pointer;
    font-family: var(--font-title);
    transition: color 0.15s, transform 0.15s;
}
.menu-close-btn:hover {
    color: var(--c-yellow);
    transform: rotate(90deg);
}

.menu-links { list-style: none; text-align: center; }
.menu-links li { margin: 16px 0; }
.menu-links a {
    color: #fff;
    text-decoration: none;
    font-family: var(--font-title);
    font-size: 1.8em;
    letter-spacing: 2px;
    transition: color 0.15s;
    display: inline-block;
    padding: 6px 20px;
}
.menu-links a:hover { color: var(--c-yellow); }

/* ────────────────────────────────────────────────
   HERO SECTION
──────────────────────────────────────────────── */
.hero {
    min-height: 80vh;
    background: var(--bg-hero);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating cloud shapes */
.hero-corner {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    background: #fff;
}
.hero-corner-tl { width: 220px; height: 220px; top: -60px; left: -60px; }
.hero-corner-tr { width: 180px; height: 180px; top: -40px; right: -40px; }
.hero-corner-bl { width: 160px; height: 160px; bottom: -60px; left: 10%; }
.hero-corner-br { width: 240px; height: 240px; bottom: -80px; right: -60px; }

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(2rem, 7vw, 4rem);
    color: #fff;
    text-shadow: 4px 4px 0 rgba(0,0,0,0.25);
    margin-bottom: 16px;
    letter-spacing: 2px;
    animation: heroTitleIn 0.8s ease both;
}

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

.tagline {
    font-family: var(--font-body);
    font-size: clamp(1rem, 3vw, 1.4em);
    color: rgba(255,255,255,0.9);
    margin-bottom: 32px;
    min-height: 2em;
    font-weight: 600;
}

.cursor {
    display: inline-block;
    animation: blink 0.8s step-end infinite;
    color: var(--c-yellow);
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.btn-primary-scroll {
    display: inline-block;
    padding: 16px 36px;
    background: var(--c-yellow);
    color: #000;
    font-family: var(--font-title);
    font-size: 1.15em;
    text-decoration: none;
    border: 4px solid #000;
    border-radius: var(--border-r);
    box-shadow: 5px 5px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
    letter-spacing: 1px;
    animation: heroTitleIn 1s ease 0.3s both;
}
.btn-primary-scroll:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 #000;
}
.btn-primary-scroll:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 #000;
}

/* ────────────────────────────────────────────────
   STATS SECTION
──────────────────────────────────────────────── */
#stats-section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 40px 5%;
    background: var(--bg-main);
}

.stat-card {
    background: var(--bg-card);
    border: 3px solid #000;
    border-radius: var(--border-r);
    box-shadow: var(--shadow);
    padding: 24px 30px;
    text-align: center;
    min-width: 140px;
    flex: 1 1 140px;
    max-width: 200px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-hover);
}
.stat-card:nth-child(1) { border-color: var(--c-green); }
.stat-card:nth-child(2) { border-color: var(--c-blue); }
.stat-card:nth-child(3) { border-color: var(--c-yellow-dark); }
.stat-card:nth-child(4) { border-color: var(--c-purple); }

.stat-number {
    font-family: var(--font-title);
    font-size: 2.2em;
    color: var(--c-purple);
    display: block;
}
.stat-label {
    font-family: var(--font-body);
    font-size: 0.78em;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ────────────────────────────────────────────────
   SECTION UTILITY
──────────────────────────────────────────────── */
.section-padding {
    padding: 60px 5%;
}

.section-header-title {
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--c-purple);
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    width: 100%;
}
.section-header-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: var(--c-yellow);
    border-radius: 4px;
    margin: 10px auto 0;
    border: 2px solid #000;
}

/* ────────────────────────────────────────────────
   FILTER TABS
──────────────────────────────────────────────── */
.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.filter-tab {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.85em;
    padding: 10px 20px;
    border: 3px solid #000;
    border-radius: var(--border-r-sm);
    background: var(--bg-card);
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.filter-tab:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #000;
    background: var(--c-purple);
    color: #fff;
    border-color: var(--c-purple);
}
.filter-tab.active {
    background: var(--c-purple);
    color: #fff;
    border-color: var(--c-purple);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}
.filter-tab:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* ────────────────────────────────────────────────
   GAMES GRID
──────────────────────────────────────────────── */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.game-card {
    background: var(--bg-card);
    border: 3px solid #000;
    border-radius: var(--border-r);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.game-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-hover);
}
.game-card:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 3px 0 rgba(0,0,0,0.18);
}

.game-image-wrapper {
    overflow: hidden;
    height: 180px;
    border-bottom: 3px solid #000;
}
.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}
.game-card:hover .game-image { transform: scale(1.06); }

.game-info {
    padding: 16px;
}
.game-title {
    font-family: var(--font-title);
    font-size: 1.1em;
    color: var(--c-purple);
    margin-bottom: 6px;
    line-height: 1.3;
}
.game-description {
    font-size: 0.88em;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.5;
}
.game-dev {
    font-size: 0.78em;
    font-weight: 700;
    color: var(--c-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ────────────────────────────────────────────────
   ABOUT SECTION
──────────────────────────────────────────────── */
.about-section {
    background: linear-gradient(135deg, var(--c-purple) 0%, var(--c-blue) 100%);
    color: #fff;
    text-align: center;
    padding: 60px 5%;
}
.about-section .section-header-title {
    color: #fff;
}
.about-section .section-header-title::after {
    background: var(--c-yellow);
}
.about-section p {
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.05em;
    line-height: 1.8;
    opacity: 0.92;
}

.about-tip {
    font-size: 0.85em;
    color: rgba(255,255,255,0.7);
    font-family: var(--font-body);
    letter-spacing: 1px;
    line-height: 2;
    margin-top: 20px;
}
.about-tip-highlight {
    color: var(--c-yellow);
    font-weight: 700;
}

.about-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.btn-bug {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.95em;
    padding: 12px 24px;
    background: transparent;
    border: 3px solid #fff;
    color: #fff;
    cursor: pointer;
    border-radius: var(--border-r-sm);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    letter-spacing: 1px;
    transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.1s;
}
.btn-bug:hover {
    background: var(--c-red);
    border-color: var(--c-red);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.3);
}
.btn-bug:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.btn-saran {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.95em;
    padding: 12px 24px;
    background: transparent;
    border: 3px solid #fff;
    color: #fff;
    cursor: pointer;
    border-radius: var(--border-r-sm);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    letter-spacing: 1px;
    transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.1s;
}
.btn-saran:hover {
    background: var(--c-yellow-dark);
    border-color: var(--c-yellow-dark);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.3);
}
.btn-saran:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

/* ────────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────────── */
footer {
    background: var(--bg-footer);
    color: var(--text-light);
    text-align: center;
    padding: 48px 5% 24px;
}
footer h3 {
    font-family: var(--font-title);
    font-size: 1.8em;
    color: var(--c-yellow);
    margin-bottom: 12px;
}
footer p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95em;
    margin-bottom: 8px;
}

.footer-email {
    color: var(--c-cyan);
    text-decoration: none;
    font-weight: 700;
}
.footer-email:hover { text-decoration: underline; }

.footer-contact-p {
    margin-top: 10px;
}

.footer-cs-link {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.95em;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6c63ff, #48bfe3);
    color: #fff;
    border: 3px solid #000;
    border-radius: var(--border-r-sm);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 4px 4px 0 #000;
    letter-spacing: 1px;
    margin-top: 16px;
    transition: transform 0.1s, box-shadow 0.1s;
}
.footer-cs-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}
.footer-cs-link:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 16px;
}
.social-icons a {
    color: rgba(255,255,255,0.7);
    font-size: 1.6em;
    transition: color 0.15s, transform 0.15s;
    display: inline-block;
}
.social-icons a:hover {
    color: var(--c-yellow);
    transform: scale(1.2);
}

.footer-copy {
    margin-top: 32px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.4);
}

/* ────────────────────────────────────────────────
   GAME MODAL
──────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(20,10,40,0.85);
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}
.modal.active { display: flex; }

.modal-content {
    background: var(--bg-card);
    border: 4px solid var(--c-purple);
    border-radius: var(--border-r);
    box-shadow: 8px 8px 0 rgba(0,0,0,0.3);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    animation: modalIn 0.3s ease both;
}
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-thumb { background: var(--c-purple); border-radius: 8px; }

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 18px;
    color: var(--text-muted);
    font-size: 2em;
    cursor: pointer;
    font-family: var(--font-title);
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}
.close-modal:hover { color: var(--c-red); transform: rotate(90deg); }

.modal-logo {
    display: block;
    margin: 0 auto 14px;
    max-height: 80px;
    border-radius: 12px;
    border: 3px solid var(--c-purple);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}

.modal-title {
    font-family: var(--font-title);
    font-size: 1.6em;
    color: var(--c-purple);
    text-align: center;
    margin-bottom: 12px;
}

.modal-description {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.95em;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Gallery */
.gallery-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-r-sm);
    border: 3px solid #000;
    margin-bottom: 12px;
}
.gallery-slides {
    display: flex;
    transition: transform 0.35s ease;
}
.gallery-slides img {
    width: 100%;
    flex-shrink: 0;
    display: block;
    object-fit: cover;
    max-height: 280px;
}
.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    border: 2px solid #fff;
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.gallery-btn:hover { background: var(--c-purple); }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
}
.gallery-dots .gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    border: 2px solid #000;
    transition: background 0.15s, transform 0.15s;
}
.gallery-dots .gallery-dot.active {
    background: var(--c-purple);
    transform: scale(1.2);
}

/* Download section */
.download-section {
    background: var(--bg-main);
    border: 2px solid #ddd;
    border-radius: var(--border-r-sm);
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}
.platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
}
.platform-buttons a {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.88em;
    padding: 10px 20px;
    background: var(--c-green);
    color: #fff;
    border: 3px solid #000;
    border-radius: var(--border-r-sm);
    text-decoration: none;
    box-shadow: 3px 3px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
}
.platform-buttons a:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #000;
}
.platform-buttons a:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

.supported-platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85em;
    flex-wrap: wrap;
}
.platform-icon { font-size: 1.2em; }

/* Other games */
#other-games-container { margin-top: 20px; }
.section-title {
    font-family: var(--font-title);
    font-size: 1.1em;
    color: var(--c-purple);
    margin-bottom: 14px;
    text-align: center;
}
.other-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.other-game-item {
    border: 2px solid #ddd;
    border-radius: var(--border-r-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
}
.other-game-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}
.other-game-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}
.other-game-item p {
    font-size: 0.72em;
    font-weight: 700;
    padding: 6px;
    color: var(--text-dark);
    line-height: 1.3;
}

/* ────────────────────────────────────────────────
   MASCOT
──────────────────────────────────────────────── */
#mascot-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.speech-bubble {
    background: #fff;
    border: 3px solid var(--c-purple);
    border-radius: var(--border-r-sm);
    padding: 8px 14px;
    font-family: var(--font-body);
    font-size: 0.85em;
    font-weight: 700;
    color: var(--text-dark);
    max-width: 180px;
    text-align: center;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
    animation: bubPop 0.3s ease, bubFloat 3s ease-in-out infinite 0.3s;
    display: none;
    position: relative;
}
.speech-bubble.show { display: block; }
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--c-purple);
}

.bcursor {
    animation: blink 0.7s step-end infinite;
    color: var(--c-purple);
}

.mascot-body {
    width: 64px;
    height: 64px;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--c-purple);
    overflow: hidden;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    animation: mFloat 3s ease-in-out infinite;
    transition: transform 0.2s;
}
.mascot-body:hover { transform: scale(1.12); }
.mascot-body img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mwave {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 1.1em;
    animation: wave 1.5s ease-in-out infinite;
}

.mshadow {
    width: 50px;
    height: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    animation: shad 3s ease-in-out infinite;
}

/* ────────────────────────────────────────────────
   SCROLL TO TOP
──────────────────────────────────────────────── */
#scrollTopBtn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 800;
    width: 44px;
    height: 44px;
    background: var(--c-purple);
    border: 3px solid #000;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.3s;
    opacity: 0;
}
#scrollTopBtn.visible, #scrollTopBtn.show { opacity: 1; }
#scrollTopBtn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #000;
}
#scrollTopBtn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* ────────────────────────────────────────────────
   CANVAS / PARTICLES
──────────────────────────────────────────────── */
#pcanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* ────────────────────────────────────────────────
   TOAST
──────────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #2c3e50;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--border-r-sm);
    border: 3px solid var(--c-purple);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9em;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
}
#toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ────────────────────────────────────────────────
   EASTER EGG
──────────────────────────────────────────────── */
#easter-egg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9998;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    cursor: pointer;
}
#easter-egg.show { display: flex; }
.ee-title {
    font-family: var(--font-title);
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: var(--c-yellow);
    text-shadow: 4px 4px 0 rgba(0,0,0,0.4);
    text-align: center;
    line-height: 1.8;
    animation: eeGlow 1s ease-in-out infinite alternate;
}
.ee-sub {
    font-family: var(--font-body);
    font-size: 1em;
    color: var(--c-green);
    font-weight: 700;
    letter-spacing: 2px;
}
@keyframes eeGlow {
    0%  { text-shadow: 4px 4px 0 #000; }
    100%{ text-shadow: 4px 4px 0 #000, 0 0 40px var(--c-yellow); }
}

/* ────────────────────────────────────────────────
   KEYFRAMES
──────────────────────────────────────────────── */
@keyframes mFloat   { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes wave     { 0%,100%{transform:rotate(-10deg)} 25%{transform:rotate(25deg)} 50%{transform:rotate(-5deg)} 75%{transform:rotate(20deg)} }
@keyframes shad     { 0%,100%{transform:scaleX(0.8);opacity:0.3} 50%{transform:scaleX(1.2);opacity:0.5} }
@keyframes bubPop   { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
@keyframes bubFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
@keyframes countUp  { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

/* ────────────────────────────────────────────────
   CS CHAT WIDGET
──────────────────────────────────────────────── */
#cs-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    width: 54px;
    height: 54px;
    background: var(--c-green);
    border: 3px solid #000;
    border-radius: 50%;
    color: #fff;
    font-size: 1.4em;
    cursor: pointer;
    box-shadow: 4px 4px 0 #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
    animation: csPulse 2.5s ease-in-out infinite;
}
#cs-toggle:hover {
    transform: scale(1.1);
    animation: none;
    box-shadow: 6px 6px 0 #000;
}
#cs-toggle .cs-badge {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--c-red);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.65em;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #000;
    display: none;
}
#cs-toggle .cs-badge.show { display: flex; }

@keyframes csPulse {
    0%, 100% { box-shadow: 4px 4px 0 #000; }
    50%       { box-shadow: 4px 4px 0 #000, 0 0 16px rgba(46,204,113,0.5); }
}

#cs-window {
    position: fixed;
    bottom: 86px;
    left: 20px;
    width: 320px;
    max-height: 480px;
    background: var(--bg-card);
    border: 3px solid var(--c-green);
    border-radius: var(--border-r);
    box-shadow: 6px 6px 0 #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
}
#cs-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.cs-header {
    background: var(--c-green);
    border-bottom: 3px solid #000;
    border-radius: calc(var(--border-r) - 3px) calc(var(--border-r) - 3px) 0 0;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.cs-header-avatar {
    width: 36px; height: 36px;
    border: 3px solid #000;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.cs-header-avatar img {
    width: 100%; height: 100%;
    object-fit: contain;
}
.cs-header-info { flex: 1; }
.cs-header-name {
    font-family: var(--font-title);
    font-size: 0.95em;
    color: #fff;
    display: block;
}
.cs-header-status {
    font-family: var(--font-body);
    font-size: 0.8em;
    color: rgba(255,255,255,0.8);
}
.cs-header-status::before { content: '● '; font-size: 0.7em; }

.cs-close-btn {
    background: rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9em;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.cs-close-btn:hover { background: rgba(0,0,0,0.4); }

.cs-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    max-height: 280px;
}
.cs-messages::-webkit-scrollbar { width: 4px; }
.cs-messages::-webkit-scrollbar-thumb { background: var(--c-green); border-radius: 4px; }

.cs-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: msgIn 0.25s ease-out both;
}
.cs-msg.user { align-self: flex-end; align-items: flex-end; }
.cs-msg.bot  { align-self: flex-start; align-items: flex-start; }

.cs-msg-bubble {
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 0.9em;
    line-height: 1.5;
    border: 2px solid;
    border-radius: var(--border-r-sm);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.cs-msg.user .cs-msg-bubble { background: var(--c-green); border-color: var(--c-green-dark); color: #fff; }
.cs-msg.bot .cs-msg-bubble  { background: var(--bg-main); border-color: #ddd; color: var(--text-dark); }

.cs-msg-time {
    font-family: var(--font-body);
    font-size: 0.7em;
    color: var(--text-muted);
    margin-top: 3px;
    padding: 0 2px;
}

.cs-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    align-self: flex-start;
}
.cs-typing span {
    width: 7px; height: 7px;
    background: var(--c-green);
    border-radius: 50%;
    display: inline-block;
    animation: typingDot 1s ease-in-out infinite;
}
.cs-typing span:nth-child(2) { animation-delay: 0.2s; }
.cs-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50%       { transform: translateY(-5px); opacity: 1; }
}

.cs-quick-btns {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-top: 2px solid var(--bg-main);
}
.cs-quick-btn {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.78em;
    padding: 5px 12px;
    border: 2px solid var(--c-blue);
    border-radius: var(--border-r-sm);
    background: transparent;
    color: var(--c-blue);
    cursor: pointer;
    transition: background 0.15s;
}
.cs-quick-btn:hover { background: var(--c-blue); color: #fff; }

.cs-input-row {
    display: flex;
    border-top: 2px solid var(--bg-main);
    flex-shrink: 0;
}
#cs-input {
    flex: 1;
    background: var(--bg-main);
    border: none;
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 14px;
    padding: 10px 12px;
    outline: none;
    resize: none;
    min-height: 42px;
    max-height: 80px;
    border-radius: 0 0 0 calc(var(--border-r) - 3px);
}
#cs-input::placeholder { color: var(--text-muted); }
#cs-send {
    background: var(--c-green);
    border: none;
    border-left: 2px solid #000;
    color: #fff;
    font-size: 1.1em;
    padding: 0 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 0 0 calc(var(--border-r) - 3px) 0;
}
#cs-send:hover { background: var(--c-green-dark); }

.cs-report-link {
    padding: 7px 12px;
    border-top: 1px solid var(--bg-main);
    font-family: var(--font-body);
    font-size: 0.78em;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    letter-spacing: 1px;
    background: transparent;
    border: none;
    width: 100%;
    display: block;
}
.cs-report-link:hover { color: var(--c-yellow-dark); }

@keyframes msgIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ────────────────────────────────────────────────
   BUG / SARAN MODAL
──────────────────────────────────────────────── */
#report-modal {
    position: fixed;
    inset: 0;
    background: rgba(20,10,40,0.85);
    z-index: 3500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#report-modal.open { display: flex; }

.report-box {
    background: var(--bg-card);
    border: 4px solid var(--c-purple);
    border-radius: var(--border-r);
    box-shadow: 8px 8px 0 rgba(0,0,0,0.25);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    animation: modalIn 0.3s ease both;
}

.report-title {
    font-family: var(--font-title);
    font-size: 1.3em;
    color: var(--c-purple);
    margin-bottom: 20px;
    display: block;
    letter-spacing: 1px;
}

.report-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8em;
    cursor: pointer;
    font-family: var(--font-title);
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}
.report-close:hover { color: var(--c-red); transform: rotate(90deg); }

.report-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.report-type-tab {
    flex: 1;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.88em;
    padding: 10px;
    border: 3px solid #ddd;
    border-radius: var(--border-r-sm);
    background: var(--bg-main);
    color: var(--text-muted);
    cursor: pointer;
    letter-spacing: 1px;
    text-align: center;
    transition: all 0.15s;
}
.report-type-tab.active[data-type="bug"] {
    border-color: var(--c-red);
    color: var(--c-red);
    background: rgba(231,76,60,0.07);
}
.report-type-tab.active[data-type="saran"] {
    border-color: var(--c-yellow-dark);
    color: var(--c-yellow-dark);
    background: rgba(243,156,18,0.07);
}
.report-type-tab:hover:not(.active) { border-color: var(--c-purple); color: var(--c-purple); }

.rfield {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.rfield label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85em;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.rfield select,
.rfield input,
.rfield textarea {
    background: var(--bg-main);
    border: 2px solid #ddd;
    border-radius: var(--border-r-sm);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 12px;
    outline: none;
    width: 100%;
    resize: vertical;
    transition: border-color 0.15s;
}
.rfield select:focus,
.rfield input:focus,
.rfield textarea:focus { border-color: var(--c-purple); }

.btn-report-submit {
    width: 100%;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1em;
    padding: 14px;
    background: var(--c-purple);
    border: 3px solid #000;
    border-radius: var(--border-r-sm);
    color: #fff;
    cursor: pointer;
    box-shadow: 4px 4px 0 #000;
    letter-spacing: 2px;
    transition: transform 0.1s, box-shadow 0.1s;
    margin-top: 8px;
}
.btn-report-submit:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}
.btn-report-submit:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}
.btn-report-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.report-result { display: none; text-align: center; padding: 24px 0 8px; }
.report-result.show { display: block; }
.report-result-icon { font-size: 2.5em; display: block; margin-bottom: 12px; }
.report-result-title {
    font-family: var(--font-title);
    font-size: 1.1em;
    margin-bottom: 10px;
    display: block;
    color: var(--c-purple);
}
.report-result-msg {
    font-family: var(--font-body);
    font-size: 0.95em;
    color: var(--text-muted);
    line-height: 1.6;
    display: block;
}

/* Ticket box di report modal widget */
.report-ticket-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    background: rgba(155,89,182,0.1);
    border: 1.5px solid var(--c-purple);
    border-radius: 10px;
    padding: 12px 20px;
}
.report-ticket-num {
    font-family: var(--font-title, monospace);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--c-purple);
    letter-spacing: 2px;
}

/* ────────────────────────────────────────────────
   ADMIN PANEL
──────────────────────────────────────────────── */
.report-item {
    background: var(--bg-card);
    border: 2px solid #ddd;
    border-radius: var(--border-r-sm);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}
.report-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.report-item-type {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.75em;
    padding: 3px 10px;
    border: 2px solid;
    border-radius: 20px;
    letter-spacing: 1px;
}
.report-item-type.bug   { color: var(--c-red); border-color: var(--c-red); background: rgba(231,76,60,0.08); }
.report-item-type.saran { color: var(--c-yellow-dark); border-color: var(--c-yellow-dark); background: rgba(243,156,18,0.07); }
.report-item-game { font-weight: 700; font-size: 0.85em; color: var(--c-blue); }
.report-item-time { font-size: 0.8em; color: var(--text-muted); margin-left: auto; }
.report-item-desc { font-size: 0.9em; color: var(--text-dark); line-height: 1.5; margin-bottom: 8px; }
.report-item-ai { font-size: 0.88em; color: var(--c-blue); background: rgba(52,152,219,0.07); border-left: 3px solid var(--c-blue); padding: 6px 10px; margin-bottom: 8px; border-radius: 0 var(--border-r-sm) var(--border-r-sm) 0; }
.report-item-contact { font-size: 0.82em; color: var(--text-muted); }
.report-item-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-mark-done {
    font-family: var(--font-body); font-weight: 800; font-size: 0.8em;
    padding: 6px 14px; border: 2px solid var(--c-green); border-radius: var(--border-r-sm);
    color: var(--c-green); background: transparent; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-mark-done:hover { background: var(--c-green); color: #fff; }
.btn-del-report {
    font-family: var(--font-body); font-weight: 800; font-size: 0.8em;
    padding: 6px 14px; border: 2px solid var(--c-red); border-radius: var(--border-r-sm);
    color: var(--c-red); background: transparent; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-del-report:hover { background: var(--c-red); color: #fff; }
.report-item.done { opacity: 0.5; border-color: var(--c-green); }
.report-empty { text-align: center; font-size: 1em; color: var(--text-muted); padding: 40px 0; }

/* ────────────────────────────────────────────────
   RESPONSIVE — MOBILE
──────────────────────────────────────────────── */
@media (max-width: 600px) {
    nav { padding: 10px 4%; }
    .nav-studio-name { font-size: 1.1em; }
    .hero { padding: 50px 4% 40px; min-height: 70vh; }
    .hero-title { font-size: clamp(1.5rem, 8vw, 2.5rem); }
    .tagline { font-size: 0.95em; }
    .btn-primary-scroll { font-size: 0.95em; padding: 12px 24px; }
    #stats-section { gap: 12px; padding: 28px 4%; }
    .stat-card { padding: 16px 14px; min-width: 110px; }
    .stat-number { font-size: 1.7em; }
    .section-padding { padding: 40px 4%; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .game-image-wrapper { height: 130px; }
    .game-title { font-size: 0.95em; }
    .game-description { font-size: 0.8em; }
    .about-section { padding: 40px 4%; }
    .filter-tabs { gap: 6px; }
    .filter-tab { font-size: 0.78em; padding: 8px 12px; }
    #cs-window { width: calc(100vw - 40px); left: 20px; max-height: 60vh; }
    .modal-content { padding: 20px 14px; }
    .modal-title { font-size: 1.2em; }
    .other-games-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
    .mascot-body { width: 52px; height: 52px; }
    .speech-bubble { font-size: 0.78em; max-width: 140px; }
    #mascot-wrap { bottom: 12px; right: 12px; }
    #scrollTopBtn { bottom: 84px; right: 12px; width: 38px; height: 38px; }
    .report-box { padding: 18px; }
    .about-actions { gap: 10px; }
    .btn-bug, .btn-saran { font-size: 0.85em; padding: 10px 18px; }
    footer { padding: 36px 4% 20px; }
}

@media (max-width: 380px) {
    .nav-studio-name span:last-child { display: none; }
    .games-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { min-width: 90px; max-width: 50%; }
}

@media (min-width: 1200px) {
    .games-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── HERO BUTTONS ROW ── */
.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    animation: heroTitleIn 1s ease 0.3s both;
}
.hero-btns .btn-primary-scroll { animation: none; }

.btn-cs-hero {
    display: inline-block;
    padding: 16px 36px;
    background: var(--c-purple);
    color: #fff;
    font-family: var(--font-title);
    font-size: 1.15em;
    text-decoration: none;
    border: 4px solid #000;
    border-radius: var(--border-r);
    box-shadow: 5px 5px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
    letter-spacing: 1px;
}
.btn-cs-hero:hover  { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 #000; }
.btn-cs-hero:active { transform: translate(3px,3px);   box-shadow: 2px 2px 0 #000; }

/* ── LANGUAGE TOGGLE ── */
#langToggle {
    background: var(--c-yellow);
    border: 3px solid #000;
    border-radius: var(--border-r-sm);
    color: #000;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85em;
    padding: 6px 12px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.1s, box-shadow 0.1s;
    white-space: nowrap;
}
#langToggle:hover  { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #000; }
#langToggle:active { transform: translate(2px,2px);   box-shadow: 1px 1px 0 #000; }

@media (max-width: 500px) {
    .hero-btns { flex-direction: column; align-items: center; }
    #langToggle { font-size: 0.78em; padding: 5px 10px; }
}
