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

:root {
    --oxford-blue: #0F172A;
    --bright-orange: #FF7507;
    --emerald-green: #00D690;
    --vivid-purple: #A700F1;
    --pale-grey: #F7F9FC;
    --white: #FFFFFF;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--oxford-blue);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(to bottom, #0F172A, rgba(247, 249, 252, 0.1));
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Monument Extended', 'Inter', Arial, sans-serif;
    font-weight: 600;
    color: var(--white);
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, var(--oxford-blue), rgba(247, 249, 252, 0.1));
    color: var(--white);
    padding: 100px 20px;
    text-align: center;
    width: 100%;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/images/grocery_store.jpg');
    background-size: cover;
    background-position: bottom;
    opacity: 0.2;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
}

.headline {
    font-family: 'Monument Extended', 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 48px;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.subheadline {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 10;
}

.cta-button {
    display: inline-block;
    background: var(--bright-orange);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 8px;
    font-family: 'Monument Extended', 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 200px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 117, 7, 0.3);
}

.pulse {
    animation: pulse 2s infinite;
}

/* Game Story Instructions */
.game-story-instructions {
    background: var(--pale-grey);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--bright-orange);
    margin: 20px auto 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.story-text {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    color: var(--oxford-blue);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

.story-text:hover {
    color: var(--bright-orange);
}

.explanation-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.explanation-line {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    color: var(--oxford-blue);
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explanation-line:hover {
    color: var(--bright-orange);
}

.emoji {
    color: var(--bright-orange);
    font-size: 24px;
    margin-right: 10px;
    display: inline-block;
}

.story-text .emoji {
    margin: 0 3px;
}

/* Animated Game Assets */
.animated-game-assets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.floating-character {
    position: absolute;
    width: 60px;
    height: 60px;
    animation: float 3s infinite ease-in-out;
    z-index: 2;
}

.character-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.character-2 {
    top: 30%;
    right: 15%;
    animation-delay: 0.5s;
}

.character-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 1s;
}

.floating-emoji {
    position: absolute;
    font-size: 48px;
    color: var(--bright-orange);
    animation: fadeFloat 4s infinite ease-in-out;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 3;
}

.emoji-1 {
    top: 25%;
    right: 25%;
    animation-delay: 0.3s;
}

.emoji-2 {
    bottom: 30%;
    right: 10%;
    animation-delay: 1.5s;
}

.floating-payment {
    position: absolute;
    width: 50px;
    height: 50px;
    animation: rotateFloat 5s infinite linear;
    z-index: 1;
}

.payment-1 {
    top: 40%;
    left: 15%;
    animation-delay: 0.2s;
}

.payment-2 {
    top: 20%;
    left: 30%;
    animation-delay: 1.2s;
}

.payment-3 {
    bottom: 25%;
    right: 20%;
    animation-delay: 0.7s;
}

/* Game Section */
.game-section {
    padding: 20px;
    width: 100%;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, var(--oxford-blue), rgba(15, 23, 42, 0.9));
    position: relative;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    height: 85vh; /* Almost full screen height */
    margin: 0 auto;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

/* Fullscreen Styles */
.fullscreen-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px; /* Slightly larger for mobile tap targets */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    touch-action: manipulation; /* Optimize for touch */
}

/* Add specific mobile styles */
@media (max-width: 768px) {
    .fullscreen-button {
        width: 50px; /* Even larger on mobile */
        height: 50px;
        top: 15px;
        right: 15px;
        background: rgba(15, 23, 42, 0.8); /* Darker background for better visibility */
    }
    
    .expand-icon, .compress-icon {
        font-size: 24px; /* Larger icon */
    }
}

.fullscreen-button:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: scale(1.1);
}

.fullscreen-button:active {
    transform: scale(0.95);
}

.expand-icon, .compress-icon {
    transition: all 0.3s ease;
}

.hidden {
    display: none;
}

.game-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    z-index: 1000;
}

.game-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.game-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Fullscreen recommendation */
.fullscreen-recommendation {
    text-align: right;
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    padding-right: 50px;
    opacity: 0.9;
}

.down-arrow {
    font-size: 18px;
    margin-left: 5px;
    display: inline-block;
    animation: bounceDown 1.5s infinite;
}

/* Scroll indicators */
.scroll-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 24px;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: pulseIndicator 1.5s infinite alternate;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.scroll-down {
    bottom: -20px;
}

/* Educational Section */
.educational-section {
    background: linear-gradient(135deg, var(--oxford-blue), rgba(15, 23, 42, 0.8));
    padding: 60px 20px;
    text-align: center;
    position: relative;
}

.section-headline {
    font-size: 28px;
    color: var(--white);
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.edu-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.edu-item {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.edu-item h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--bright-orange);
    position: relative;
}

.edu-item h3::before {
    content: "•";
    color: var(--bright-orange);
    position: absolute;
    left: -20px;
    top: 0;
    font-size: 20px;
}

