﻿body.start-bg {
    margin: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.35), rgba(0,0,0,0.85)), url('/images/FootballField.jpg') center / cover no-repeat fixed;
}

.input-row {
    display: grid;
    grid-template-columns: 160px 240px 1fr; /* label | input | help/error */
    column-gap: 18px;
    row-gap: 6px;
    align-items: center;
}

    .input-row label,
    .toggle-label,
    .help {
        color: #ffd400;
        text-shadow: 0 0 10px rgba(255,212,0,.65), 0 0 22px rgba(255,212,0,.45);
        font-weight: 700;
        justify-self: end;
        white-space: nowrap;
    }

    .input-row input {
        width: 240px;
        box-sizing: border-box;
    }
/* Error text */
.error {
    color: red;
    font-style: italic;
    margin-left: 10px;
    visibility: hidden;
}

/* Highlight invalid fields */
.invalid input {
    border-color: red;
}

/* Submit button */
#submitBtn {
    padding: 10px 25px;
    font-size: 18px;
    background: #007bff;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

    /* Disabled button */
    #submitBtn:disabled {
        background: #999;
        cursor: not-allowed;
    }

#newUserForm {
    width: 560px; /* widen the panel so help text stays on one line */
    margin: 0 auto;
}



/* Error message (hidden until triggered) */
.error {
    color: red;
    font-style: italic;
    margin-left: 10px;
    visibility: hidden;
}
.role-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}


.toggle-switch {
    width: 56px;
    height: 30px;
    background-color: #d1d1d1;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.25s ease;
    flex-shrink: 0;
}

    .toggle-switch.active {
        background-color: #34c759;
    }

.toggle-knob {
    width: 26px;
    height: 26px;
    background-color: #f2f2f2;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.25s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.toggle-switch.active .toggle-knob {
    transform: translateX(26px);
}
#typeRow {
    grid-template-columns: 160px 240px 1fr;
}

    #typeRow label {
        visibility: hidden;
    }

    #typeRow .input-col {
        grid-column: 2 / 4;
    }

/* center toggle inside input column */
.role-toggle.centered {
    display: flex;
    align-items: center;
    gap: 40px;
}
/* Container glow */
.yellow-glow-container {
    max-width: 625px;
    margin: auto;
    padding: 28px 32px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.85);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.45), 0 0 28px rgba(255, 215, 0, 0.35), inset 0 0 18px rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.6);
}

/* Header glow */
.glow-title {
    text-align: center;
    margin-bottom: 26px;
    color: #ffd700;
    letter-spacing: 1px;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.6), 0 0 14px rgba(255, 215, 0, 0.45);
}
.input-row input {
    background: #111;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .input-row input:focus {
        outline: none;
        border-color: #ffd700;
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.6), 0 0 12px rgba(255, 215, 0, 0.4);
    }
#submitBtn {
    width: 100%;
    margin-top: 22px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(#ffd700, #c9a800);
    color: #000;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.45);
}

    #submitBtn:disabled {
        opacity: 0.4;
        box-shadow: none;
        cursor: not-allowed;
    }
    /* ============================
   NEW USER FORM - MOBILE FIX
   ============================ */
@media (max-width: 600px) {

    /* keep container centered and prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
    }

    .yellow-glow-container {
        width: calc(100% - 24px);
        max-width: 520px;
        margin: 0 auto;
        padding: 18px 16px;
        box-sizing: border-box;
    }

    /* kill the fixed desktop width on phones */
    #newUserForm {
        width: 100% !important;
        max-width: 100%;
        margin: 0;
    }

    /* stack label/input/help instead of wide 3-col grid */
    .input-row {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 8px;
        column-gap: 0;
        align-items: start;
        width: 100%;
        box-sizing: border-box;
    }

    .input-row label,
    .toggle-label,
    .help {
        justify-self: start;
        white-space: normal;
    }

    .input-row input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* help text sits under the input */
    .help,
    .error {
        margin-left: 0;
        justify-self: start;
    }

    /* make the toggle row behave on mobile */
    #typeRow label {
        display: none;
    }

    #typeRow .input-col {
        grid-column: auto;
        width: 100%;
    }

    .role-toggle.centered {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    /* button full width and aligned */
    #submitBtn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}
/* keep the form from causing horizontal scroll */
html, body {
    overflow-x: hidden;
}

.yellow-glow-container {
    box-sizing: border-box;
}

/* ---- DESKTOP stays as-is (your current grid) ---- */
/* .input-row { grid-template-columns: 160px 240px 1fr; } etc */


/* =========================
   MOBILE FIX (labels left of inputs)
   ========================= */
@media (max-width: 480px) {

    #newUserForm {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .yellow-glow-container {
        max-width: 92vw;
        padding: 22px 18px;
        margin: 14px auto;
    }

    /* 2-column grid: label | input (no 3rd column on mobile) */
    .input-row {
        display: grid;
        grid-template-columns: 120px 1fr; /* label | input */
        column-gap: 12px;
        row-gap: 6px;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

        .input-row label {
            justify-self: end;
            white-space: nowrap;
            font-size: 14px;
        }

        .input-row input {
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

    /* Display Name help goes UNDER the input, right aligned + italic */
    #nameRow .help {
        grid-column: 2; /* under the input column */
        justify-self: end;
        margin-top: -2px;
        font-style: italic;
        font-weight: 600; /* less bold than labels */
        font-size: 12px;
        white-space: nowrap;
    }

    /* Hide other help/error columns on mobile unless you want them */
    .input-row .error {
        grid-column: 2;
        justify-self: start;
        margin-left: 0;
    }

    /* Type row spans full width nicely */
    #typeRow {
        grid-template-columns: 1fr;
    }

        #typeRow label {
            display: none;
        }

        #typeRow .input-col {
            grid-column: 1;
        }

    .role-toggle.centered {
        justify-content: center;
        gap: 18px;
        flex-wrap: nowrap;
    }

    #submitBtn {
        width: 100%;
        box-sizing: border-box;
    }
}
@media (max-width: 480px) {

    /* create visual separation so Max 10 characters
       is clearly tied to Display Name */
    #emailRow {
        margin-top: 14px;
    }
}
.hidden {
    display: none !important;
}
.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .page-loader.hidden {
        display: none;
    }

.loader-spinner {
    width: 64px;
    height: 64px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: #00ff7f; /* green glow */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px #00ff7f;
}

.loader-text {
    margin-top: 16px;
    color: #eaffea;
    font-size: 18px;
    text-shadow: 0 0 10px #00ff7f;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}