﻿/* Auth pages (login/register/recovery) */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

html[data-theme="light"] body.login-page,
html[data-theme="light"] body.login-page .auth-page {
    --bg-primary: #FFFFFF;
    --bg-secondary: #FFFFFF;
    --bg-input: #FFFFFF;
    background: #FFFFFF;
    background-color: #FFFFFF;
}

#register-page.auth-page,
#recovery-page.auth-page {
    display: none;
}

.auth-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
    background-image: linear-gradient(rgba(240, 185, 11, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 185, 11, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
}

.auth-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.auth-toggle {
    position: absolute;
    top: 20px;
    z-index: 100;
}

.auth-toggle--lang {
    right: 64px;
}

.auth-toggle--theme {
    right: 20px;
}

.auth-theme-icon-hidden {
    display: none;
}

.auth-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    padding: 40px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.auth-container--center {
    align-items: center;
}

.auth-container--start {
    align-items: flex-start;
}

.auth-stats {
    flex: 1;
    text-align: center;
    padding: 40px;
}

.auth-stats--top {
    padding-top: 80px;
}

.auth-hero {
    margin-bottom: 50px;
}

.auth-hero--compact {
    margin-bottom: 40px;
}

.auth-hero__title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 1px;
}

.auth-hero__brand {
    font-size: 48px;
    color: #F0B90B;
}

.auth-hero__card-wrap {
    margin-top: 40px;
    position: relative;
}

.auth-hero__card {
    padding: 30px;
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.08), rgba(252, 213, 53, 0.05));
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(240, 185, 11, 0.4);
    box-shadow: 0 0 30px rgba(240, 185, 11, 0.5), 0 0 60px rgba(240, 185, 11, 0.3), inset 0 0 20px rgba(240, 185, 11, 0.1);
}

.auth-hero__motto {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #F0B90B, #FCD535);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: 3px;
    line-height: 1.3;
    text-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
}

.auth-hero__subtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 16px 0 0;
    letter-spacing: 2px;
    font-style: italic;
    opacity: 0.9;
    font-family: 'Georgia', serif;
}

