* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    color: #e2e8f0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-box {
    background: #161625;
    border: 1px solid #2d2d44;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.auth-box h2 {
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}

.input-group {
    margin-bottom: 15px;
}

.auth-box input, 
.auth-box select {
    width: 100%;
    padding: 12px 15px;
    background: #12121c;
    border: 1px solid #2d2d44;
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.auth-box input:focus, 
.auth-box select:focus {
    border-color: #5c6bc0;
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.2);
}

.auth-box select option {
    background: #161625;
    color: #ffffff;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #5c6bc0, #3f51b5);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(92, 107, 192, 0.4);
    transition: all 0.2s ease;
    margin-top: 5px;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #6c7cd0, #4f61c5);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
}

.auth-footer a {
    color: #94a3b8;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #5c6bc0;
    text-decoration: underline;
}

.register-time-box{margin:0 0 15px;padding:11px 13px;border:1px solid #2d2d44;border-radius:8px;background:#12121c;display:grid;gap:3px;text-align:left}
.register-time-box strong{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:#cbd5e1}
.register-time-box span{font-size:13px;color:#ffffff;font-weight:700}
.register-time-box small{font-size:11px;color:#64748b;line-height:1.4}
#register-local-time{font-size:12px;color:#94a3b8;font-weight:600}


/* ============================================================
   B4U REGISTRATION — MOBILE RESPONSIVE FIX
   Works with iPhone Safari, Android Chrome and small tablets.
   Keeps the complete form scrollable instead of clipping it.
   ============================================================ */

html {
    width: 100%;
    min-height: 100%;
    background: #0f0f1a;
}

body {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-text-size-adjust: 100%;
    padding: 20px 0;
    align-items: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    margin: auto;
}

.auth-box {
    width: 100%;
    min-width: 0;
}

/* iOS/Android: prevent automatic input zoom and give the form
   enough room for the browser's touch controls. */
.auth-box input,
.auth-box select,
.auth-btn {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 600px) {
    body {
        min-height: 100svh;
        min-height: 100dvh;
        padding:
            max(12px, env(safe-area-inset-top))
            0
            max(12px, env(safe-area-inset-bottom));
        align-items: flex-start;
    }

    .auth-container {
        max-width: none;
        padding: 12px;
        margin: 0 auto;
    }

    .auth-box {
        padding: 22px 18px;
        border-radius: 12px;
    }

    .auth-box h2 {
        margin-bottom: 18px;
        font-size: 21px;
    }

    .input-group {
        margin-bottom: 13px;
    }

    .auth-box input,
    .auth-box select {
        min-height: 48px;
        padding: 12px 13px;
        font-size: 16px; /* prevents iOS Safari auto-zoom */
        line-height: 1.25;
        -webkit-appearance: none;
        appearance: none;
    }

    /* Keep the native dropdown indicator usable after appearance reset. */
    .auth-box select {
        padding-right: 38px;
        background-image:
            linear-gradient(45deg, transparent 50%, #94a3b8 50%),
            linear-gradient(135deg, #94a3b8 50%, transparent 50%);
        background-position:
            calc(100% - 18px) 20px,
            calc(100% - 12px) 20px;
        background-size: 6px 6px, 6px 6px;
        background-repeat: no-repeat;
    }

    .auth-btn {
        min-height: 48px;
        padding: 12px 14px;
        font-size: 16px;
        margin-top: 4px;
    }

    .register-time-box {
        margin-bottom: 14px;
        padding: 11px 12px;
    }

    .register-time-box small {
        font-size: 11px;
    }

    .auth-footer {
        margin-top: 17px;
        padding-bottom: 2px;
    }

    .auth-footer a {
        display: inline-block;
        padding: 6px 4px;
        font-size: 13px;
        line-height: 1.4;
    }
}

@media (max-width: 380px) {
    .auth-container {
        padding: 8px;
    }

    .auth-box {
        padding: 19px 14px;
        border-radius: 10px;
    }

    .auth-box h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .input-group {
        margin-bottom: 11px;
    }

    .auth-box input,
    .auth-box select {
        min-height: 46px;
        padding-left: 12px;
        padding-right: 34px;
    }

    .register-time-box {
        padding: 10px 11px;
    }
}

/* Landscape phones: allow the page to scroll naturally instead of
   vertically centering a form taller than the viewport. */
@media (max-height: 600px) and (max-width: 900px) {
    body {
        align-items: flex-start;
    }

    .auth-container {
        margin-top: 8px;
        margin-bottom: 8px;
    }
}
