:root {
    /* Colors - Clean Light Theme with Baigani & Green Accents */
    --clr-bg: #f8f9fc; /* Very light cool grey/white */
    --clr-bg-alt: #ffffff; /* Pure white for cards */
    --clr-primary: #7e22ce; /* Deep Baigani/Purple */
    --clr-primary-light: #9333ea;
    --clr-primary-dark: #581c87;
    --clr-accent: #10b981; /* Fresh Emerald Green */
    --clr-accent-hover: #059669; 
    --clr-text: #1e293b; /* Dark Slate for high contrast text */
    --clr-text-muted: #64748b; /* Lighter Slate for secondary text */
    --clr-border: #e2e8f0;
    
    /* Typography */
    --ff-main: 'Plus Jakarta Sans', system-ui, sans-serif;
    
    /* Performance friendly transitions (opacity and transform only) */
    --transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    
    /* Shadows - softer for light theme */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(126, 34, 206, 0.1), 0 4px 6px -2px rgba(126, 34, 206, 0.05);
}

/* Base reset for Core Web Vitals */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--ff-main);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    /* Removed transition on color for faster paint, keeping for transform/shadow */
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - simplified for performance (removed blur) */
.header {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--clr-border);
    position: sticky;
    top: 0;
    z-index: 100; /* Lower z-index for better stacking context management */
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; /* Explicit height reduces layout shifts (CLS) */
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    gap: 6px;
    letter-spacing: -0.5px;
}

.logo-yono {
    color: var(--clr-text);
}

.logo-games {
    color: var(--clr-primary);
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
    font-weight: 600;
}

.nav-list a:not(.btn-telegram) {
    color: var(--clr-text-muted);
}

.nav-list a:not(.btn-telegram):hover {
    color: var(--clr-primary);
}

.btn-telegram {
    background-color: #0088cc;
    padding: 10px 24px;
    border-radius: 50px;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(0, 136, 204, 0.2);
    transition: var(--transition);
}

.btn-telegram:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(0, 136, 204, 0.3);
}

/* Mobile Menu Button - Animated Hamburger */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    z-index: 1000;
}

.mobile-menu-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--clr-text);
    border-radius: 3px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, background-color 0.3s;
    transform-origin: left center;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(2px, -2px);
    background-color: var(--clr-primary);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(2px, 2px);
    background-color: var(--clr-primary);
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, #f3e8ff 0%, var(--clr-bg) 100%);
    position: relative;
    border-bottom: 1px solid var(--clr-border);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive fluid typography */
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    color: var(--clr-text);
    letter-spacing: -1px;
}

.highlight {
    color: var(--clr-primary);
}

.highlight-green {
    color: var(--clr-accent);
}

.hero p {
    font-size: 1.125rem;
    color: var(--clr-text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 52px; /* Prevent layout shift if buttons wrap */
}

.btn {
    display: inline-flex; /* Better alignment */
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
    will-change: transform; /* Hint for compositing */
}

.btn-primary {
    background-color: var(--clr-accent);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    background-color: var(--clr-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background-color: #ffffff;
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--clr-primary-light);
    color: var(--clr-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Removed blobs for Core Web Vitals to eliminate unnecessary compositing repaints */
.blob-1, .blob-2 { display: none; }

/* Games Section */
.games-section {
    padding: 80px 0;
    contain: content; /* CSS Containment for rendering performance */
}

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 12px;
    color: var(--clr-text);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--clr-text-muted);
    font-size: 1.125rem;
}

/* Controls */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 16px;
    background-color: var(--clr-bg-alt);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-sm);
}

.search-input {
    flex: 1;
    max-width: 400px;
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    padding: 12px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: box-shadow 0.2s, border-color 0.2s;
    -webkit-appearance: none; /* Removes default styling on iOS */
}

.search-input:focus {
    border-color: var(--clr-primary-light);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.btn-filter {
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-filter.active {
    background-color: var(--clr-primary);
    color: white;
    border-color: var(--clr-primary);
}

.btn-filter:not(.active):hover {
    background-color: #f1f5f9;
    color: var(--clr-text);
}

/* List layout for Game Directory */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 300px; /* Prevent layout shift during load */
}

.game-card {
    background-color: var(--clr-bg-alt);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid var(--clr-border);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    will-change: transform, box-shadow;
    content-visibility: auto;
    contain-intrinsic-size: 80px;
}

.game-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--clr-primary-light);
}

.game-list-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.game-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f3e8ff 0%, #d8b4fe 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--clr-primary-dark);
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.8);
    flex-shrink: 0;
}

.game-icon-wrapper img {
    border-radius: 12px !important;
}

.game-list-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-title {
    font-size: 1.1rem;
    text-align: left;
    margin-bottom: 0;
    font-weight: 800;
    color: var(--clr-text);
    line-height: 1.2;
}

.game-details-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.bonus-badge {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--clr-accent);
}

.withdraw-badge {
    background-color: #f1f5f9;
    color: var(--clr-text-muted);
}

.game-list-right {
    flex-shrink: 0;
    margin-left: 16px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--clr-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(126, 34, 206, 0.2);
}