.auth-hero__tagline {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.auth-hero__tagline-text {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 1px;
}

.auth-count {
    margin-bottom: 30px;
}

.auth-count__row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.auth-count__number {
    font-size: 56px;
    font-weight: 700;
    color: #F0B90B;
    letter-spacing: 2px;
    line-height: 1.2;
    font-family: 'Arial', sans-serif;
    text-shadow: 0 0 20px rgba(240, 185, 11, 0.5);
}

.auth-count__plus {
    font-size: 24px;
    color: #F0B90B;
    font-weight: 600;
}

.auth-count__label {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.auth-count__label--spaced {
    margin-top: 12px;
}

.auth-highlights {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.auth-highlights--compact {
    gap: 40px;
}

.auth-highlight {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.auth-highlight__text--compact {
    text-align: left;
}

.auth-highlight__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-highlight__title--small {
    font-size: 14px;
}

.auth-highlight__desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-highlight__desc--small {
    font-size: 12px;
}

.auth-highlight__icon {
    color: #0ECB81;
    font-size: 24px;
}

.auth-box {
    position: relative;
    margin-top: 30px;
}

.auth-box--login {
    flex: 0 0 460px;
    max-width: 460px;
    background: #FFFFFF;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(240, 185, 11, 0.1);
}

.auth-box--register {
    flex: 0 0 488px;
    max-width: 488px;
    padding: 20px 24px;
}

.auth-box--recovery {
    flex: 0 0 420px;
    max-width: 420px;
}

.auth-logo {
    position: absolute;
    top: -35px;
    left: 20px;
    z-index: 10;
}

.auth-logo__image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.auth-header {
    margin-bottom: 36px;
    margin-top: 10px;
}

.auth-header--compact {
    margin-bottom: 12px;
    margin-top: 30px;
}

.auth-header--recovery {
    margin-top: 10px;
}

.auth-header__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
}

.auth-header__title--small {
    font-size: 22px;
    margin-bottom: 4px;
}

.auth-header__subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0 0;
}

.auth-header__subtitle--small {
    font-size: 12px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.auth-tab--active {
    color: #F0B90B;
    font-weight: 600;
}

.auth-tab__indicator {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #F0B90B;
    display: none;
}

.auth-tab__indicator--active {
    display: block;
}

.auth-field {
    margin-bottom: 20px;
    position: relative;
}

.auth-field--compact {
    flex: 1;
    position: relative;
    height: 52px;
    margin-bottom: 0;
}

.auth-field--flex {
    flex: 1;
    margin-bottom: 0;
}

.auth-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.auth-row--mb {
    margin-bottom: 10px;
}

.auth-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--border-color, #E5E7EB);
    background: var(--bg-secondary, #FFFFFF);
    color: var(--text-primary, #111827);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-input--compact {
    height: 100%;
    padding: 0 18px;
}

.auth-input--code {
    letter-spacing: 4px;
}

.auth-input--code-small {
    letter-spacing: 2px;
}

.auth-input--code-large {
    letter-spacing: 4px;
    text-align: center;
    font-size: 18px;
}

.auth-captcha-image {
    height: 52px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid var(--border-color, #E5E7EB);
    display: block;
    box-sizing: border-box;
}

.auth-captcha-image--small {
    height: 40px;
    border-radius: 4px;
    border-width: 1px;
}

.auth-captcha-error {
    display: none;
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger);
}

.auth-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.auth-btn--primary {
    background: linear-gradient(135deg, #F0B90B, #FCD535);
    color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(240, 185, 11, 0.3);
}

.auth-btn--outline {
    margin-top: 12px;
    background: transparent;
    border: 2px solid #F0B90B;
    color: #F0B90B;
    box-shadow: none;
}

.auth-btn--code {
    min-width: 120px;
    height: 52px;
    padding: 0 16px;
    background: linear-gradient(135deg, #F0B90B, #FCD535);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.auth-btn--code-small {
    min-width: 100px;
    height: 40px;
    padding: 0 12px;
    background: #F0B90B;
    color: var(--text-primary);
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.auth-btn--compact {
    padding: 10px;
    font-size: 14px;
}

.auth-btn--secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.auth-btn--spaced {
    margin-bottom: 16px;
}

.auth-footer {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer--compact {
    margin-top: 10px;
    padding-top: 10px;
}

.auth-footer__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-footer__text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1;
}

.auth-footer__text--small {
    font-size: 12px;
}

.auth-footer__link {
    color: #F0B90B;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    line-height: 1;
}

.auth-footer__link--small {
    font-size: 12px;
    font-weight: 500;
}

.auth-footer__divider {
    width: 1px;
    height: 16px;
    background: var(--border-color);
}

.auth-link-accent {
    color: #F0B90B;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.auth-link-secondary {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.auth-license-card {
    margin-top: 24px;
    padding: 18px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.auth-license-status {
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
}

.auth-disclaimer {
    width: 100%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.auth-disclaimer__content {
    max-width: 800px;
    margin: 0 auto 12px auto;
    text-align: center;
    padding: 0 16px;
}

.auth-disclaimer__text {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.8;
    margin: 0;
}

.auth-disclaimer__link {
    color: #F0B90B;
    font-weight: 600;
    text-decoration: none;
}

.auth-disclaimer__highlight {
    color: #F0B90B;
}

.auth-disclaimer__footer {
    text-align: center;
}

.auth-disclaimer__copyright {
    color: var(--text-tertiary);
    font-size: 12px;
    margin: 0;
    opacity: 0.7;
}

.auth-remember {
    margin-bottom: 28px;
    position: relative;
}

.auth-remember__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
}

.auth-remember__group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-checkbox {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    accent-color: #F0B90B !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 101 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.auth-checkbox--small {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    accent-color: #F0B90B !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
}

.auth-checkbox-label {
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    cursor: pointer !important;
    user-select: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 101 !important;
}

.auth-remember-warning {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);
    border: 1px solid #F6465D;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(246, 70, 93, 0.15);
    z-index: 1001;
    min-width: 280px;
    max-width: 350px;
    pointer-events: none;
}

.auth-remember-warning__row {
    display: flex;
    align-items: start;
    gap: 10px;
}

.auth-remember-warning__title {
    color: #F6465D;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.auth-remember-warning__desc {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.auth-slider-block {
    margin-bottom: 10px;
}

.auth-slider-status {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    display: none;
}

.auth-terms {
    margin: 10px 0;
    padding: 8px 10px;
    border: 2px solid #F0B90B;
    border-radius: 6px;
    background: var(--bg-secondary);
}

.auth-terms__row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
}

.auth-terms__label {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.35;
    cursor: pointer;
    user-select: none;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
}

.auth-checkbox:disabled + .auth-terms__label {
    cursor: not-allowed;
    opacity: 0.72;
}

.auth-terms__link {
    color: #F0B90B;
    text-decoration: none;
    font-weight: 500;
    margin-right: 2px;
    transition: color 0.2s ease;
}

.auth-terms__link.is-read {
    color: #02C076;
}

.auth-terms__link.is-read::after {
    content: ' 已读';
    font-size: 10px;
    font-weight: 700;
}

.auth-terms__hint {
    display: block;
    color: #F0B90B;
    font-size: 11px;
    margin-top: 6px;
    margin-left: 20px;
}

.auth-terms__hint.is-complete {
    color: #02C076;
}

.auth-terms__error {
    display: none;
    color: #F6465D;
    font-size: 11px;
    margin-top: 6px;
    margin-left: 20px;
}

.auth-recovery {
    margin-bottom: 30px;
}

.auth-recovery__icon {
    font-size: 80px;
    color: #F0B90B;
    margin-bottom: 20px;
}

.auth-recovery__title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 12px;
    line-height: 1.3;
}

.auth-recovery__desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.6;
}

.recovery-step {
    display: block;
}

#recovery-step-2,
#recovery-step-3 {
    display: none;
}

.recovery-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.recovery-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background: var(--border-color);
    color: var(--text-tertiary);
}

.recovery-step-dot--active {
    background: #F0B90B;
    color: var(--text-primary);
}

.recovery-step-dot--pending {
    background: var(--border-color);
    color: var(--text-tertiary);
}

.recovery-step-dot--done {
    background: #0ECB81;
    color: #fff;
}

.recovery-step-line {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    align-self: center;
}

.recovery-step-line--done {
    background: #0ECB81;
}

.recovery-info {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-left: 3px solid #F0B90B;
}

.recovery-info__text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.recovery-info__highlight {
    color: #F0B90B;
    font-weight: 600;
}

.recovery-code-section {
    display: none;
}

.recovery-resend {
    text-align: center;
    margin-top: 16px;
}

.recovery-resend__text {
    color: var(--text-tertiary);
    font-size: 13px;
}

.recovery-resend__link {
    color: #F0B90B;
    font-size: 13px;
    text-decoration: none;
    margin-left: 4px;
}

.recovery-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

#email-login-form {
    display: none;
}

/* Legacy ID hooks */
#send-email-code-btn {
    background: #F0B90B;
    color: var(--text-primary);
    border: none;
    font-weight: 500;
}

