/* =================================================================
   1. CSS VARIABLES & TOKENS
   ================================================================= */
:root {
    /* Colors */
    --primary-color: #5E57FF;
    --secondary-color: #4b55c5;
    --dark-color: #0b0b14;
    --dark-secondary: #030932;
    --text-color: #b5b9d1;
    --white: #ffffff;
    
    /* Section Backgrounds */
    --section-bg-light: #0b0c15;
    --section-bg-dark: #0a0b13;
    --card-bg: rgba(19, 20, 33, 0.8);
    --icon-bg: rgba(90, 106, 255, 0.15);
    
    /* Typography */
    --heading-font: 'Orbitron', sans-serif;
    --body-font: 'Poppins', sans-serif;
    
    /* Spacing */
    --section-padding: 6rem 0;
    --container-max-width: 1200px;
    --container-padding: 0 20px;
    
    /* Icon Styling */
    --icon-size: 70px;
    --icon-font-size: 28px;
    
    /* Shadows */
    --primary-shadow: 0 5px 15px rgba(90, 106, 255, 0.3);
    --hover-shadow: 0 8px 25px rgba(90, 106, 255, 0.5);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 10px 25px rgba(90, 106, 255, 0.15);
    
    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-transform: transform 0.3s ease;
}

/* =================================================================
   2. RESET & BASE STYLES
   ================================================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-color);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    letter-spacing: 1px;
    color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    width: 90%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

section {
    padding: var(--section-padding);
    position: relative;
    z-index: 20;
    scroll-margin-top: 80px; /* Compensate for fixed header */
}

/* =================================================================
   3. UTILITY CLASSES & COMMON COMPONENTS
   ================================================================= */

/* Section Titles */
.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--white);
    font-family: var(--heading-font);
    letter-spacing: 1px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto;
    border-radius: 2px;
}

