/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Fustat', sans-serif;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #eef2ff 0%, #eff6ff 60%, #f0fdf4 100%);
}

/* ── Header ── */
header {
    background-color: #3333CB;
    color: white;
    padding: 25px 15px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h2 {
    margin: 0 0 0 20px;
    color: white;
}

header a {
    text-decoration: none;
    color: white;
    font-family: "Unbounded", sans-serif;
}

.home-btn {
    padding: 10px 30px;
    border-radius: 50px;
    border: 2px solid white;
    background: transparent;
    color: white !important;
    font-weight: 600;
    font-family: "Fustat", sans-serif;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.4s ease;
    margin-right: 20px;
}

.home-btn:hover {
    background: white;
    color: #3333CB !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* ── Card ── */
.card {
    background: white;
    border-radius: 20px;
    border-top: 5px solid #3333CB;
    box-shadow: 0 8px 32px rgba(51, 51, 203, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 36px 28px 40px;
    margin: 60px auto;
    width: 90%;
    max-width: 420px;
    text-align: center;
}

/* ── Card icon ── */
.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3333CB, #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.card-icon i {
    font-size: 26px;
    color: white;
}

/* ── Typography ── */
h2 {
    font-family: "Unbounded", sans-serif;
    font-weight: 600;
    font-size: 26px;
    letter-spacing: 0.4px;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.tagline {
    font-family: "Fustat", sans-serif;
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 28px;
}

/* ── Input ── */
.input-container {
    position: relative;
    width: 84%;
    margin: 0 auto 6px;
}

form input[type="email"] {
    width: 100%;
    height: 52px;
    padding: 20px 14px 6px 44px;
    border: 1.5px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Fustat', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    color: #111827;
    display: block;
}

form input[type="email"]:focus {
    outline: none;
    border-color: #3333CB;
    box-shadow: 0 0 0 3px rgba(51, 51, 203, 0.12);
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-container:focus-within .field-icon {
    color: #3333CB;
}

.input-container label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-family: 'Fustat', sans-serif;
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.2s ease;
    background: white;
    padding: 0 3px;
}

form input[type="email"]:focus + label,
form input[type="email"]:not(:placeholder-shown) + label,
form input[type="email"]:-webkit-autofill + label {
    top: 10px;
    transform: none;
    font-size: 10px;
    color: #3333CB;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Submit button ── */
.submit {
    width: 84%;
    min-height: 48px;
    background: linear-gradient(-45deg, #3333CB 40%, #DBFFF9 50%, #3333CB 60%);
    background-size: 300%;
    background-position-x: 100%;
    animation: shimmer 4s infinite;
    border: none;
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    font-family: "Fustat", sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 0;
    transition: box-shadow 0.2s, opacity 0.2s;
}

.submit:hover {
    box-shadow: 0 6px 20px rgba(51, 51, 203, 0.35);
}

.submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    animation: none;
}

@keyframes shimmer {
    to { background-position-x: -1%; }
}

/* ── Message area ── */
.message-area {
    width: 84%;
    margin: 20px auto 0;
    padding: 0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Fustat', sans-serif;
    text-align: left;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
}

.message-area.show {
    opacity: 1;
    max-height: 120px;
    padding: 12px 16px;
}

.message-area.success {
    background-color: #f0fdf4;
    color: #166534;
    border-left: 3px solid #22c55e;
}

.message-area.error {
    background-color: rgba(220, 38, 38, 0.06);
    color: #991b1b;
    border-left: 3px solid #dc2626;
}

/* ── Back link ── */
.back-link {
    display: inline-block;
    margin-top: 22px;
    font-size: 14px;
    font-family: "Fustat", sans-serif;
    color: #3333CB;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link i {
    font-size: 12px;
    margin-right: 4px;
}

.back-link:hover {
    color: #6366f1;
    text-decoration: underline;
}

/* ── Footer ── */
footer {
    text-align: center;
    font-family: "Unbounded", sans-serif;
    padding: 1rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: auto;
}

footer p { margin: 0; }

footer a {
    color: #6b7280;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: #3333CB;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .card { margin: 40px auto; }
    header { padding: 10px; }
    header h2 { margin-left: 10px; }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
        gap: 10px;
    }

    header h2 { margin-left: 0; margin-bottom: 10px; }

    .home-btn {
        margin-right: 0;
        padding: 8px 24px;
        font-size: 13px;
    }

    .card {
        width: 90%;
        margin: 30px auto;
        padding: 28px 18px 32px;
    }

    h2 { font-size: 22px; }

    .input-container, .submit, .message-area {
        width: 92%;
    }

    footer {
        flex-direction: column;
        gap: 20px;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .card {
        width: 95%;
        margin: 20px auto;
        padding: 24px 14px 28px;
    }

    h2 { font-size: 20px; }

    .input-container, .submit, .message-area {
        width: 96%;
    }

    header { padding: 10px 5px; }
}