#send-email-code-btn:hover:not(:disabled) {
    background: #FCD535;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(240, 185, 11, 0.3);
}

#send-email-code-btn:active:not(:disabled) {
    transform: translateY(0);
}

#send-email-code-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

#remember-password {
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
    width: 18px;
    height: 18px;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    display: inline-block;
}

/* Auth page theme/lang toggles */
.auth-page .theme-toggle-btn,
#activation-page .theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--theme-toggle-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-page .theme-toggle-btn:hover,
#activation-page .theme-toggle-btn:hover {
    background: var(--bg-tertiary);
    border-color: #F0B90B;
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
    color: var(--theme-toggle-color-hover);
}

.auth-page .theme-toggle-btn .theme-icon,
#activation-page .theme-toggle-btn .theme-icon {
    font-size: 24px;
    line-height: 1;
}

#theme-toggle-login.theme-toggle-btn,
#theme-toggle-register.theme-toggle-btn,
#theme-toggle-recovery.theme-toggle-btn,
#theme-toggle-activation.theme-toggle-btn {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--theme-toggle-color);
    z-index: 10001;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#theme-toggle-login.theme-toggle-btn:hover,
#theme-toggle-register.theme-toggle-btn:hover,
#theme-toggle-recovery.theme-toggle-btn:hover,
#theme-toggle-activation.theme-toggle-btn:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--theme-toggle-color-hover);
    transform: scale(1.08);
}

