/* General / Reset */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    overflow-x: hidden;
}

/* Background video and overlay (kept) */
.video-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1;
    overflow: hidden;
}

.video-container video { width: 100vw; height: 100vh; object-fit: cover; filter: brightness(0.5) blur(2px); }

.overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: linear-gradient(120deg, rgba(30,60,114,0.7) 0%, rgba(42,82,152,0.7) 100%); z-index: 2; }

/* New layout wrappers */
.auth-page { color: #fff; }

.auth-wrapper {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255,255,255,0.10);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
    padding: 36px 32px 28px 32px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.18);
}

.logo { display: block; margin: 0 auto 16px auto; width: 120px; max-width: 50vw; height: auto; }

.login-header h1 { color: #fff; font-weight: 700; font-size: 1.6rem; margin: 0 0 6px 0; letter-spacing: 0.2px; }
.login-header p { color: #e6eaf2; font-size: 0.98rem; margin: 0 0 22px 0; }

/* Form */
.auth-form { margin-top: 6px; }

.input-group { margin-bottom: 18px; text-align: left; }
.input-group label { color: #f5f7fb; font-size: 0.95rem; margin-bottom: 6px; display: block; font-weight: 500; }
.input-group input { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.16); color: #fff; font-size: 1rem; outline: none; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.input-group input::placeholder { color: rgba(255,255,255,0.75); }
.input-group input:focus { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.55); box-shadow: 0 0 0 3px rgba(42,82,152,0.35); }

.form-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px 0; }
.form-row.between { justify-content: space-between; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; color: #e6eaf2; }
.checkbox input { width: 16px; height: 16px; accent-color: #2a5298; }

.login-button { width: 100%; padding: 14px 0; border: none; border-radius: 10px; background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%); color: #fff; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.4px; margin-top: 10px; cursor: pointer; box-shadow: 0 8px 20px rgba(30,60,114,0.25); transition: transform 0.06s ease-in, background 0.2s, box-shadow 0.2s; }
.login-button:hover { background: linear-gradient(90deg, #2a5298 0%, #1e3c72 100%); }
.login-button:active { transform: translateY(1px); }

/* Links and alerts */
.links-inline { display: inline-flex; gap: 10px; align-items: center; }
.link-btn { background: transparent; border: none; color: #fff; text-decoration: underline; font-size: 0.95rem; cursor: pointer; padding: 0; }
.link-btn:hover { color: #ffd700; }

.additional-links { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.additional-links a { color: #fff; text-decoration: underline; font-size: 0.98rem; transition: color 0.2s; }
.additional-links a:hover { color: #ffd700; }

.alert { border-radius: 10px; padding: 10px 12px; font-size: 0.95rem; margin-bottom: 12px; }
.alert.info { color: #d5f3ff; background: rgba(0, 136, 255, 0.15); border: 1px solid rgba(0, 136, 255, 0.35); }
.alert.error { color: #ffdad6; background: rgba(255, 0, 0, 0.12); border: 1px solid rgba(255, 0, 0, 0.32); }

/* Accessibility */
:focus-visible { outline: 2px dashed #ffd700; outline-offset: 2px; }

/* Responsive */
@media (max-width: 600px) {
    .auth-card { padding: 26px 20px 20px 20px; max-width: 96vw; }
    .logo { width: 104px; }
}

@media (min-width: 1200px) {
    .auth-card { padding: 44px 40px 32px 40px; }
}

/* Backwards compatibility: legacy selectors (neutralized) */
.header, .footer { display: none; }
.register-container { display: block; position: relative; z-index: 3; }
.register-header img { width: 100px; margin-bottom: 20px; }
.input-group input::-ms-reveal { filter: invert(100%); }

/* General Styles */
body,
html {
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
    color: #d8968d;
    height: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures footer stays at the bottom */
}

.header {
    background-color: #1a1a1a;
    padding: 20px;
    width: 100%; /* Ensures the header spans the full width */
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    position: relative; /* Allows centering of the h1 */
}

.header h1 {
    margin: 0;
    font-size: 24px;
    position: absolute; /* Allows centering of the h1 */
    left: 50%; /* Start positioning at the center of the header */
    transform: translateX(
        -50%
    ); /* Shift the h1 left by 50% of its width to fully center it */
}

.back-link {
    display: flex;
    align-items: center;
}

.back-icon {
    width: 50px;
    margin-right: 10px;
}

.total-records {
    font-size: 16px;
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.register-container {
    /* background-color: #1a1a1a; */
    margin-top: 50px; /* Adjusted margin-top */
    background: url(https://appstatis2023.oss-cn-hongkong.aliyuncs.com/livemylegends/login-form-bg.png)
        no-repeat;
    background-size: 100% 100%;
    padding: 40px;
    /* border-radius: 25px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5); */
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin-bottom: 20px;
    box-sizing: border-box; /* Ensures padding is included in width */
    align-self: center; /* Center the register-container horizontally */
}

.register-header img {
    width: 100px;
    margin-bottom: 20px;
}

.register-header h1 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #ffffff;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
    color: #d8968d;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
}

.register-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    /* background-color: #d8968d; */
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.register-button:hover {
    background-color: #d8968d;
}

.additional-links {
    margin-top: 20px;
}

.additional-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.additional-links a:hover {
    text-decoration: underline;
}

.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 10px;
    text-align: center;
    width: 100%; /* Ensures the footer spans the full width */
    position: relative;
}

/* --- Auth card overrides to match Sign In exactly (placed last to win the cascade) --- */
.auth-card .input-group label {
    color: #f5f7fb;
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-card .input-group input {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-card .input-group input::placeholder {
    color: rgba(255,255,255,0.75);
}

.auth-card .input-group input:focus {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.55);
    box-shadow: 0 0 0 3px rgba(42,82,152,0.35);
}
