:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --text-color: #2C3E50;
    --light-bg: #F7F9FC;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, #FF6B6B, #4ECDC4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9fc;
}

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

/* Navigation */
nav {
    position: fixed;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 30px;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
header {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background-color: black; /* Fallback color */
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    background-color: black; /* Ensure something shows if video fails */
}

.video-background::before {
    content: 'Video Not Loaded';
    color: white;
    position: absolute;
    z-index: 10;
    background: rgba(255,0,0,0.5);
    padding: 10px;
    display: none; /* Will show if video fails */
}

.video-background video:loaded {
    background-color: transparent;
}

.video-background video:loaded + ::before {
    display: none;
}

.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FF6B6B;
    color: white;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    text-align: center;
    z-index: 10;
}

.video-background video:error + .video-fallback {
    display: flex;
}

.hero {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
    color: white;
    text-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: #ffffff;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

.feature i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
}

.about-text {
    flex: 1;
    padding-right: 50px;
}

.about-text p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-features {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.about-features .feature {
    flex: 1;
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

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

.about-features .feature i {
    font-size: 48px;
    color: #FF8C00;
    margin-bottom: 20px;
}

.about-features .feature h3 {
    color: #333;
    margin-bottom: 15px;
}

.about-features .feature p {
    color: #666;
}

/* Upcoming Games Section */
.upcoming-games-section {
    background: #ffffff;
    padding: 80px 0;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.experience-card {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
}

.card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
}

.experience-card:hover .card-image {
    transform: scale(1.1);
}

.card-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #0f3460;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-link:hover {
    background-color: #16213e;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* How It Works Section */
.how-it-works-section {
    background: #f9f9fc;
    padding: 100px 0;
    box-shadow: inset 0 10px 20px -15px rgba(0,0,0,0.05);
    border-top: 1px solid #f0f0f5;
    border-bottom: 1px solid #f0f0f5;
}

.section-subtitle {
    text-align: center;
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 50px;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 140, 0, 0.1), rgba(255, 140, 0, 0.3), rgba(255, 140, 0, 0.1));
    z-index: 1;
}

.step {
    flex: 1;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(78, 205, 196, 0.1);
    position: relative;
    z-index: 2;
    min-height: 350px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF8C00, #FFA500);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
    position: relative;
    z-index: 3;
    border: 3px solid white;
}

.step h3 {
    margin-bottom: 15px;
    color: #2C3E50;
    min-height: 60px;
}

.step p {
    color: #666;
    margin-bottom: 20px;
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Sign Up Section */
.sign-up-section {
    background: #f9f9fc;
    padding: 80px 0;
}

.sign-up-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.sign-up-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.sign-up-section .section-header h2 {
    color: #333;
    font-size: 36px;
    margin-bottom: 15px;
}

.sign-up-section .section-header p {
    font-size: 28px;
    color: #666;
    line-height: 1.5;
    max-width: 700px;
    margin: 20px auto;
    text-align: center;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.interest-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 140, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    min-height: 100px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF6B6B;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FF8C00, #FFA500);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(255, 140, 0, 0.4);
}

@media (max-width: 768px) {
    .interest-form {
        padding: 30px 20px;
    }

    .submit-btn {
        font-size: 16px;
        padding: 12px;
    }
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: var(--light-bg);
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: var(--white);
}

.submit-button {
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-3px);
}

/* Footer */
footer {
    background: var(--text-color);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    color: var(--white);
    font-size: 20px;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Section Headers Styling */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #FF8C00, #FFA500);
    border-radius: 2px;
}