.auth-page .lang-toggle-btn,
#activation-page .lang-toggle-btn {
    position: fixed;
    top: 20px;
    right: 72px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--theme-toggle-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-page .lang-toggle-btn:hover,
#activation-page .lang-toggle-btn:hover {
    background: var(--bg-tertiary);
    border-color: #F0B90B;
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.25);
    color: var(--theme-toggle-color-hover);
}

#lang-toggle-login.lang-toggle-btn,
#lang-toggle-register.lang-toggle-btn,
#lang-toggle-recovery.lang-toggle-btn,
#lang-toggle-activation.lang-toggle-btn {
    position: fixed !important;
    top: 16px !important;
    right: 60px !important;
    height: 28px;
    min-width: 28px;
    padding: 0 6px;
    border: none;
    background: transparent;
    box-shadow: none;
    color: var(--theme-toggle-color);
    z-index: 10001;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#lang-toggle-login.lang-toggle-btn:hover,
#lang-toggle-register.lang-toggle-btn:hover,
#lang-toggle-recovery.lang-toggle-btn:hover,
#lang-toggle-activation.lang-toggle-btn:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--theme-toggle-color-hover);
    transform: scale(1.08);
}

/* Activation page */
.activation-header {
    position: relative;
    padding-top: 20px;
}
.activation-back-btn {
    position: absolute;
    top: -10px;
    left: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}
.activation-back-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Auth hover states */
.auth-input-focus:focus {
    border-color: #F0B90B;
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.2);
    outline: none;
}

.auth-btn-primary-hover:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(240, 185, 11, 0.45);
}

.auth-btn-outline-hover:hover {
    background: #F0B90B;
    color: #1E2329;
    box-shadow: 0 8px 20px rgba(240, 185, 11, 0.3);
}

.auth-btn-code-hover:hover {
    background: #FCD535;
    color: #1E2329;
}

.auth-link-accent:hover {
    color: #FCD535;
    text-decoration: underline;
}

.auth-link-underline:hover {
    text-decoration: underline;
}

.auth-link-highlight:hover {
    color: #F0B90B;
}

/* ========================================================================== */
/* Auth layout overrides (ensure auth-pages win over modern-theme login rules) */
/* ========================================================================== */
body #login-page.auth-page,
body #register-page.auth-page,
body #recovery-page.auth-page {
    position: relative;
    padding: 0;
}

body #login-page.auth-page .login-container.auth-container,
body #register-page.auth-page .login-container.auth-container,
body #recovery-page.auth-page .login-container.auth-container {
    width: min(1200px, 100%);
    max-width: 1200px;
}

