:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1f3a;
    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #ff006e;
    --glow: rgba(0, 212, 255, 0.3);
    --card-bg: rgba(26, 31, 58, 0.6);
}

[data-theme="light"] {
    --bg-primary: #f0f4ff;
    --bg-secondary: #ffffff;
    --text-primary: #0a0e27;
    --text-secondary: #4a5568;
    --accent-primary: #0099cc;
    --accent-secondary: #6366f1;
    --accent-tertiary: #ec4899;
    --glow: rgba(99, 102, 241, 0.2);
    --card-bg: rgba(255, 255, 255, 0.7);
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Animated Background */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars,
.twinkling,
.clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.stars {
    background: transparent url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIxIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC44Ii8+PGNpcmNsZSBjeD0iMTgwIiBjeT0iNjAiIHI9IjEuNSIgZmlsbD0id2hpdGUiIG9wYWNpdHk9IjAuNiIvPjxjaXJjbGUgY3g9IjgwIiBjeT0iMTIwIiByPSIxIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC43Ii8+PGNpcmNsZSBjeD0iMTQwIiBjeT0iMTgwIiByPSIyIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC41Ii8+PGNpcmNsZSBjeD0iNDAiIGN5PSIxNjAiIHI9IjEiIGZpbGw9IndoaXRlIiBvcGFjaXR5PSIwLjgiLz48Y2lyY2xlIGN4PSIxNjAiIGN5PSI0MCIgcj0iMS41IiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC42Ii8+PC9zdmc+') repeat;
    animation: twinkle 200s linear infinite;
}

.twinkling {
    background: transparent url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iNDAwIj48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSIyIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC4zIi8+PGNpcmNsZSBjeD0iMzAwIiBjeT0iMTAwIiByPSIxIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC40Ii8+PGNpcmNsZSBjeD0iMTUwIiBjeT0iMjUwIiByPSIxLjUiIGZpbGw9IndoaXRlIiBvcGFjaXR5PSIwLjUiLz48Y2lyY2xlIGN4PSIzNTAiIGN5PSIzNTAiIHI9IjIiIGZpbGw9IndoaXRlIiBvcGFjaXR5PSIwLjMiLz48L3N2Zz4=') repeat;
    animation: twinkle 100s linear infinite;
}

.clouds {
    background: linear-gradient(180deg,
        var(--accent-primary) 0%,
        transparent 50%,
        var(--accent-secondary) 100%);
    opacity: 0.03;
    animation: drift 120s linear infinite;
}

@keyframes twinkle {
    from { transform: translateX(0); }
    to { transform: translateX(-400px); }
}

@keyframes drift {
    from { transform: translateX(0) translateY(0); }
    to { transform: translateX(-100px) translateY(-100px); }
}

/* Particles */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.6;
    box-shadow: 0 0 10px var(--accent-primary);
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) scale(0.5);
        opacity: 0;
    }
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 0 30px var(--glow);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .sun {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.theme-toggle .moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

/* Main Container */
.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    padding-top: 6rem;
    z-index: 1;
    gap: 4rem;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
}

/* Game Logo */
.logo-container {
    animation: fadeInDown 1s ease backwards;
    margin-bottom: 1rem;
}

.game-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px var(--glow));
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-10px) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) rotate(-2deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.logo-section {
    position: relative;
    margin-bottom: 1rem;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    filter: blur(60px);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 900;
    background: linear-gradient(135deg,
        var(--accent-primary) 0%,
        var(--accent-secondary) 50%,
        var(--accent-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    position: relative;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    filter: drop-shadow(0 0 30px var(--glow));
}

.letter {
    display: inline-block;
    animation: letterFloat 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

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

/* Tagline */
.tagline-wrapper {
    margin-bottom: 2rem;
}

.tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 300;
    text-align: center;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.tagline-word {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: var(--delay);
    margin: 0 0.5rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease 1.2s backwards;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-tertiary);
    border-radius: 50%;
    position: relative;
    animation: pulseRing 2s ease-in-out infinite;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--accent-tertiary);
    border-radius: 50%;
    animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 0, 110, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 110, 0);
    }
}

.status-text {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

/* Features Section */
.features-section {
    width: 100%;
    max-width: 1400px;
    padding: 2rem 0;
    animation: fadeIn 1s ease 1.6s backwards;
}

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

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.8s ease backwards;
    animation-delay: calc(1.8s + var(--delay));
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px var(--glow);
    border-color: var(--accent-primary);
}

.feature-card:hover::before {
    opacity: 0.1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 15px;
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: rotateY(360deg);
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.feature-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.feature-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* CTA Section */
.cta-section {
    width: 100%;
    max-width: 900px;
    padding: 2rem 1rem;
    animation: fadeIn 1s ease 2.2s backwards;
}

.cta-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg 340deg,
        var(--accent-primary) 340deg 360deg
    );
    animation: rotate 6s linear infinite;
    opacity: 0.3;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.cta-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-primary);
    border-radius: 28px;
    z-index: 0;
}

.cta-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.cta-btn.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
}

.cta-btn.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.5);
}

.cta-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
}

.cta-btn.secondary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.cta-btn:hover svg {
    transform: scale(1.2);
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-btn:active::before {
    width: 300px;
    height: 300px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 2rem;
    animation: fadeIn 1s ease 2.5s backwards;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
    opacity: 0.6;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(20px); opacity: 0; }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.6;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .theme-toggle {
        width: 50px;
        height: 50px;
        top: 1rem;
        right: 1rem;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }

    .container {
        padding-top: 4rem;
        gap: 3rem;
    }

    .game-logo {
        width: 120px;
        height: 120px;
    }

    .main-title {
        font-size: clamp(3rem, 12vw, 6rem);
    }

    .tagline {
        font-size: clamp(1rem, 3vw, 2rem);
        letter-spacing: 0.2em;
    }

    .tagline-word {
        margin: 0 0.25rem;
    }

    .status-badge {
        padding: 0.75rem 1.5rem;
    }

    .status-text {
        font-size: 0.9rem;
    }

    .logo-glow {
        width: 250px;
        height: 250px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .cta-card {
        padding: 3rem 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tagline-word {
        display: inline;
    }

    .container {
        padding: 1rem;
        padding-top: 3rem;
    }

    .game-logo {
        width: 100px;
        height: 100px;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
    }

    .feature-icon svg {
        width: 25px;
        height: 25px;
    }

    .cta-card {
        padding: 2rem 1.5rem;
    }
}

/* Light mode specific adjustments */
[data-theme="light"] .stars {
    opacity: 0.3;
}

[data-theme="light"] .main-title {
    filter: drop-shadow(0 0 20px var(--glow));
}

[data-theme="light"] .cta-btn.primary {
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .cta-btn.primary:hover {
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.5);
}

[data-theme="light"] .cta-card::after {
    background: var(--bg-secondary);
}
