/* ========================================
   MeGame Portfolio - Custom Styles
   Theme: Indonesian Traditional Gaming
   ======================================== */

:root {
    /* Primary Colors - Blue Theme */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #60a5fa;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    
    /* Neutral Colors */
    --bg-dark: #0a0f1c;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    --gradient-bg: linear-gradient(180deg, #0a0f1c 0%, #111827 50%, #0a0f1c 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 100px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* ========================================
   Reset & Base Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ========================================
   Background Effects
   ======================================== */

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    bottom: 20%;
    left: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--secondary);
    top: 40%;
    right: 10%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: var(--primary);
    bottom: 10%;
    right: 30%;
    animation-delay: -15s;
}

.shape-5 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    top: 60%;
    left: 20%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
    }
    50% {
        transform: translateY(-15px) rotate(-5deg);
    }
    75% {
        transform: translateY(-25px) rotate(3deg);
    }
}

/* ========================================
   Container
   ======================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-normal);
}

.header.scrolled {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    box-shadow: var(--shadow-md);
}

.nav {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Righteous', cursive;
    font-size: 1.8rem;
}

.logo-icon {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.logo-text .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px calc((100% - var(--container-width)) / 2 + 20px) 80px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-title .line-1 {
    display: block;
    color: var(--text-secondary);
    font-size: 0.6em;
    font-weight: 400;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.count-highlight {
    color: var(--secondary);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-stats {
    display: flex;
    gap: 50px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-visual {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    animation: fadeIn 1s ease 0.5s both;
}

.controller-3d {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.controller-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.controller-body {
    font-size: 150px;
    animation: floatController 4s infinite ease-in-out;
    position: relative;
    z-index: 1;
}

@keyframes floatController {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   Filter Section
   ======================================== */

.filter-section {
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

.filter-section .container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-tag {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-normal);
}

.filter-tag:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.filter-tag.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* ========================================
   Interactive Map Section
   ======================================== */

.map-section {
    padding: 80px 0 30px;
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.5) 50%, transparent 100%);
}

.map-container-full {
    position: relative;
    width: 100%;
    margin-top: 20px;
}

#indonesiaMap {
    width: 100%;
    height: 550px;
    background: transparent;
}

/* Region Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1999;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Game Iframe Popup */
.game-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    background: linear-gradient(145deg, var(--bg-dark) 0%, var(--bg-card) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2001;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.game-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.game-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
}

.game-popup-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.game-popup-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(6, 182, 212, 0.15) 100%);
    border-radius: var(--radius-md);
}

.game-popup-header h3 {
    font-family: 'Righteous', cursive;
    font-size: 1.3rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.game-popup-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-popup-fullscreen {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.game-popup-fullscreen:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.game-popup-close {
    font-size: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
}

.game-popup-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.game-popup-content {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}

.game-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
    z-index: 1;
}

.game-loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.game-loading p {
    font-size: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

#gameIframe {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 2;
    background: #000;
}

/* Region Popup */
.region-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(145deg, var(--bg-dark) 0%, var(--bg-card) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 0;
    width: 520px;
    max-width: 95%;
    max-height: 85vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.region-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.region-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.popup-header h3 {
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-header h3::before {
    content: '📍';
    -webkit-text-fill-color: initial;
}

.popup-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: rotate(90deg);
}

.popup-content {
    padding: 24px;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.popup-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.popup-count span {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.popup-count::before {
    content: '🎮';
    font-size: 2rem;
}

.popup-count::after {
    content: 'tersedia';
    font-size: 0.9rem;
    color: var(--text-muted);
}

.popup-games-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    grid-column: 1 / -1;
}

.popup-games-label::before {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3));
}

.popup-games-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), transparent);
}

.popup-games {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 24px;
    padding-right: 8px;
    flex: 1;
}

.popup-games::-webkit-scrollbar {
    width: 4px;
}

.popup-games::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}

.popup-games::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.popup-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(31, 41, 55, 0.8) 100%);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.popup-game-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.popup-game-item:hover {
    background: linear-gradient(135deg, var(--bg-card-hover) 0%, rgba(55, 65, 81, 0.9) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.popup-game-item:hover::before {
    transform: scaleX(1);
}

.popup-game-icon {
    font-size: 2.2rem;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.popup-game-item:hover .popup-game-icon {
    transform: scale(1.1);
}

.popup-game-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popup-game-item .play-arrow {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--primary);
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    background: rgba(59, 130, 246, 0.2);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-game-item:hover .play-arrow {
    opacity: 1;
    transform: scale(1);
}

.popup-game-item.more-games {
    grid-column: 1 / -1;
    flex-direction: row;
    padding: 14px;
}

.popup-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 30px;
    font-size: 1rem;
    gap: 10px;
}

.popup-btn::after {
    content: '→';
    transition: transform 0.2s ease;
}

.popup-btn:hover::after {
    transform: translateX(5px);
}

/* Map Legend */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: var(--container-width);
    margin: 20px auto 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-dark);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition-normal);
}

