﻿*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #e7f6ff 0%, #fafafe 100%);
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 48px auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 38px rgba(44, 68, 100, 0.13);
    padding: 40px 32px 32px 32px;
    border: 1px solid #e3eaf8;
}

.form-title {
    font-size: 2.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 22px;
    color: #204c76;
    letter-spacing: 1.2px;
}

.form-group {
    margin-bottom: 30px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 7px;
    font-size: 1.1rem;
    color: #355c7d;
    font-weight: bold;
    letter-spacing: 0.6px;
    transition: color 0.18s;
}

.label-error {
    color: #fa3469 !important;
}

input {
    width: 100%;
    padding: 16px 44px 16px 13px;
    font-size: 1.13rem;
    border-radius: 9px;
    border: 1.6px solid #dee7f3;
    background: #f9fcff;
    transition: border 0.21s, background 0.21s;
    outline: none;
    box-sizing: border-box;
    display: block;
}

    input:focus {
        border-color: #178fff;
        background: #edf7ff;
    }
/* Error styles + icon bounce */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }

    100% {
        transform: translateX(0);
    }
}

.input-error {
    animation: shake 0.3s;
    box-shadow: 0 0 0 2px #ffb1c3, 0 3px 15px rgba(255,43,94,0.10);
    border-color: #ff2b5e !important;
    background: #fff2f8 !important;
}

.input-success {
    border-color: #14cc89 !important;
    background: #f2fff7 !important;
}

.error-message {
    display: flex;
    align-items: center;
    color: #ff2b5e;
    font-size: 10px;
    min-height: 18px;
    margin-top: 9px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.29s, transform 0.29s;
    position: relative;
    background: linear-gradient(90deg, #ffe0ec 65%, #fff9f9 100%);
    border-radius: 5px;
    padding: 5px 10px;
    box-shadow: 0 1px 5px rgba(255,43,94,0.02);
    border-left: 3px solid #ff2b5e;
    font-weight: 500;
    letter-spacing: 0.2px;
}

    .error-message.show {
        opacity: 1;
        transform: translateY(0);
    }

@keyframes iconBounce {
    0% {
        transform: scale(0.82);
    }

    55% {
        transform: scale(1.24);
    }

    100% {
        transform: scale(1);
    }
}

.error-icon {
    color: #ff2b5e !important;
    font-size: 1.25em !important;
    margin-right: 8px;
    animation: iconBounce 0.38s;
}

input.input-error::placeholder {
    color: #ff7d9e;
    opacity: 1;
}

.success-message {
    color: #14cc89;
    background: #f4fdf9;
    border-radius: 8px;
    padding: 12px;
    font-size: 1.14rem;
    text-align: center;
    font-weight: 500;
    margin-top: 28px;
    box-shadow: 0 2px 12px rgba(20,204,137,0.06);
    display: none;
    position: relative;
    z-index: 2;
}

    .success-message.show {
        display: block;
    }

.submit-btn {
    background: linear-gradient(90deg, #178fff 65%, #2bd8be 100%);
    color: #fff;
    padding: 16px 0;
    border: none;
    border-radius: 9px;
    font-size: 1.18rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    letter-spacing: 1.1px;
    transition: background 0.16s;
    box-shadow: 0 2px 15px rgba(23,143,255,0.09);
}

    .submit-btn:hover {
        background: linear-gradient(90deg, #1260c9 80%, #14cc89 100%);
    }
/* Confetti Animation on Success */
.confetti {
    pointer-events: none;
    position: absolute;
    left: 50%;
    top: 56px;
    transform: translateX(-50%);
    z-index: 10;
    display: none;
}

    .confetti .dot {
        position: absolute;
        border-radius: 50%;
        opacity: 0.78;
        animation: confettiMove 1.49s linear forwards;
    }

@keyframes confettiMove {
    0% {
        opacity: 0.95;
    }

    75% {
        opacity: 1;
    }

    100% {
        transform: translateY(145px) scale(0.9) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 24px 5vw 18px 5vw;
        max-width: 99vw;
    }

    .form-title {
        font-size: 1.29rem;
    }

    label {
        font-size: 1.01rem;
    }

    .submit-btn {
        font-size: 1.08rem;
    }

    input {
        font-size: 1.03rem;
        padding: 13px 38px 13px 10px;
    }
}
