/* =========================================
   1. THEME VARIABLES (Light & Dark)
   ========================================= */
:root {
    /* --- Core Brand Colors --- */
    --primary: #6C63FF;
    --accent: #FF6584;
    --gradient: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);

    /* --- Light Mode (Default) --- */
    --bg-body: #F4F6F8;
    --bg-nav: rgba(255, 255, 255, 0.75);
    /* Slightly transparent for blur */
    --bg-card: #ffffff;
    --bg-section-alt: #f9f9ff;
    /* Light bluish gray for Features section */

    --text-main: #2D2D3A;
    --text-muted: #666666;

    --border: #eeeeee;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.05);

    --phone-border: #2D2D3A;
}

/* --- Dark Mode Override --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #121212;
        --bg-nav: rgba(18, 18, 18, 0.75);
        --bg-card: #1E1E1E;
        --bg-section-alt: #181818;
        /* Slightly lighter dark for contrast */

        --text-main: #ffffff;
        --text-muted: #aaaaaa;

        --border: #333333;
        --shadow: 0 5px 20px rgba(0, 0, 0, 0.3);

        --phone-border: #333;
        /* Lighter border so phone is visible in dark mode */
    }
}

/* =========================================
   2. GLOBAL RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
nav {
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Safari support */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

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

/* Logo Brand */
.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    height: 45px;
    width: auto;
    border-radius: 8px;
    /* Slight curve looks better than 30px usually */
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
    /* Fallback */
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
    transition: color 0.3s;
}

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

.small-btn {
    display: none;
}

@media(min-width: 768px) {
    .small-btn {
        display: inline-block;
    }
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    padding: 4rem 0;
    background: var(--bg-body);
    /* Adaptive background */
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient);
    opacity: 0.1;
    border-radius: 50%;
    z-index: 0;
}

.hero-container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 3rem;
    z-index: 1;
}

@media(min-width: 900px) {
    .hero-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .hero-text {
        text-align: left;
    }

    .hero p {
        margin-left: 0;
    }
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    background: rgba(108, 99, 255, 0.15);
    /* Transparent violet works on dark/light */
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Store Button */
.store-btn {
    display: inline-flex;
    align-items: center;
    background: var(--text-main);
    /* Adaptive: Black in light, White in dark */
    color: var(--bg-body);
    /* Text color swaps too */
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.store-btn i {
    font-size: 1.8rem;
    margin-right: 10px;
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.store-text span {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.store-text strong {
    font-size: 1.2rem;
}

/* Phone Mockup */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    /* Responsive sizing logic */
    width: 640px;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    /* Maintains shape on all screens */
    height: auto;

    background: black;
    border: 10px solid var(--phone-border);
    border-left-width: 20px;
    border-right-width: 20px;

    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(108, 99, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.phone-mockup iframe,
.phone-mockup img {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* =========================================
   5. FEATURES SECTION
   ========================================= */
.features {
    padding: 5rem 0;
    background: var(--bg-section-alt);
    /* Swaps color based on theme */
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.section-title p {
    color: var(--text-muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

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

/* =========================================
   6. SHOWCASE & PORTFOLIO
   ========================================= */
.showcase,
.portfolio {
    padding: 4rem 0;
    background: var(--bg-body);
}

.screenshot-scroller {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 2rem;
}

.shot {
    min-width: 300px;
    height: 170px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

@media(min-width: 768px) {
    .shot {
        min-width: 450px;
        height: 250px;
    }
}

.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.game-card {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.game-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.game-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-body);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1.5rem;
    font-size: 2rem;
    color: var(--primary);
    flex-shrink: 0;
    overflow: hidden;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.rating {
    font-size: 0.9rem;
    color: #f1c40f;
    margin-bottom: 0.5rem;
}

.desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-secondary {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

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

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    background: #111;
    /* Footer usually stays dark even in light mode */
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: white;
}

.socials {
    margin: 1.5rem 0;
}

.socials a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: opacity 0.3s;
}

.socials a:hover {
    opacity: 0.7;
}


/* =========================================
   9. SUPPORT / CONTACT SECTION
   ========================================= */
.contact {
    padding: 5rem 0;
    background: var(--bg-section-alt);
    /* Light gray in light mode, Darker in dark mode */
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

/* --- Left Side: Info Items --- */
.contact-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.info-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-circle {
    width: 50px;
    height: 50px;
    background: rgba(108, 99, 255, 0.1);
    /* Light Violet */
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.info-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.info-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.info-text a {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- Right Side: Contact Form --- */
.contact-form {
    flex: 1.5;
    min-width: 300px;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-main);
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Form Inputs Styling */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    background: var(--bg-body);
    /* Inputs slightly darker than card */
    color: var(--text-main);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.contact-form textarea {
    resize: vertical;
    /* User can resize height only */
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
}

/* Button override for form */
.form-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem;
}
/* =========================================
   10. BLOG / TUTORIALS PAGE STYLES
   ========================================= */

/* Header specifically for Blog */
.blog-header {
    background: var(--bg-body);
    padding: 3rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.blog-header h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

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

/* Blog Content Container */
.blog-section {
    padding: 3rem 0;
    background: var(--bg-section-alt);
}

.blog-container {
    max-width: 800px; /* Narrower width makes reading easier */
    margin: 0 auto;
}

/* Individual Post Styling */
.blog-post {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.post-image {
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Typography for Articles */
.post-content h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-content h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p {
    font-size: 1.05rem;
    line-height: 1.8; /* More spacing between lines for reading */
    color: var(--text-main); /* Using main text color for readability */
    opacity: 0.9;
    margin-bottom: 1.2rem;
}

.post-content ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}


/* =========================================
   8. MOBILE RESPONSIVE FIXES
   ========================================= */
@media(max-width: 768px) {

    /* Navigation: Stack logo and links vertically */
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
        font-size: 0.9rem;
        justify-content: center;
    }

    /* Hero Text Size */
    .hero h1 {
        font-size: 2rem;
    }

    /* Phone Mockup Borders Thinner on Mobile */
    .phone-mockup {
        width: 100%;
        border-width: 8px;
        border-left-width: 15px;
        border-right-width: 15px;
    }

    .hero-image {
        width: 100%;
    }

    /* Center the Game cards content */
    .game-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .game-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    /* Center hero button */
    .hero-buttons {
        display: flex;
        justify-content: center;
    }

    .input-group {
        flex-direction: column;
        gap: 0;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .hero {
        padding: 2rem 0;
        min-height: auto;
    }

    .blog-post {
        padding: 1.5rem;
    }
    .post-content h2 {
        font-size: 1.6rem;
    }
}

