/* style.css – modern minimal, smooth animations, responsive */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(145deg, #f7f0ea 0%, #e8e0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow-x: hidden;
}

/* subtle animated stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(2px 2px at 20px 30px, #aaa8, transparent),
                radial-gradient(2px 2px at 40px 70px, #d4c2ff, transparent),
                radial-gradient(3px 3px at 120px 240px, #b7b0c0, transparent),
                radial-gradient(2px 2px at 85vw 20vh, #b3a5d9, transparent),
                radial-gradient(2px 2px at 70vw 80vh, #cbbae0, transparent);
    background-size: 200px 200px, 300px 300px, 400px 400px, 500px 500px, 600px 600px;
    animation: twinkle 8s infinite alternate;
    opacity: 0.5;
    z-index: 0;
}
@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

.container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 2.5rem;
    padding: 2.8rem 2.5rem;
    box-shadow: 0 30px 50px -25px rgba(0,0,0,0.25), 0 10px 20px -5px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.3s ease;
}
.card:hover {
    transform: scale(1.003);
}

.header-message {
    text-align: center;
    margin-bottom: 2.8rem;
    font-size: 1.08rem;
    line-height: 1.6;
    background: rgba(70, 50, 90, 0.05);
    padding: 1.4rem 1.8rem;
    border-radius: 2rem;
    border-left: 6px solid #7c62a3;
    color: #2b1e3a;
    font-weight: 420;
    letter-spacing: 0.01em;
    backdrop-filter: blur(4px);
    box-shadow: inset 0 1px 4px rgba(255,255,255,0.6);
}

/* form fields */
.input-group {
    position: relative;
    margin-bottom: 2rem;
}
.row {
    display: flex;
    gap: 1.2rem;
}
.half {
    flex: 1;
}
label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 520;
    font-size: 0.9rem;
    color: #34284a;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(255,255,255,0.75);
    border: 1.5px solid rgba(160, 140, 190, 0.25);
    border-radius: 1.4rem;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s, background 0.3s;
    color: #1e142c;
}
input:focus {
    border-color: #8f79b0;
    background: #ffffff;
    box-shadow: 0 6px 18px -8px rgba(100, 70, 150, 0.4);
}
input::placeholder {
    color: #ac9fc7;
    font-weight: 300;
    font-size: 0.95rem;
}
.focus-border {
    position: absolute;
    bottom: 0;
    left: 0%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #a48ac0, #6f4f8f);
    border-radius: 4px;
    transition: width 0.3s ease;
    bottom: 6px;
    left: 1rem;
    width: calc(0% - 2rem);
}
input:focus ~ .focus-border {
    width: calc(100% - 2rem);
}

/* submit button */
.submit-btn {
    background: #392e4a;
    color: white;
    border: none;
    padding: 1rem 2.4rem;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 3rem;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 8px 18px -6px #392e4a80;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
}
.submit-btn:hover {
    background: #4d3b64;
    transform: scale(1.01);
    box-shadow: 0 14px 22px -8px #2e223b;
}
.submit-btn:active {
    transform: scale(0.99);
}
.btn-icon {
    transition: transform 0.2s;
}
.submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* success overlay */
.success-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.3s;
}
.success-overlay.hidden {
    display: none;
}
.success-card {
    background: rgba(255,255,255,0.95);
    padding: 2.8rem 3rem;
    border-radius: 3rem;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 30px 40px -15px #1e142c;
    animation: successPop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes successPop {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}
.checkmark {
    background: #4b8a7d;
    color: white;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    margin: 0 auto 1.2rem;
    box-shadow: 0 10px 12px -7px #1f4e44;
}
.success-card h3 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: #2b1e3a;
}
.success-card p {
    font-size: 1.1rem;
    color: #433b55;
    line-height: 1.5;
}

/* validation & error style */
input.error {
    border-color: #cf6679;
    background: #fff6f6;
}
.error-message {
    color: #b0003a;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    margin-left: 0.8rem;
}

/* responsive */
@media (max-width: 600px) {
    .card { padding: 1.8rem 1.2rem; border-radius: 2rem; }
    .row { flex-direction: column; gap: 0; }
    .header-message { font-size: 0.96rem; padding: 1rem 1.2rem; }
    .submit-btn { font-size: 1rem; }
}