@media (max-width: 768px) {
    .auth-box--register {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .auth-terms__label {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

/* ========================================================================== */
/* 登录页面样式统一修复 */
/* ========================================================================== */

/* 统一输入框圆角 */
.auth-input,
.auth-page input[type="text"],
.auth-page input[type="password"],
.auth-page input[type="email"] {
    border-radius: 4px !important;
}

/* 统一验证码图片圆角 */
.auth-captcha-image {
    border-radius: 4px !important;
}

/* 统一按钮样式 */
.auth-btn {
    border-radius: 4px !important;
    
}

.auth-btn--code {
    border-radius: 4px !important;
    max-width: none;
}

/* 发送验证码按钮 */
#send-email-code-btn {
    border-radius: 4px !important;
}

/* 登录按钮和自助购买按钮 - 胶囊形状 */
.auth-btn--primary,
.auth-btn--outline {
    border-radius: 8px !important;
    padding: 12px 32px !important;
}

/* 自助购买激活码按钮 - 白色背景 */
.auth-btn--outline {
    background: #FFFFFF !important;
    border: 1px solid var(--border-color, #E5E7EB) !important;
    color: #F0B90B !important;
}
.auth-btn--outline:hover {
    background: #F9FAFB !important;
    border-color: #F0B90B !important;
}

/* 验证码图片高度与输入框一致 */
.auth-captcha-image {
    height: 100% !important;
    min-height: 44px !important;
    object-fit: contain;
}

/* 验证码图片与输入框等高 */
.auth-row .auth-captcha-image {
    height: 44px !important;
    box-sizing: border-box !important;
}

/* 减少登录按钮上方的间距 */
.auth-btn--primary {
    margin-top: 8px !important;
}
.auth-btn--outline {
    margin-top: 8px !important;
}

/* 减少验证码区域下方的间距 */
.auth-field {
    margin-bottom: 12px !important;
}
.auth-remember {
    margin-bottom: 8px !important;
}

/* 邮箱验证码登录 - 统一输入框和按钮高度 */
.auth-row .auth-field--compact {
    height: auto !important;
}
.auth-row .auth-field--compact .auth-input--compact {
    height: 44px !important;
    padding: 0 16px !important;
}
.auth-btn--code {
    height: 44px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
}

/* 邮箱验证码输入框 - 强制统一高度 */
#login-email-code {
    height: 44px !important;
    min-height: 44px !important;
    padding: 12px 16px !important;
    box-sizing: border-box !important;
}
#send-login-code-btn {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 24px !important;
}
.auth-field--compact {
    height: 44px !important;
}

/* 邮箱验证码输入框 - 增加宽度 */
#login-email-code {
    flex: 1 !important;
    min-width: 0 !important;
}
.auth-row {
    display: flex !important;
    gap: 12px !important;
}
.auth-row .auth-field--compact {
    flex: 1 !important;
}
#send-login-code-btn {
    flex-shrink: 0 !important;
    width: auto !important;
}

/* ========================================================================== */
/* 激活页面样式修复 */
/* ========================================================================== */

/* Logo不被截断 */
.activation-card {
    overflow: visible !important;
    margin-top: 40px !important;
}

/* 激活页面输入框圆角统一 */
#activation-page input[type="text"],
#activation-page input[type="password"] {
    border-radius: 4px !important;
}

/* 激活页面按钮圆角统一 */
#activation-page .btn-login {
    border-radius: 8px !important;
}

/* 机器码复制按钮圆角 */
#activation-page button[data-activation-action="copy-machine-id"] {
    border-radius: 4px !important;
}

#activation-page .input-with-icon--required::after {
    content: '*';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    color: #F6465D;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.auth-page .input-with-icon--required::after {
    content: '*';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    color: #F6465D;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.auth-page .auth-terms__label--required::before {
    content: '* ';
    color: #F6465D;
    font-weight: 700;
}

/* 注册页面 - 邮箱验证码输入框和按钮 */
#register-page {
    --register-side-control-width: 98px;
}

#reg-email-code {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 16px;
    width: 100%;
}

#register-page #reg-email-captcha-img,
#send-email-code-btn {
    flex: 0 0 var(--register-side-control-width);
    height: 44px;
    min-width: var(--register-side-control-width);
    width: var(--register-side-control-width);
}

#send-email-code-btn {
    flex-shrink: 0;
    padding: 0 10px;
    font-size: 14px;
    white-space: nowrap;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-secondary, #6b7280);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 4px;
    cursor: pointer;
    box-shadow: none;
}

#send-email-code-btn:hover:not(:disabled) {
    background: var(--bg-tertiary, #f9fafb);
    border-color: #d1d5db;
}

