/* CSS Variables for Color Scheme */
:root {
    /* Primary Colors - Matching Game Background */
    --primary-bg: #F5E9D4;
    --primary-light: #FAF6F0;
    --primary-dark: #E8D4B8;
    
    /* Soft Color Palette - Seniors Friendly */
    --soft-pink: #FFB3C1;
    --soft-blue: #A8DADC;
    --soft-green: #B8E6B8;
    --soft-yellow: #FFE66D;
    --soft-purple: #DDA0DD;
    --soft-orange: #FFB347;
    
    /* Text Colors */
    --text-primary: #2C3E50;
    --text-secondary: #5D6D7E;
    --text-light: #85929E;
    --text-white: #FFFFFF;
    
    /* Game Colors - Subtle versions */
    --game-pink: #FFB3D9;
    --game-blue: #7DD3D3;
    --game-yellow: #FFF2CC;
    --game-green: #C8E6C9;
    --game-purple: #E1BEE7;
    
    /* UI Elements */
    --border-light: #E8E8E8;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-size-xs: 14px;
    --font-size-sm: 16px;
    --font-size-base: 18px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-2xl: 28px;
    --font-size-3xl: 32px;
    --font-size-4xl: 36px;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--primary-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-3xl);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

h3 {
    font-size: var(--font-size-xl);
    color: var(--text-primary);
}

h4 {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--soft-pink);
}

/* Header Styles */
.header {
    background-color: var(--primary-light);
    box-shadow: 0 2px 10px var(--shadow-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav {
    padding: var(--spacing-md) 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--soft-pink);
}

.logo-icon {
    width: 40px;
    height: 40px;
    margin-right: var(--spacing-sm);
    border-radius: var(--radius-md);
    object-fit: cover;
}

.logo i {
    margin-right: var(--spacing-sm);
    font-size: var(--font-size-2xl);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-menu a {
    font-weight: 500;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--soft-pink);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    min-height: 100vh;
    margin-top: 80px;
}

.hero-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 18px;
    display: block;
}

.hero-content {
    flex: 1;
    padding-right: var(--spacing-xl);
    padding-left: var(--spacing-lg);
}

.hero h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    line-height: 1.2;
}

.hero p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--font-size-lg);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--soft-pink);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--game-pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.btn-secondary {
    background-color: var(--text-white);
    color: var(--text-primary);
    border: 2px solid var(--soft-pink);
}

.btn-secondary:hover {
    background-color: var(--soft-pink);
    color: var(--text-white);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-xl);
}

.phone-mockup {
    width: 280px;
    height: 560px;
    position: relative;
    margin: 0 auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
    border-radius: 18px;
    border-width: 2px;
    overflow: hidden;
}

.phone-mockup:hover {
    transform: translateY(-5px);
}

.phone-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    border-radius: 18px;
    overflow: hidden;
}

.phone-screen {
    position: absolute;
    width: 97%;
    height: 97%;
    top: 1.5%;
    left: 1.5%;
    background-color: #000;
    border-radius: 36px;
    overflow: hidden;
    z-index: 1;
}

/* Screenshots Section */
.screenshots {
    padding: var(--spacing-3xl) 0;
    background-color: var(--text-white);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.screenshot-item {
    text-align: center;
    transition: transform var(--transition-normal);
}

.screenshot-item:hover {
    transform: translateY(-5px);
}

.screenshot-frame {
    background-color: var(--primary-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: 0 8px 25px var(--shadow-light);
    margin-bottom: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.screenshot-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 179, 193, 0.1) 100%);
    pointer-events: none;
}

.screenshot-frame img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.screenshot-item:hover .screenshot-frame img {
    transform: scale(1.02);
}

.screenshot-item p {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-size: var(--font-size-lg);
}

.game-preview {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
}

.number-cell {
    width: 60px;
    height: 60px;
    background-color: var(--game-blue);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xl);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.number-cell:hover {
    transform: scale(1.05);
    background-color: var(--soft-blue);
}

/* Features Section */
.features {
    padding: var(--spacing-3xl) 0;
    background-color: var(--text-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.feature-card {
    background-color: var(--primary-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--soft-pink);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: var(--soft-pink);
    color: var(--text-white);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto var(--spacing-lg);
    font-size: var(--font-size-2xl);
}

.feature-card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How to Play Section */
.how-to-play {
    padding: var(--spacing-3xl) 0;
    background-color: var(--primary-bg);
}

.steps {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    background-color: var(--text-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--soft-blue);
    color: var(--text-white);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
}

.step-content h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Benefits Section */
.benefits {
    padding: var(--spacing-3xl) 0;
    background-color: var(--text-white);
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    margin-top: var(--spacing-2xl);
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.benefit-item i {
    color: var(--soft-green);
    font-size: var(--font-size-xl);
    margin-top: var(--spacing-xs);
}

.benefit-item h4 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.benefit-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.benefits-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brain-icon {
    width: 200px;
    height: 200px;
    background-color: var(--soft-purple);
    color: var(--text-white);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--font-size-4xl);
}

/* Download Section */
.download {
    padding: var(--spacing-3xl) 0;
    background-color: var(--primary-bg);
    text-align: center;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin: var(--spacing-2xl) 0;
    flex-wrap: wrap;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background-color: var(--text-primary);
    color: var(--text-white);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-lg);
    font-weight: 600;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.download-btn:hover {
    background-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.download-btn i {
    font-size: var(--font-size-2xl);
}

.download-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.download-text span {
    font-size: var(--font-size-sm);
    font-weight: 400;
}

.download-text strong {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.download-info {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
}

.info-item i {
    color: var(--soft-green);
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: var(--text-white);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--text-white);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-section ul li a {
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--soft-pink);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--soft-pink);
    margin-bottom: var(--spacing-md);
}

.footer-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--soft-pink);
    color: var(--text-white);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--game-pink);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--text-secondary);
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-light);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: var(--spacing-lg) 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: var(--spacing-md) 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: var(--spacing-xl);
    }
    
    .hero h1 {
        font-size: var(--font-size-3xl);
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .phone-mockup {
        width: 240px;
        height: 420px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-lg);
    }
    
    @media (max-width: 600px) {
        .screenshots-grid {
            grid-template-columns: 1fr;
            gap: var(--spacing-lg);
        }
        
        .screenshot-frame {
            max-width: 300px;
            margin: 0 auto var(--spacing-md);
        }
    }
    
    .steps {
        flex-direction: column;
    }
    
    .benefits-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .benefits-list {
        order: 2;
    }
    
    .benefits-image {
        order: 1;
        margin-bottom: var(--spacing-xl);
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .download-info {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero h1 {
        font-size: var(--font-size-2xl);
    }
    
    .hero p {
        font-size: var(--font-size-base);
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    .phone-mockup {
        width: 180px;
        height: 320px;
    }
    
    .number-cell {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .step {
        padding: var(--spacing-lg);
    }
    
    .brain-icon {
        width: 150px;
        height: 150px;
        font-size: var(--font-size-3xl);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid var(--soft-pink);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.5);
    }
    
    .feature-card:hover {
        border-color: var(--text-primary);
        box-shadow: 0 10px 30px var(--shadow-medium);
    }
}

/* Large text support */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Print styles */
@media print {
    .header,
    .hero-image,
    .download-buttons,
    .social-links {
        display: none;
    }
    
    body {
        background-color: var(--text-white);
        color: var(--text-primary);
    }
    
    .features,
    .how-to-play,
    .benefits,
    .download {
        background-color: var(--text-white);
    }
}