.edu-item p {
    font-size: 16px;
    color: var(--white);
}

.savings-highlight {
    margin-top: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--bright-orange);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), var(--oxford-blue));
    padding: 60px 20px;
    text-align: center;
    position: relative;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.cta-description {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--white);
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
}

.form-group input,
.form-group select {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
}

.form-group input::placeholder,
.form-group select::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--bright-orange);
    box-shadow: 0 0 0 2px rgba(255, 117, 7, 0.2);
}

/* Footer */
.footer {
    background: var(--oxford-blue);
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    position: relative;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.logo-container {
    margin-bottom: 20px;
}

.footer-logo {
    width: 300px;
    max-width: 100%;
}

.footer-text {
    font-size: 16px;
    font-weight: 500;
}

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

.footer-text a:hover {
    color: var(--emerald-green);
    text-decoration: underline;
}

/* Space-like Background Elements */
.space-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.star {
    position: absolute;
    background-color: var(--white);
    border-radius: 50%;
    opacity: 0.5;
    animation: twinkle 2s infinite alternate;
}

.star-small {
    width: 1px;
    height: 1px;
}

.star-medium {
    width: 2px;
    height: 2px;
}

.star-large {
    width: 3px;
    height: 3px;
}

/* Animations */
@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(255, 117, 7, 0.7);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 10px rgba(255, 117, 7, 0);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(255, 117, 7, 0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes fadeFloat {
    0%, 100% { opacity: 0.7; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-20px); }
}

@keyframes rotateFloat {
    0% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(15deg) translateY(-25px); }
    100% { transform: rotate(0deg) translateY(0); }
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@keyframes pulseIndicator {
    from { opacity: 0.6; transform: translateX(-50%) scale(0.95); }
    to { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

@keyframes twinkle {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 767px) {
    /* Small screens */
    .hero {
        padding: 60px 15px;
        min-height: 400px;
    }
    
    .hero-content {
        width: 100%;
    }
    
    .headline {
        font-size: 32px;
    }

    .subheadline {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    /* Small screen game story instructions */
    .game-story-instructions {
        width: 100%;
        padding: 10px;
    }
    
    .story-text {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .explanation-lines {
        gap: 8px;
    }
    
    .explanation-line {
        font-size: 12px;
    }
    
    .emoji {
        font-size: 18px;
    }
    
    .story-text .emoji {
        font-size: 18px;
    }

    .section-headline {
        font-size: 20px;
    }

    .floating-character {
        width: 40px;
        height: 40px;
    }

    .floating-emoji {
        font-size: 32px;
    }

    .floating-payment {
        width: 35px;
        height: 35px;
    }

    .edu-content {
        flex-direction: column;
        gap: 15px;
    }

    .cta-button {
        width: 150px;
        height: 50px;
        font-size: 14px;
    }

    .game-container {
        height: 75vh;
    }

    .footer-logo {
        width: 200px;
    }

    .footer-text {
        font-size: 14px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Medium screens */
    .hero {
        padding: 80px 20px;
        min-height: 450px;
    }
    
    .hero-content {
        width: 90%;
    }
    
    .headline {
        font-size: 36px;
    }

    .subheadline {
        font-size: 16px;
    }
    
    /* Medium screen game story instructions */
    .game-story-instructions {
        width: 90%;
        padding: 15px;
    }
    
    .story-text {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .explanation-lines {
        gap: 8px;
    }
    
    .explanation-line {
        font-size: 14px;
    }
    
    .emoji {
        font-size: 20px;
    }
    
    .story-text .emoji {
        font-size: 20px;
    }

    .floating-character {
        width: 50px;
        height: 50px;
    }

    .floating-emoji {
        font-size: 40px;
    }

    .floating-payment {
        width: 40px;
        height: 40px;
    }

    .edu-content {
        gap: 20px;
    }

    .cta-button {
        width: 180px;
        height: 55px;
    }

    .game-container {
        height: 80vh;
    }

    .footer-logo {
        width: 250px;
    }
}

@media (min-width: 1024px) {
    /* Large screens */
    .hero {
        min-height: 500px;
    }

    .headline {
        font-size: 48px;
    }

    .subheadline {
        font-size: 18px;
    }
    
    /* Large screen game story instructions */
    .game-story-instructions {
        max-width: 800px;
        padding: 20px;
    }
    
    .story-text {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .explanation-lines {
        gap: 10px;
    }
    
    .explanation-line {
        font-size: 14px;
    }
    
    .emoji {
        font-size: 24px;
    }
    
    .story-text .emoji {
        font-size: 24px;
    }

    .floating-character {
        width: 60px;
        height: 60px;
    }

    .floating-emoji {
        font-size: 48px;
    }

    .floating-payment {
        width: 50px;
        height: 50px;
    }

    .cta-button {
        width: 200px;
        height: 60px;
    }
}
