/* Shared by login.html and signup.html */

body {
    margin: 0;
    background-color: #111315;
}

.red {
    color: rgb(250, 52, 52);
}

.grey {
    color: rgb(142, 142, 142);
}

/* ---------- Page: form centered under the navbar ---------- */
.auth {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 70px);   /* page height minus the navbar */
    padding: 40px 0;
    color: white;
}

.auth > .container {
    width: 100%;
}

.auth-box {
    background-color: #181b1e;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.auth-box h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 6px;
}

.auth-box form > p.grey {
    margin: 0 0 25px;
}

/* ---------- Fields ---------- */
.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    background-color: #111315;
    border: 1px solid #2a2f33;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: 0.2s;
}

.field input::placeholder {
    color: rgb(100, 106, 110);
}

.field input:focus {
    outline: none;
    border-color: rgb(245, 24, 24);
    box-shadow: 0 0 0 3px rgba(245, 24, 24, 0.25);
}

/* Red border after the user has typed something invalid (no JavaScript needed) */
.field input:user-invalid {
    border-color: rgb(250, 52, 52);
}

/* ---------- Checkbox (sign up page) ---------- */
.termcheck {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 0.9rem;
    color: rgb(190, 190, 190);
    cursor: pointer;
}

.termcheck input {
    flex: 0 0 16px;      /* don't grow or shrink */
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: rgb(245, 24, 24);
}

.termcheck span {
    flex: 1;
    min-width: 0;
}
/* ---------- Links ---------- */
.red-link {
    color: rgb(250, 52, 52);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.red-link:hover {
    text-decoration: underline;
}

.switch-text {
    margin: 22px 0 0;
    text-align: center;
    font-size: 0.92rem;
}

.switch-text .red-link {
    font-size: inherit;
}

/* ---------- Button ---------- */
.btn-red {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background-color: rgb(245, 24, 24);
    border: 0;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-red:hover {
    background-color: rgb(190, 14, 14);
}

/* Visible keyboard focus */
.btn-red:focus-visible,
.red-link:focus-visible,
.check input:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
    .auth {
        align-items: flex-start;
        padding: 24px 0;
    }

    .auth-box {
        padding: 20px;
    }

    .auth-box h1 {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
