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

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #2d2d2d;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding-top: 6vh;
}

.container {
    width: 100%;
    max-width: 560px;
    padding: 2rem;
    text-align: center;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.tagline {
    color: #6b7280;
    font-size: 1.35rem;
    margin-bottom: 3rem;
    font-weight: 400;
}

.form-group {
    margin-bottom: 1.25rem;
}

input[type="email"],
input[type="text"] {
    width: 100%;
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    background: #fafafa;
    color: #2d2d2d;
    font-size: 1.2rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder { color: #9ca3af; }
input[type="email"]:focus,
input[type="text"]:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.hint {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 0.6rem;
    line-height: 1.4;
}

.cta {
    width: 100%;
    padding: 1.1rem 1.5rem;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    margin-top: 1rem;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.cta:hover { opacity: 0.92; box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4); }
.cta:active { transform: scale(0.98); }
.cta:disabled { opacity: 0.5; cursor: not-allowed; }

.hidden { display: none !important; }

.telegram-step {
    margin-top: 1.5rem;
    animation: fadeIn 0.2s ease;
}

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

/* Spawn screen (hatching + result combined) */
.spawn-screen { display: none; text-align: center; }
.spawn-screen.active { display: block; }
.signup-screen.hidden { display: none; }

.result-top .meet-name,
.result-top .buddy-desc {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.result-top.revealed .meet-name,
.result-top.revealed .buddy-desc {
    visibility: visible;
    opacity: 1;
}

.egg-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 200px auto 0.5rem;
}

.egg-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.egg-container img.wobble {
    animation: wobble 0.5s ease-in-out infinite alternate;
}

@keyframes wobble {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

.progress-container {
    width: 100%;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #f3f4f6;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f97316, #fb923c);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-text {
    color: #6b7280;
    font-size: 1.05rem;
    margin-top: 1rem;
    min-height: 1.5rem;
}

.result-top {
    margin-bottom: 0.5rem;
}

.meet-name {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f97316;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.25);
    position: absolute;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.egg-container.show-profile .profile-pic {
    visibility: visible;
    opacity: 1;
    animation: bobble 2.5s ease-in-out infinite;
}

@keyframes bobble {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

.buddy-desc {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.result-message {
    color: #6b7280;
    font-size: 1.1rem;
    margin-top: 1.25rem;
    line-height: 1.6;
}

.result-message .check-email {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-top: 0.5rem;
}

/* Mobile */
@media (max-width: 600px) {
    body {
        padding-top: 3vh;
    }

    .container {
        padding: 1.25rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    input[type="email"] {
        font-size: 1rem;
        padding: 1rem;
    }

    .cta {
        font-size: 1.1rem;
        padding: 1rem;
    }

    .egg-container {
        width: 200px;
        height: 200px;
        margin-top: 140px;
    }

    .profile-pic {
        width: 90px;
        height: 90px;
        top: -130px;
    }

    .meet-name {
        font-size: 1.6rem;
    }

    .buddy-desc {
        font-size: 0.85rem;
    }

    .result-message {
        font-size: 1rem;
    }

    .result-message .check-email {
        font-size: 1.15rem;
    }

    .progress-text {
        font-size: 0.95rem;
    }
}

/* Confetti canvas */
.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}
