/* ============================================================
   MetaLab Auth Styles — 注册/登录页面专属样式
   ============================================================ */

/* ---------- Auth Page Layout ---------- */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 20px;
}

.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--color-border);
}

.auth-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: .4rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--color-secondary);
    font-size: .95rem;
    margin-bottom: 2rem;
}

/* ---------- Registration Closed Notice ---------- */
.registration-closed {
    text-align: center;
    padding: 2.5rem 1rem;
    margin-bottom: .5rem;
}

.registration-closed .closed-message {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: .5rem;
}

.registration-closed .closed-subtitle {
    font-size: .9rem;
    color: var(--color-secondary);
}

/* ---------- Form ---------- */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: .4rem;
}

.form-group input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(52,152,219,.15);
}

.form-group input.error {
    border-color: var(--color-danger);
}

.form-error {
    color: var(--color-danger);
    font-size: .8rem;
    margin-top: .3rem;
    display: none;
}

.guidelines-link {
    font-size: .85rem;
    color: var(--color-text-light);
    text-align: center;
    margin: 1.2rem 0;
}

.guidelines-link a {
    color: var(--color-accent);
    font-weight: 500;
    transition: var(--transition);
}

.guidelines-link a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: .85rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: #2980b9;
}

.submit-btn:disabled {
    background: #b0bec5;
    cursor: not-allowed;
}

/* ---------- Remember Me ---------- */
.remember-group {
    margin-bottom: 1rem;
}
.remember-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    cursor: pointer;
    user-select: none;
}
.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent);
    cursor: pointer;
}
.remember-hint {
    display: block;
    font-size: .78rem;
    color: var(--color-secondary);
    margin-top: .3rem;
    margin-left: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .9rem;
    color: var(--color-secondary);
}

.auth-footer a {
    color: var(--color-accent);
    font-weight: 500;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ---------- Modal ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--color-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--color-secondary);
    cursor: pointer;
    padding: .2rem;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.5rem 1rem;
    font-size: .92rem;
    line-height: 1.8;
    color: var(--color-text);
}

.modal-body h4 {
    font-size: 1.05rem;
    color: var(--color-primary);
    margin: 1.2rem 0 .5rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: .8rem;
}

.modal-body .red {
    color: var(--color-danger);
    font-weight: 600;
}

.modal-body .highlight {
    color: var(--color-danger);
    font-weight: 700;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: .6rem;
}

.timer {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--color-secondary);
    font-size: .9rem;
    font-weight: 500;
}

.timer .count {
    color: var(--color-accent);
    font-weight: 700;
    min-width: 1.5em;
    text-align: center;
}

.timer.done .count {
    color: #27ae60;
}

.confirm-btn {
    padding: .6rem 1.8rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.confirm-btn:hover {
    background: #2980b9;
}

.confirm-btn:disabled {
    background: #b0bec5;
    cursor: not-allowed;
}

.scroll-hint {
    color: var(--color-danger);
    font-size: .82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    background: #27ae60;
    color: #fff;
    padding: .85rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    z-index: 3000;
    box-shadow: 0 6px 20px rgba(39,174,96,.35);
    transition: transform .4s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: var(--color-danger);
    box-shadow: 0 6px 20px rgba(231,76,60,.35);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.8rem;
    }
    .modal {
        max-height: 90vh;
    }
    .modal-body {
        font-size: .85rem;
    }
}