.legend-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.sumatera { background: #22c55e; }
.legend-color.jawa { background: #f59e0b; }
.legend-color.kalimantan { background: #8b5cf6; }
.legend-color.sulawesi { background: #ec4899; }
.legend-color.lainnya { background: #06b6d4; }

.legend-name {
    font-weight: 500;
    color: var(--text-primary);
}

.legend-count {
    background: var(--primary);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Responsive Map */
@media (max-width: 768px) {
    #indonesiaMap {
        height: 350px;
    }
    
    .game-popup {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
    }
    
    .game-popup-header {
        padding: 12px 16px;
    }
    
    .game-popup-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .game-popup-header h3 {
        font-size: 1rem;
    }
    
    .region-popup {
        width: 95%;
        max-width: 400px;
    }
    
    .popup-games {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        max-height: 250px;
    }
    
    .popup-game-icon {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
    
    .popup-game-name {
        font-size: 0.75rem;
    }
    
    .map-legend {
        gap: 10px;
        margin: 20px 15px 0;
        padding: 15px;
    }
    
    .legend-item {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #indonesiaMap {
        height: 280px;
    }
    
    .map-legend {
        flex-direction: column;
        align-items: stretch;
    }
    
    .legend-item {
        justify-content: space-between;
    }
}

/* ========================================
   Games Section
   ======================================== */

.games-section {
    padding: 40px 0 var(--section-padding);
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

/* Game Card */
.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.2);
}

.game-card-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    position: relative;
    overflow: hidden;
}

.game-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.15;
}

.game-card-image span {
    position: relative;
    z-index: 1;
    transition: var(--transition-normal);
}

.game-card:hover .game-card-image span {
    transform: scale(1.2) rotate(10deg);
}

.game-card-content {
    padding: 20px;
}

.game-card-title {
    font-family: 'Righteous', cursive;
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.game-card-region {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(42, 157, 143, 0.15);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-light);
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(59, 130, 246, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.play-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: white;
    color: var(--primary);
    border-radius: var(--radius-xl);
    font-weight: 600;
    transform: scale(0.8);
    transition: var(--transition-normal);
}

.game-card:hover .play-btn {
    transform: scale(1);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
}

/* ========================================
   About Section
   ======================================== */

.about-section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 46, 0.5) 50%, transparent 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.8;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.feature-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.indonesia-map {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    background: var(--gradient-accent);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.map-emoji {
    font-size: 180px;
    position: relative;
    z-index: 1;
}

.map-pins {
    position: absolute;
    width: 100%;
    height: 100%;
}

.pin {
    position: absolute;
    font-size: 24px;
    animation: pinBounce 2s infinite;
}

.pin-1 { top: 20%; left: 30%; animation-delay: 0s; }
.pin-2 { top: 40%; left: 60%; animation-delay: 0.3s; }
.pin-3 { top: 60%; left: 35%; animation-delay: 0.6s; }
.pin-4 { top: 30%; left: 70%; animation-delay: 0.9s; }
.pin-5 { top: 55%; left: 55%; animation-delay: 1.2s; }

@keyframes pinBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ========================================
   Contact Section
   ======================================== */

.contact-section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-card);
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.contact-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--bg-dark);
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    transition: var(--transition-normal);
}

.contact-link:hover {
    background: var(--primary);
}

.contact-icon {
    font-size: 1.5rem;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 50px;
    }
    
    .controller-3d {
        width: 200px;
        height: 200px;
    }
    
    .controller-body {
        font-size: 100px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .about-text {
        text-align: center;
    }
    
    .features {
        align-items: center;
    }
    
    .feature {
        text-align: left;
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-link {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .filter-section .container {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
    }
    
    .contact-card {
        padding: 40px 25px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.4rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .feature {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* ========================================
   Animations for Cards
   ======================================== */

.game-card {
    animation: fadeInUp 0.6s ease both;
}

.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.2s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.3s; }
.game-card:nth-child(7) { animation-delay: 0.35s; }
.game-card:nth-child(8) { animation-delay: 0.4s; }
