/* Variables & Theming */
:root {
    /* Light Theme (Default) */
    --bg-primary: #f4f6f4;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --accent-primary: #76b900;
    --accent-hover: #5a8e00;
    --accent-glow: rgba(118, 185, 0, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(118, 185, 0, 0.3);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-primary: #76b900;
    --accent-hover: #8ce100;
    --accent-glow: rgba(118, 185, 0, 0.4);
    --glass-bg: rgba(20, 20, 20, 0.9);
    --glass-border: rgba(118, 185, 0, 0.2);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 64px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Custom Language Dropdown */
.custom-dropdown {
    position: relative;
    font-weight: 600;
}

.dropdown-selected {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.dropdown-selected img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.lang-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 15px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 10px;
    border-radius: 2px;
    font-weight: 800;
}

.dropdown-items {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: max-content;
    white-space: nowrap;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    margin-top: 5px;
    z-index: 99;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-items.select-hide {
    display: none;
}

.dropdown-items div {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    transition: background 0.2s ease;
}

.dropdown-items div img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.dropdown-items div:hover {
    background: var(--glass-border);
}

.icon-button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.icon-button:hover {
    background: var(--glass-border);
}

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

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/hero_bg.png') center/cover no-repeat;
    opacity: 0.8;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

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

.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* Sections Base */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Glass Panel Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.image-wrapper img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
}

.image-wrapper:hover img {
    transform: scale(1.02);
}

/* Games Section */
.game-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.game-icon {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.game-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.game-short-desc {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 2rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-item .emoji {
    font-size: 1.8rem;
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

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

.store-buttons {
    display: flex;
    gap: 1rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Carousel */
.carousel {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    background: transparent;
    aspect-ratio: 9/16;
    max-height: 600px;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-track img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 32px 0;
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.carousel-nav button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.carousel-nav button:hover {
    color: var(--accent-primary);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-logo {
    height: 32px;
    border-radius: 6px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Contact Form */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.word-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.word-count.limit-reached {
    color: #ef4444;
}

.submit-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border: none;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-status.success { color: var(--accent-primary); }
.form-status.error { color: #ef4444; }

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0.8; }
}

.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-right {
    transform: translateX(40px);
}

.fade-right.visible {
    transform: translateX(0);
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid, .game-showcase {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .carousel {
        aspect-ratio: auto;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.2rem;
    }
    
    .header-container {
        height: 70px;
    }

    .logo img {
        height: 48px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    section {
        padding: 4rem 0;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding-top: 70px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .cta-group .btn {
        width: 100%;
        text-align: center;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .about-text h2 {
        font-size: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .game-icon {
        width: 72px;
        height: 72px;
    }

    .game-info h3 {
        font-size: 1.8rem;
    }

    .carousel {
        height: 400px;
    }
}
