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

body {
    font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
    color: #fff;
    min-height: 100vh;
    background-color: #0e1729;
    background-image: url("../images/bg-auth-arena.jpg");
    background-size: cover;
    background-position: center 48%;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(14, 23, 41, 0.55), rgba(14, 23, 41, 0.94));
    z-index: 0;
    pointer-events: none;
}

.auth-layout {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 64px;
    max-width: 1160px;
    margin: 0 auto;
    min-height: calc(100vh - var(--site-nav-space));
    padding: 40px 24px;
}

.auth-hero {
    flex: 1;
    min-width: 0;
    padding: 38px 40px;
    background: rgba(12, 16, 22, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 26px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.auth-hero-text h1 {
    font-size: clamp(2.2rem, 4vw, 3.35rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.auth-hero-text p {
    color: #f7fafc;
    font-size: 1.08rem;
    line-height: 1.6;
    margin-bottom: 16px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.badge {
    display: inline-block;
    background: rgba(43, 108, 176, 0.5);
    border: 1px solid rgba(99, 179, 237, 0.4);
    color: #bee3f8;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.perks li {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.auth-wrapper {
    flex: 0 0 440px;
    max-width: 440px;
    text-align: center;
}

.auth-card {
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    padding: 32px 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.card-thumb {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 900;
    color: #2b6cb0;
    margin-bottom: 2px;
}

.card-sub {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 600;
}

.tabs {
    display: flex;
    background-color: #f0f4f8;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    border: none;
    background: none;
    padding: 12px 0;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    color: #718096;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.tab.active {
    background-color: #fff;
    color: #2b6cb0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: scale(1.02);
}

.auth-form {
    text-align: left;
}

.auth-form.hidden {
    display: none;
}

label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    margin-top: 14px;
}

label:first-of-type {
    margin-top: 0;
}

.req {
    color: #fc8181;
}

input {
    width: 100%;
    padding: 13px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    background: #f8fafc;
    color: #2d3748;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: #63b3ed;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 179, 237, 0.2);
}

.submit-btn {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 14px;
    background: linear-gradient(135deg, #2b6cb0 0%, #4299e1 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(43, 108, 176, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(43, 108, 176, 0.35);
}

#message {
    margin-top: 14px;
    font-size: 0.9rem;
    color: #c53030;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 800px) {
    body {
        background-size: 140% auto;
        background-position: 50% 24%;
        background-attachment: scroll;
    }

    .auth-layout {
        flex-direction: column;
        min-height: auto;
        margin: 24px auto;
        padding: 24px 20px 40px;
    }

    .auth-hero {
        text-align: center;
        padding: 28px 24px;
    }

    .perks {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .perks li {
        flex: 1 1 auto;
    }

    .auth-wrapper {
        flex: 1;
        max-width: 100%;
        width: 100%;
    }
}

/* Shared by the "Forgot your password?" and "Back to log in" buttons, and by
   the reset page. A <button> rather than an <a> because neither navigates. */
.link-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 0;
    background: none;
    border: none;
    color: #2b6cb0;
    font-family: 'Nunito', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.link-btn:hover {
    color: #1a4e85;
}

.form-note {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    line-height: 1.5;
}

/* #message is styled red for errors; this flips it for the reset confirmation. */
#message.ok {
    color: #276749;
}
