/* ================================
   RESET
================================ */

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

/* ================================
   BODY
================================ */

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    font-family: "Inter", "Segoe UI", Arial, sans-serif;

    background:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.35), transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.35), transparent 30%),
        linear-gradient(135deg, #0f172a, #1e1b4b, #312e81);

    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

.error {
    color: #dc2626;
    /* Strong readable red */
    background-color: #fef2f2;
    /* Soft red background accent */
    border: 1px solid #fecaca;
    /* Subtle red border */
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    /* Rounded corners */
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ================================
   BACKGROUND GLOW
================================ */

body::before,
body::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

body::before {
    width: 250px;
    height: 250px;
    background: #6366f1;
    top: -80px;
    left: -80px;
    opacity: 0.5;
}

body::after {
    width: 300px;
    height: 300px;
    background: #a855f7;
    right: -100px;
    bottom: -100px;
    opacity: 0.4;
}

/* ================================
   LOGIN CARD
================================ */

main {
    width: 100%;
    max-width: 430px;

    padding: 45px 40px;

    position: relative;
    z-index: 1;

    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);

    border-radius: 24px;

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);

    animation: cardEnter 0.7s ease;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================================
   HEADING
================================ */

h1 {
    color: #ffffff;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 10px;
}

/* ================================
   DESCRIPTION
================================ */

p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* ================================
   FORM
================================ */

form {
    display: flex;
    flex-direction: column;
}

/* ================================
   LABELS
================================ */

form>label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ================================
   INPUTS
================================ */

input[type="email"],
input[type="password"] {
    width: 100%;
    height: 52px;

    padding: 0 16px;

    margin-bottom: 20px;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;

    outline: none;

    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;

    font-size: 15px;

    transition:
        border 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Input focus */

input[type="email"]:focus,
input[type="password"]:focus {
    background: rgba(255, 255, 255, 0.13);

    border-color: #818cf8;

    box-shadow:
        0 0 0 3px rgba(129, 140, 248, 0.15),
        0 8px 25px rgba(99, 102, 241, 0.15);

    transform: translateY(-1px);
}

/* ================================
   REMEMBER CHECKBOX
================================ */

label.remember {
    display: flex;
    align-items: center;
    gap: 9px;

    margin: 26px 0 26px;

    color: rgba(255, 255, 255, 0.7);

    font-size: 14px;
    font-weight: 400;

    cursor: pointer;
}

label.remember input {
    appearance: none;

    width: 18px;
    height: 18px;

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;

    background: rgba(255, 255, 255, 0.08);

    cursor: pointer;

    position: relative;

    transition: all 0.2s ease;
}

label.remember input:checked {
    background: #6366f1;
    border-color: #818cf8;
}

label.remember input:checked::after {
    content: "✓";

    position: absolute;

    left: 3px;
    top: -1px;

    color: white;
    font-size: 13px;
    font-weight: bold;
}

/* ================================
   LOGIN BUTTON
================================ */

button {
    width: 100%;
    height: 52px;

    border: none;
    border-radius: 12px;

    color: white;

    font-size: 15px;
    font-weight: 700;

    letter-spacing: 0.2px;

    cursor: pointer;

    background: linear-gradient(135deg,
            #6366f1,
            #8b5cf6);

    box-shadow:
        0 10px 25px rgba(99, 102, 241, 0.35);

    position: relative;
    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* Button shine */

button::before {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 60%;
    height: 100%;

    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent);

    transform: skewX(-20deg);

    transition: left 0.6s ease;
}

button:hover::before {
    left: 140%;
}

button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 15px 35px rgba(99, 102, 241, 0.5);
}

button:active {
    transform: translateY(0);
}

/* ================================
   MOBILE
================================ */

@media (max-width: 480px) {

    body {
        padding: 15px;
    }

    main {
        padding: 35px 25px;
        border-radius: 20px;
    }

    h1 {
        font-size: 28px;
    }

    p {
        font-size: 14px;
    }
}

.login-logo {
    display: block;
    width: min(280px, 82%);
    height: auto;
    margin: 0 auto 28px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}