#send-email-code-btn:disabled {
    background: var(--bg-secondary, #ffffff);
    color: var(--text-disabled, #9ca3af);
    border-color: var(--border-color, #e5e7eb);
    cursor: not-allowed;
    opacity: 1;
}

#send-email-code-btn.is-ready {
    background: var(--color-primary, #F0B90B);
    color: var(--color-primary-text, #1f2937);
    border-color: var(--color-primary, #F0B90B);
}

#send-email-code-btn.is-ready:hover:not(:disabled) {
    background: var(--color-primary-hover, #f5c518);
    border-color: var(--color-primary-hover, #f5c518);
}

#send-email-code-btn.is-ready:disabled {
    background: #f7d76a;
    color: #1f2937;
    border-color: #f1cb57;
}

.auth-row-hint {
    display: block;
    margin: 2px 2px 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-tertiary);
}

.auth-row-hint--warning {
    color: #F0B90B;
}

.auth-row-hint--success {
    color: #02C076;
}

.auth-row-hint--danger {
    color: #F6465D;
}

#register-page .auth-row.auth-row--tight {
    gap: 8px;
}

#register-page .auth-row.auth-row--tight .auth-field--flex {
    flex: 1 1 auto;
    min-width: 0;
}

#register-page .auth-terms {
    padding: 8px 8px;
}

#register-page .auth-terms__row {
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
}

#register-page .auth-terms__label {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0 3px;
    min-width: 0;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
}

#register-page .auth-terms__label > span {
    flex-shrink: 0;
}

#register-page .auth-terms__link {
    flex-shrink: 0;
    margin-right: 0;
}

#register-page .auth-terms__link.is-read::after {
    content: '✓';
    margin-left: 1px;
    font-size: 9px;
    font-weight: 800;
}

#register-page .auth-checkbox--small {
    align-self: center;
}

/* ========================================================================== */
/* 登录页公告中心 */
/* ========================================================================== */
.auth-announcement {
    margin: 28px auto 0;
    width: min(520px, 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.auth-announcement__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.auth-announcement__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-announcement__refresh {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-announcement__refresh:hover {
    background: rgba(240, 185, 11, 0.12);
}

.auth-announcement__list {
    max-height: 220px;
    overflow: auto;
    padding: 8px 0;
}

.auth-announcement__skeleton {
    display: flex;
    flex-direction: column;
}

.auth-announcement__skeleton-item {
    padding: 10px 14px;
    border-left: 3px solid transparent;
    border-bottom: 1px dashed var(--border-color);
}

.auth-announcement__skeleton-item:last-child {
    border-bottom: none;
}

.auth-announcement__skeleton-item--latest {
    border-left-color: rgba(240, 185, 11, 0.45);
    background: rgba(240, 185, 11, 0.05);
}

.auth-announcement__skeleton-header,
.auth-announcement__skeleton-body {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-announcement__skeleton-header {
    justify-content: space-between;
}

.auth-announcement__skeleton-body {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 8px;
    gap: 8px;
}

.auth-announcement__skeleton-line {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--skeleton-base, #E5E7EB) 25%,
        var(--skeleton-highlight, #F3F4F6) 50%,
        var(--skeleton-base, #E5E7EB) 75%
    );
    background-size: 200% 100%;
    animation: auth-announcement-skeleton-shimmer 1.35s ease-in-out infinite;
}

.auth-announcement__skeleton-line--title {
    width: 42%;
    max-width: 180px;
    height: 14px;
}

.auth-announcement__skeleton-line--time {
    width: 84px;
    flex: 0 0 84px;
}

.auth-announcement__skeleton-line--content {
    width: 100%;
}

.auth-announcement__skeleton-line--content-short {
    width: 72%;
}

.auth-announcement__empty {
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-announcement__item {
    padding: 10px 14px;
    border-left: 3px solid transparent;
    border-bottom: 1px dashed var(--border-color);
}

.auth-announcement__item:last-child {
    border-bottom: none;
}

.auth-announcement__item--latest {
    border-left-color: var(--color-primary);
    background: rgba(240, 185, 11, 0.08);
}

.auth-announcement__item-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.auth-announcement__item-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
}

.auth-announcement__item-time {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.auth-announcement__item-content {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.55;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

@keyframes auth-announcement-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-announcement__skeleton-line {
        animation: none;
    }
}

@media (max-width: 1360px) {
    .auth-announcement {
        margin-top: 22px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .auth-announcement {
        margin-top: 16px;
        border-radius: 10px;
    }
    .auth-announcement__list {
        max-height: 180px;
    }
}
