:root {
    --bg-color: #f8fafc;
    --surface-color: rgba(255, 255, 255, 0.85);
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --accent-soft: rgba(37, 99, 235, 0.08);
    --container-width: 1200px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

/* Header & Nav */
header {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.logo-text span {
    color: var(--text-main);
    opacity: 0.9;
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 180px 0 120px;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.03), transparent);
    overflow: hidden;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.25rem, 10vw, 4.5rem);
    /* Fluid typography */
    color: var(--text-main);
    line-height: 1;
    /* Tighter for large headings */
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: -0.04em;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3);
}

.btn.secondary {
    background: var(--bg-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn.secondary:hover {
    background: var(--surface-color);
    transform: translateY(-3px);
}

.hero-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.glow-orb {
    position: absolute;
    top: -200px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* Section Common */
section {
    padding: 80px 0;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 6vw, 2.75rem);
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
}

/* Games Section & Cards */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.game-card {
    background: var(--surface-color);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.game-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Perfect for landscape, still works for portraits with cover */
    background: #000;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.game-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.game-card:hover .game-img img {
    transform: scale(1.05);
}

.game-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-info h3 {
    font-size: 1.5rem;
    margin: 0.5rem 0 1rem;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.game-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}


.game-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Google Play Badge Styling */
.play-store-badge {
    display: inline-block;
    max-width: 140px;
    /* Reduced overall max width */
    transition: transform 0.3s ease;
}

.play-store-badge img {
    width: 100%;
    height: auto;
    display: block;
}

.play-store-badge:hover {
    transform: scale(1.05);
}

@media (max-width: 480px) {
    .play-store-badge {
        max-width: 120px;
        /* Even smaller for mobile */
    }
}


/* About Section */
.flex-row {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.about-content {
    flex: 1;
}

.about-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.stats li {
    display: flex;
    flex-direction: column;
}

.stats strong {
    font-size: 2rem;
    font-family: 'Outfit';
    color: var(--primary-color);
}

.stats span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.about-visual {
    flex: 1;
}

.placeholder-img.large {
    height: 350px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

/* Contact Section */
.contact-section {
    background: #f8fafc;
}

.contact-card {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 16px;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

input,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.full-width {
    width: 100%;
}

/* Footer */
footer {
    padding: 60px 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-socials a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0.75rem auto 0;
    line-height: 1.4;
    opacity: 0.8;
}


/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

.hero-btns {
    animation-delay: 0.4s;
}

.hero p {
    animation-delay: 0.2s;
}

/* Responsive */
@media (max-width: 968px) {
    .flex-row {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s;
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
        display: flex !important;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hero {
        text-align: center;
        padding: 60px 0;
    }

    .hero-content {
        margin: 0 auto;
    }

    .btn.secondary {
        margin: 1rem 0 0 0;
        display: block;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-card {
        padding: 2rem;
    }
}

.menu-btn {
    display: none;
    cursor: pointer;
}

.menu-btn .bar {
    width: 25px;
    height: 2px;
    background: var(--text-main);
    margin: 5px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
        z-index: 1001;
    }

    .menu-btn.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-btn.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* Legal Pages Layout */
.legal-page {
    background: #fcfcfc;
}

.legal-header {
    background: #ffffff;
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.legal-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.legal-header .last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.legal-content {
    max-width: 800px;
    margin: 40px auto 100px;
    padding: 0 1.5rem;
    color: var(--text-main);
    line-height: 1.8;
}

.legal-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-main);
}

.legal-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-main);
}

.legal-content p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.legal-content ul,
.legal-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    /* Force break long URLs */
}

.legal-content a:hover {
    text-decoration: underline;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-home:hover {
    color: var(--primary-color);
}

/* Footer link improvements */
.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}


.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Game Screenshot Gallery */
.gallery-section {
    padding: 100px 0;
    background: #f8fafc;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.screenshot-item {
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    aspect-ratio: 16 / 9;
}

.screenshot-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: #ffffff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    padding: 2.5rem;
    background: var(--bg-color);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.05);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 4rem 2rem;
    background: var(--text-main);
    border-radius: 30px;
    margin-top: 4rem;
    color: #fff;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 2.5rem;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.game-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.stat-card {
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
}

.stat-card strong {
    display: block;
    font-size: 1.85rem;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-card span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.3;
}


/* Game Page Refinements */
.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent-soft);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.text-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    /* Fluid topography */
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 1.2;
    font-weight: 700;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.feature-list span.check {
    color: var(--primary-color);
    font-weight: bold;
}

.mini-game-card {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-main);
}

.mini-game-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

@media (max-width: 968px) {
    .container {
        padding: 0 1.25rem;
    }

    .hero {
        padding: 140px 0 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .game-intro-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
        text-align: center;
    }

    .text-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .feature-list li {
        justify-content: center;
    }

    .stats-bar {
        padding: 3rem 1.5rem;
        gap: 1.5rem;
    }

    .stat-item strong {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .legal-header {
        padding: 120px 0 60px;
        /* Increased top padding to clear fixed header */
    }

    .legal-header h1 {
        font-size: 2.25rem;
    }

    .legal-content {
        margin: 30px auto 60px;
    }
}

@media (max-width: 576px) {
    header {
        padding: 1rem 0;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .hero {
        padding: 120px 0 50px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    .screenshot-grid {
        grid-template-columns: 1fr !important;
    }

    .games-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
        display: grid;
    }

    .stat-item {
        margin-bottom: 1rem;
    }

    .stat-cards-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }
    
    .stat-card {
        padding: 1.25rem 0.75rem;
    }

    .stat-card strong {
        font-size: 1.6rem;
    }

    .stat-card span {
        font-size: 0.8rem;
    }

    .legal-header h1 {
        font-size: 1.8rem;
    }

    .legal-content h2 {
        font-size: 1.5rem;
    }

    .legal-content {
        line-height: 1.6;
    }

    .legal-header {
        padding: 100px 0 40px;
        /* Ensure mobile header clear */
    }

    .nav-links a {
        font-size: 1.5rem !important;
        /* Ensure menu items are large on mobile */
    }
}

/* Lightbox System */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2010;
}

.lightbox-close:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    z-index: 2010;
}

.lightbox-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .lightbox-prev { left: 15px; }
    .lightbox-next { right: 15px; }
}

.screenshot-item {
    cursor: zoom-in;
}

/* Scroll Lock */
body.modal-open {
    overflow: hidden;
}