/* Common Card Styles */
.card {
    background: var(--card-bg);
    padding: 40px 20px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--white);
    font-family: var(--heading-font);
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.card p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Common Icon Styling */
.icon {
    width: var(--icon-size);
    height: var(--icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    background: var(--icon-bg);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: var(--icon-font-size);
}

/* Section Divider */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(94, 87, 255, 0.5) 20%, rgba(94, 87, 255, 0.8) 50%, rgba(94, 87, 255, 0.5) 80%, transparent 100%);
    margin: 4rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(94, 87, 255, 0.6);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition-base);
    cursor: pointer;
    text-align: center;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--primary-shadow);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.btn-secondary {
    background: rgba(90, 106, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(90, 106, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(90, 106, 255, 0.2);
    transform: translateY(-3px);
}

.btn-with-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-with-arrow i {
    transition: var(--transition-transform);
}

.btn-with-arrow:hover i {
    transform: translateX(5px);
}

/* =================================================================
   4. HEADER & NAVIGATION
   ================================================================= */
header {
    width: 100%;
    background: var(--dark-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-icon {
    height: 40px;
    width: 40px;
    margin-right: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), 0 0 8px rgba(90, 106, 255, 0.3);
    transition: var(--transition-base);
}

.logo-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), 0 0 12px rgba(90, 106, 255, 0.4);
}

/* Navigation Links */
.nav-links ul {
    display: flex;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

/* Mobile Menu */
#close-menu, 
#open-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--white);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    margin-left: 10px;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--white);
    font-weight: 500;
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lang-current .flag {
    font-size: 1.1rem;
}

.lang-current .lang-code {
    font-size: 0.9rem;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-secondary);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-option:first-child {
    border-radius: 8px 8px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 8px 8px;
}

.lang-option .flag {
    font-size: 1.1rem;
}

.lang-option .lang-name {
    color: var(--text-color);
    font-size: 0.9rem;
    flex: 1;
}

.lang-option .checkmark {
    color: var(--primary-color);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lang-option.active .checkmark {
    opacity: 1;
}

.lang-option.active .lang-name {
    color: var(--white);
}

/* =================================================================
   5. HERO SECTION
   ================================================================= */
.hero {
    padding-top: 8rem;
    background: var(--dark-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero .container {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    position: relative;
    padding: 0;
    margin: 0;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 100%;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.main-title {
    font-size: 10vw;
    font-weight: 900;
    text-align: center;
    line-height: 1;
    letter-spacing: 0px;
    margin-bottom: 20px;
    position: relative;
    z-index: 50;
    margin-left: 0;
    text-shadow: 0 0 15px rgba(90, 106, 255, 0.6);
    max-width: 100%;
    color: rgba(255, 255, 255, 0.9);
    transform: perspective(500px) rotateX(10deg);
    transition: var(--transition-base);
}

.main-title:hover {
    transform: perspective(500px) rotateX(5deg) translateY(-5px);
}

.hero-content p {
    font-size: 3vw;
    margin-bottom: 30px;
    color: white;
    font-weight: 500;
    text-align: center;
    margin-left: 0;
    z-index: 50;
    position: relative;
}

.cta-buttons {
    display: flex;
    gap: 15px;
}

/* Sphere Container */
.sphere-container-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
    transition: left 1.2s cubic-bezier(0.77,0,0.175,1), transform 1.2s cubic-bezier(0.77,0,0.175,1);
}

.sphere-container-fixed.move-right {
    left: 50%;
    width: 50vw;
}

.sphere-container {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    pointer-events: all;
    transform: translateZ(0);
}

/* =================================================================
   6. CONTENT SECTIONS
   ================================================================= */
.content-sections {
    position: relative;
    z-index: 20;
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--dark-color) 100%);
}

/* =================================================================
   7. HOW TO PLAY SECTION
   ================================================================= */
.how-to-play {
    position: relative;
}

.gameplay-screens {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.screen-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
}

.screen-demo:nth-child(even) .screen-image {
    order: 2;
}

.screen-demo:nth-child(even) .screen-description {
    order: 1;
}

.screen-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.game-screenshot {
    max-width: 60%;
    height: auto;
    transition: var(--transition-transform);
}

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

.screen-description {
    padding: 20px 0;
}

.screen-description h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-family: var(--heading-font);
}

.screen-description p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* =================================================================
   8. FEATURES SECTION
   ================================================================= */
.features {
    padding: var(--section-padding);
}

/* =================================================================
   9. ABOUT SECTION
   ================================================================= */
.about {
    padding: var(--section-padding);
}

.about .container {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.about-content {
    flex: 1;
    padding: 20px;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 2rem;
}

.about-content .section-title::after {
    margin: 15px 0;
}

.about-content p {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    padding: 20px;
}

.about-image img {
    width: 120%;
    height: auto;
    transition: var(--transition-base);
}

.about-image img:hover {
    transform: translateY(-5px) scale(1.2);
}

/* =================================================================
   11. ACHIEVEMENTS SECTION
   ================================================================= */
.achievements {
    padding: var(--section-padding);
}

.achievement-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: var(--container-max-width);
    margin: 0 auto;
    justify-items: center;
}

/* =================================================================
   11. TEAM SECTION
   ================================================================= */
.team {
    padding: var(--section-padding);
}

.team-container {
    position: relative;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.team-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 3rem;
}

.team-member {
    text-align: center;
    width: 160px;
    transition: var(--transition-transform);
}

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

.member-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid;
    padding: 3px;
}

/* Avatar Colors */
.member-avatar.cyan { border-color: #00FFF0; }
.member-avatar.green { border-color: #4BFF36; }
.member-avatar.blue { border-color: #5E57FF; }
.member-avatar.pink { border-color: #F23CA6; }
.member-avatar.purple { border-color: #A291E4; }
.member-avatar.yellow { border-color: #FAFF02; }

.member-avatar img {
    width: 80%;
    height: 100%;
    object-fit: cover;
}

.team-member h3 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 2px;
}

.team-member h4 {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 5px;
}

.team-member .role {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0 0 5px;
    font-size: 0.85rem;
}

.team-member .education {
    color: var(--text-color);
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
}

/* =================================================================
   12. CTA SECTION
   ================================================================= */
.cta {
    padding: var(--section-padding);
    text-align: center;
}

.cta h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

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

/* =================================================================
   13. CONTACT SECTION
   ================================================================= */
.contact {
    padding: var(--section-padding);
}

.contact-wrapper {
    display: flex;
    justify-content: center;
}

.contact-info {
    flex: 1;
}

.contact-info .social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-top: 30px;
}

.contact-info .social-links a {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition-base);
}

.contact-info .social-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(90, 106, 255, 0.4);
    background-color: var(--secondary-color);
}

.contact-info .privacy-link {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.contact-info .privacy-link a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transition: var(--transition-base);
    opacity: 0.8;
}

.contact-info .privacy-link a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
    transform: translateY(-2px);
}

/* =================================================================
   14. FOOTER
   ================================================================= */
footer {
    background: var(--dark-secondary);
    color: var(--text-color);
    padding: 4rem 0 1rem;
    text-align: center;
}

/* =================================================================
   15. RESPONSIVE DESIGN
   ================================================================= */

/* Large Tablets & Small Desktops (992px and down) */
@media (max-width: 992px) {
    .achievement-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about .container {
        flex-direction: column;
        text-align: center;
    }
    
    /* How to Play - Smaller images on tablets */
    .game-screenshot {
        max-width: 45%;
    }
    
    .about-content {
        order: 1;
    }
    
    .about-image {
        order: 2;
        margin-top: 2rem;
        margin-bottom: 0;
    }
    
    .about-content .section-title {
        text-align: center;
    }
    
    .about-content .section-title::after {
        margin: 15px auto;
    }
    
    .contact-wrapper {
        flex-direction: column;
    }
    
    .main-title {
        font-size: 7rem;
    }
    
    .hero-content p {
        font-size: 1.8rem;
    }
}

/* Tablets (768px and down) */
@media (max-width: 768px) {
    /* Navigation */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--dark-secondary);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.5s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links ul {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .lang-switcher {
        margin-left: 0;
        margin-top: 20px;
    }
    
    .lang-dropdown {
        right: auto;
        left: 0;
    }
    
    #open-menu {
        display: block;
    }
    
    #close-menu {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    /* How to Play */
    .screen-demo {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .screen-demo:nth-child(even) .screen-image,
    .screen-demo:nth-child(even) .screen-description {
        order: initial;
    }
    
    .game-screenshot {
        max-width: 35%;
    }
    
    .screen-description h3 {
        font-size: 1.5rem;
    }
    
    .screen-description p {
        font-size: 1rem;
    }
    
    /* Team */
    .team-grid {
        gap: 30px;
    }
    
    .team-member {
        width: 140px;
    }
    
    .member-avatar {
        width: 110px;
        height: 110px;
    }
    
    /* About */
    .about-image {
        padding: 0 20px;
        display: flex;
        justify-content: center;
        margin-top: 3rem;
    }
    
    .about-image img {
        width: 90%;
        max-width: 400px;
    }
    
    /* Typography */
    .section-title {
        font-size: 2rem;
    }
    
    .main-title {
        font-size: 4.5rem;
    }
    
    .hero-content p {
        font-size: 1.6rem;
    }
}

/* Mobile Phones (576px and down) */
@media (max-width: 576px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .achievement-stats {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .main-title {
        font-size: 3.5rem;
    }
    
    .hero-content p {
        font-size: 1.4rem;
    }
    
    /* Section Divider - Mobile */
    .section-divider {
        margin: 2rem 0;
    }
    
    .section-divider::before {
        width: 6px;
        height: 6px;
    }
}

/* Small Mobile Phones (480px and down) */
@media (max-width: 480px) {
    .game-screenshot {
        max-width: 30%;
    }
    
    .screen-description h3 {
        font-size: 1.3rem;
    }
    
    .screen-description p {
        font-size: 0.9rem;
    }
}