.btn-download:hover {
    background-color: var(--clr-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(126, 34, 206, 0.3);
    color: white;
}

/* Badge for NEW apps - Ultra Premium Compact */
.badge-new {
    position: absolute;
    top: -6px;
    left: -6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
    z-index: 10;
}

@media (max-width: 600px) {
    .game-card {
        padding: 10px 12px;
        gap: 8px;
        align-items: center;
    }
    
    .game-list-left {
        width: auto;
        gap: 10px;
    }
    
    .game-icon-wrapper {
        width: 42px;
        height: 42px;
        border-radius: 10px !important;
        font-size: 1rem;
    }
    .game-icon-wrapper img {
        border-radius: 10px !important;
    }
    
    .game-title {
        font-size: 1rem;
    }

    .game-details-inline {
        gap: 4px;
    }
    
    .detail-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .game-list-info {
        gap: 3px;
    }
    
    .game-list-right {
        width: auto;
        margin-left: auto;
    }
    
    .btn-download {
        width: auto;
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 0;
    grid-column: 1 / -1; /* Make it span full width inside the grid */
}

.hidden {
    display: none !important;
}

/* Footer */
.footer {
    background-color: #ffffff; /* Clean white footer */
    padding: 60px 0 24px;
    border-top: 1px solid var(--clr-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--clr-text);
    font-weight: 700;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul a {
    color: var(--clr-text-muted);
}

.footer-col ul a:hover {
    color: var(--clr-primary);
}

.footer-desc {
    color: var(--clr-text-muted);
    margin-top: 16px;
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--clr-border);
    color: var(--clr-text-muted);
    font-size: 0.875rem;
}

/* SEO Content Sections */
.content-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--clr-border);
}

.light-bg {
    background-color: var(--clr-bg);
}

.article-container {
    max-width: 900px;
}

.article-content h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    color: var(--clr-primary-dark);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.article-content h3 {
    font-size: 1.5rem;
    color: var(--clr-text);
    margin: 32px 0 16px;
}

.article-content p {
    font-size: 1.125rem;
    color: var(--clr-text-muted);
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content strong {
    color: var(--clr-text);
}

.mt-50 {
    margin-top: 50px;
}

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

.feature-card {
    background-color: var(--clr-bg-alt);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--clr-primary-light);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--clr-text);
}

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

/* Custom Ordered List */
.custom-list {
    counter-reset: custom-counter;
    list-style: none;
    margin-top: 20px;
}

.custom-list li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 16px;
    font-size: 1.125rem;
    color: var(--clr-text-muted);
}

.custom-list li::before {
    counter-increment: custom-counter;
    content: counter(custom-counter);
    position: absolute;
    left: 0;
    top: -2px;
    width: 32px;
    height: 32px;
    background-color: var(--clr-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
}

.faq-container {
    max-width: 800px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background-color: var(--clr-bg-alt);
    border: 1px solid var(--clr-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    font-size: 1.25rem;
    color: var(--clr-text);
    margin-bottom: 12px;
}

.faq-answer p {
    color: var(--clr-text-muted);
    line-height: 1.7;
}

/* App Details Hero Section */
.app-details-hero {
    padding: 60px 0 40px;
    background: linear-gradient(to bottom, #f3e8ff 0%, var(--clr-bg-alt) 100%);
    border-bottom: 1px solid var(--clr-border);
}

.app-hero-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: var(--clr-bg-alt);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--clr-border);
}

.app-hero-icon {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f3e8ff 0%, #d8b4fe 100%);
    border-radius: 40px; /* Squircle style */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: 800;
    color: var(--clr-primary-dark);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.app-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 40px;
}

.app-hero-info {
    flex-grow: 1;
}

.app-hero-info h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--clr-text);
    margin-bottom: 4px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -1px;
}

.app-publisher {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
    margin-bottom: 24px;
    font-weight: 600;
}

.app-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--clr-text);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.text-green {
    color: var(--clr-accent) !important;
}

.app-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 400px;
}

.btn-download-huge {
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-hover));
    color: white;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-download-huge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-telegram-link {
    text-align: center;
    color: #0088cc;
    font-weight: 700;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        height: 60px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Ultra Premium Glass slide-down mobile menu */
    .nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 0;
        border-bottom: 1px solid rgba(126, 34, 206, 0.1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 999;
    }
    
    .nav.menu-open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 10px 0 20px;
    }
    
    .nav-list li {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }
    
    .nav-list a {
        display: block;
        padding: 18px 24px;
        font-size: 1.1rem;
        font-weight: 700;
        transition: background-color 0.2s, padding-left 0.3s ease;
    }
    
    .nav-list a:hover {
        background-color: rgba(126, 34, 206, 0.05);
        padding-left: 32px; /* Smooth indent on hover/tap */
        color: var(--clr-primary);
    }
    
    .btn-telegram {
        margin: 16px 24px;
        border-radius: 50px !important;
        box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3) !important;
        text-align: center;
        width: calc(100% - 48px) !important;
    }
    
    .hero {
        padding: 60px 0 40px;
    }
    
    .controls-bar {
        flex-direction: column;
        align-items: stretch;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .search-input {
        max-width: 100%;
    }
    
    .filter-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    .btn-filter {
        text-align: center;
    }
    
    .app-hero-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 24px;
    }
    
    .app-hero-icon {
        width: 140px;
        height: 140px;
        border-radius: 30px;
        font-size: 3.5rem;
    }
    
    .app-hero-icon img {
        border-radius: 30px;
    }
    
    .app-stats {
        justify-content: center;
        gap: 20px;
    }
    
    .app-hero-actions {
        max-width: 100%;
        width: 100%;
    }
    
    /* Footer Mobile Fixes */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-col {
        grid-column: span 1 !important;
    }
    
    .footer-col ul {
        align-items: center;
    }
    
    .footer-col .logo-footer {
        justify-content: center;
    }
}
