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

:root {
    --bg-primary: #0b0d17;
    --bg-secondary: #111327;
    --bg-card: #161938;
    --text-primary: #e8eaff;
    --text-secondary: #9ca0c4;
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --accent-glow: rgba(88, 101, 242, 0.4);
    --gradient-start: #ff6b6b;
    --gradient-end: #5865f2;
    --yellow: #f5c518;
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

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

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

/* ===== HERO ===== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 3rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 560px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: dot-pulse 1.5s ease-in-out infinite;
}

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

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--accent);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 30px var(--accent-glow);
}

.btn-discord::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: 0.5s;
}

.btn-discord:hover::before {
    left: 100%;
}

.btn-discord:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px var(--accent-glow);
}

.btn-discord--large {
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
    border-radius: 16px;
}

.discord-icon {
    flex-shrink: 0;
}

/* ===== CHARACTER ===== */

.hero-character {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 450px;
}

.character-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 400px;
    height: 420px;
}

.character-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    animation: glow-pulse 3s ease-in-out infinite;
    z-index: 0;
}

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

.character-shadow {
    position: absolute;
    bottom: 10px;
    width: 180px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.5) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: shadow-breathe 4s ease-in-out infinite;
}

@keyframes shadow-breathe {
    0%, 100% { transform: scaleX(1); opacity: 0.5; }
    25% { transform: scaleX(0.85); opacity: 0.35; }
    75% { transform: scaleX(1.05); opacity: 0.55; }
}

.character-media {
    width: 100%;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    cursor: pointer;
    filter: drop-shadow(0 15px 40px rgba(88, 101, 242, 0.3));
    transition: opacity 0.3s ease, filter 0.3s;
    object-fit: contain;
}

.character-img {
    opacity: 1;
}

.character-video {
    opacity: 0;
}

.character-wrapper:hover .character-img {
    opacity: 0;
}

.character-wrapper:hover .character-video {
    opacity: 1;
}

/* ===== FLOATING EMOJIS ===== */

.floating-emojis {
    position: absolute;
    inset: -30px;
    z-index: 3;
    pointer-events: none;
}

.floating-emoji {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    pointer-events: none;
}

.floating-emoji.rise {
    animation: emoji-rise 3s ease-out forwards;
}

.floating-emoji.pop {
    animation: emoji-pop 1.5s ease-out forwards;
}

.floating-emoji.spiral {
    animation: emoji-spiral 3.5s ease-out forwards;
}

@keyframes emoji-rise {
    0% { opacity: 0; transform: translateY(0) scale(0.3); }
    15% { opacity: 1; transform: translateY(-15px) scale(1); }
    80% { opacity: 0.7; transform: translateY(-90px) scale(1.1); }
    100% { opacity: 0; transform: translateY(-130px) scale(0.4); }
}

@keyframes emoji-pop {
    0% { opacity: 0; transform: scale(0); }
    30% { opacity: 1; transform: scale(1.4); }
    50% { opacity: 1; transform: scale(0.9); }
    70% { opacity: 0.8; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(0); }
}

@keyframes emoji-spiral {
    0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.3); }
    15% { opacity: 1; transform: translate(10px, -15px) rotate(60deg) scale(1); }
    50% { opacity: 0.8; transform: translate(-15px, -60px) rotate(180deg) scale(1.1); }
    80% { opacity: 0.4; transform: translate(10px, -100px) rotate(300deg) scale(0.8); }
    100% { opacity: 0; transform: translate(-5px, -130px) rotate(360deg) scale(0.3); }
}

/* ===== SPEECH BUBBLE ===== */

.speech-bubble {
    position: absolute;
    top: 40px;
    right: -90px;
    background: var(--bg-card);
    border: 1px solid rgba(88, 101, 242, 0.3);
    padding: 1rem 1.3rem;
    border-radius: 16px;
    max-width: 260px;
    min-width: 160px;
    font-size: 0.9rem;
    color: var(--text-primary);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.speech-bubble.visible {
    opacity: 1;
}


#speechText {
    min-height: 1.2em;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.6s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== SCROLL INDICATOR ===== */

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
}

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

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

/* ===== FEATURES ===== */

.features {
    padding: 8rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(88, 101, 242, 0.1);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(88, 101, 242, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.15);
    border-radius: 14px;
    margin-bottom: 1.2rem;
    color: var(--accent);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

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

/* ===== HOW IT WORKS ===== */

.how-it-works {
    padding: 6rem 3rem 8rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid rgba(88, 101, 242, 0.08);
    transition: var(--transition);
}

.step:hover {
    border-color: rgba(88, 101, 242, 0.3);
    transform: translateX(8px);
}

.step-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== CTA ===== */

.cta {
    padding: 8rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-bg-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.cta-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.cta-shape--1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-start);
    top: -100px;
    left: -100px;
    animation: shape-float 8s ease-in-out infinite;
}

.cta-shape--2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    right: -100px;
    animation: shape-float 8s ease-in-out infinite reverse;
}

@keyframes shape-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-character {
    margin-bottom: 2rem;
}

.cta-character-canvas {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(88, 101, 242, 0.4));
    animation: cta-bounce 2.5s ease-in-out infinite;
}

@keyframes cta-bounce {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-25px) rotate(2deg); }
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 1rem;
}

.cta-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.cta-desc strong {
    color: var(--yellow);
}

/* ===== FOOTER ===== */

.footer {
    padding: 2rem 3rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid rgba(88, 101, 242, 0.1);
    position: relative;
    z-index: 1;
}

/* ===== ANIMATIONS ===== */

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-character {
        margin-top: 2rem;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text .hero-subtitle {
        order: 4;
        max-width: 500px;
        margin-bottom: 0;
    }

    .hero-text .btn-discord {
        order: 3;
        margin-bottom: 1.5rem;
    }

    .character-wrapper {
        width: 250px;
        height: 280px;
    }

    .speech-bubble {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        top: auto;
        bottom: -50px;
        max-width: 220px;
        font-size: 0.8rem;
    }

    .floating-emojis {
        inset: -10px;
        overflow: hidden;
    }

    .features {
        padding: 4rem 1.5rem;
    }

    .how-it-works {
        padding: 4rem 1.5rem;
    }

    .cta {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 3rem 1.5rem;
    }

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

    .character-wrapper {
        width: 175px;
        height: 200px;
    }

    .character-glow {
        width: 150px;
        height: 150px;
    }

    .character-shadow {
        width: 90px;
        height: 12px;
    }

    .speech-bubble {
        top: auto;
        bottom: -45px;
        max-width: 190px;
        font-size: 0.75rem;
        padding: 0.7rem 1rem;
    }

    .cta-character-canvas {
        width: 100px;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-discord {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
}