.section-header p {
    font-size: 24px;
    color: #666;
    line-height: 1.5;
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Specific Section Adjustments */
.about-section,
.upcoming-games-section,
.how-it-works-section,
.sign-up-section,
.contact-section {
    text-align: center;
    padding: 80px 0;
}

.about-section h2,
.upcoming-games-section h2,
.how-it-works-section h2,
.sign-up-section h2,
.contact-section h2 {
    font-size: 42px;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.about-section h2::after,
.upcoming-games-section h2::after,
.how-it-works-section h2::after,
.sign-up-section h2::after,
.contact-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #FF8C00, #FFA500);
    border-radius: 2px;
}

/* Experience the Magic Section */
.experience-magic-section {
    padding: 0;
    margin: 60px 0;
}

.magic-image-overlay {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    cursor: pointer;
}

.magic-image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.magic-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: all 0.4s ease;
    color: white;
    text-align: center;
}

.magic-image-overlay:hover .magic-text-overlay {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.6);
}

.magic-image-overlay:hover img {
    transform: scale(1.1);
}

.magic-text-overlay h3 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #FFD700;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.magic-text-overlay p {
    font-size: 20px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.magic-text-overlay .cta-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: #FF8C00;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.magic-image-overlay:hover .magic-text-overlay h3,
.magic-image-overlay:hover .magic-text-overlay p,
.magic-image-overlay:hover .magic-text-overlay .cta-button {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 992px) {
    .magic-image-overlay {
        height: 400px;
    }

    .magic-text-overlay h3 {
        font-size: 36px;
    }

    .magic-text-overlay p {
        font-size: 16px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    /* General Responsive Adjustments */
    .container {
        padding: 0 5%;
    }

    /* Navigation Responsive */
    .nav-container {
        padding: 15px 5%;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    /* Header Responsive */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Experience Grid Responsive */
    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Demo Game Section Responsive */
    .moving-images-container {
        width: 100%;
    }

    .moving-image {
        width: 350px;
        height: 250px;
    }

    .demo-game-content {
        width: 95%;
        padding: 1.5rem;
    }

    .demo-game-content h2 {
        font-size: 2.3rem;
    }

    .demo-game-description {
        font-size: 1rem;
    }
}

@media screen and (max-width: 768px) {
    /* More Mobile-Specific Adjustments */
    .nav-links {
        flex-direction: column;
        align-items: center;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .experience-grid {
        grid-template-columns: 1fr;
    }

    .moving-images-container {
        gap: 30px;
    }

    .moving-image {
        width: 300px;
        height: 200px;
    }

    .demo-game-content {
        width: 100%;
        padding: 1rem;
    }

    .demo-game-content h2 {
        font-size: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .moving-image {
        width: 250px;
        height: 170px;
    }

    .demo-game-content h2 {
        font-size: 1.7rem;
    }
}

/* Ensure Proper Viewport Scaling */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    min-width: 320px;
    overflow-x: hidden;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* Responsive Design */
@media (max-width: 992px) {
    .steps-container {
        flex-direction: column;
        align-items: center;
    }
    
    .step {
        margin: 15px 0;
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .experience-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Container */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
}

.form-container iframe {
    border-radius: 8px;
    max-width: 100%;
}

/* Demo Game Section */
.demo-game-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 2rem 0;
}

.moving-images-container {
    width: 100%;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.moving-images-top,
.moving-images-bottom {
    display: flex;
    width: 300%;
    animation: moveImages 20s linear infinite;
}

.moving-images-bottom {
    animation-direction: reverse;
}

@keyframes moveImages {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-66.666%);
    }
}

.image-track {
    display: flex;
    gap: 30px;
}

.moving-image {
    width: 450px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
    filter: brightness(0.9);
}

.moving-image:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    filter: brightness(1);
}

.demo-game-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
    max-width: 800px;
    width: 88%;
    margin: 1.8rem 0;
    z-index: 10;
    position: relative;
}

.demo-game-content h2 {
    font-size: 2.6rem;
    color: #0f3460;
    margin-bottom: 1.2rem;
    letter-spacing: -1px;
}

.demo-game-description {
    font-size: 1.15rem;
    color: #333;
    line-height: 1.65;
    max-width: 650px;
    margin: 0 auto;
}
