:root {
    --auth-primary: #2f6bff;
    --auth-primary-dark: #1d4ed8;
    --auth-primary-soft: rgba(47, 107, 255, 0.12);
    --auth-accent: #60a5fa;
    --auth-card: rgba(255, 255, 255, 0.86);
    --auth-text: #1f2937;
    --auth-muted: #8b95a5;
    --auth-border: #dbe3f0;
    --auth-border-focus: #2f6bff;
    --auth-error: #dc2626;
    --auth-success: #16a34a;
    --auth-input-bg: #f5f8fc;
    --auth-paper: #f3f7ff;
    --auth-shadow: 0 18px 50px rgba(37, 99, 235, 0.12), 0 2px 10px rgba(15, 23, 42, 0.05);
    --font-display: "Fraunces", "Songti SC", "Noto Serif SC", serif;
    --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--auth-text);
    background-color: #eef3f8;
    background-image: url("/img/deepseek-bg.png");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
}

.auth-atmosphere {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(238, 243, 248, 0.08) 45%, rgba(214, 226, 242, 0.22) 100%);
}

.auth-brand-block {
    position: fixed;
    top: 28px;
    left: 36px;
    z-index: 5;
}

.auth-brand {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #1e3a8a;
    line-height: 1.15;
}

.auth-brand span {
    margin: 0 8px;
    color: var(--auth-accent);
    font-weight: 560;
}

.auth-tagline {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--auth-muted);
    letter-spacing: 0.08em;
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 28px;
    padding: 88px 0 40px;
}

.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 8px 12px 12px;
    animation: hero-in 0.7s ease both;
}

.auth-hero-art {
    width: min(100%, 560px);
    height: auto;
    display: block;
    margin-top: 8px;
    filter: drop-shadow(0 18px 30px rgba(37, 99, 235, 0.12));
}

.float-leaf {
    animation: float-soft 7s ease-in-out infinite;
    transform-origin: center;
}

@keyframes float-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    animation: card-in 0.75s ease 0.08s both;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card {
    width: 100%;
    max-width: 460px;
    min-height: 440px;
    background: var(--auth-card);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 0;
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    position: relative;
}

.auth-body {
    padding: 40px 40px 32px;
    min-height: 440px;
    display: flex;
    flex-direction: column;
}

.auth-body #authForm {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-heading {
    margin-bottom: 28px;
}

.auth-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--auth-text);
    letter-spacing: 0.01em;
}

.auth-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--auth-muted);
}

.auth-field {
    margin-bottom: 18px;
}

.auth-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--auth-border);
    border-radius: 0;
    background: var(--auth-input-bg);
    min-height: 52px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input-wrap:focus-within {
    border-color: var(--auth-border-focus);
    background: #fff;
    box-shadow: 0 0 0 4px var(--auth-primary-soft);
}

.auth-input-wrap:focus-within .field-icon {
    color: var(--auth-primary);
}

.field-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    flex-shrink: 0;
    color: #94a3b8;
    transition: color 0.2s;
}

.auth-input-wrap .prefix {
    padding-right: 10px;
    color: var(--auth-text);
    font-size: 15px;
    white-space: nowrap;
    border-right: 1px solid var(--auth-border);
    margin-right: 10px;
    line-height: 1;
}

.auth-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 14px 14px 0;
    font-size: 16px;
    background: transparent;
    width: 100%;
    color: var(--auth-text);
    font-family: inherit;
}

.auth-input-wrap input::placeholder {
    color: #a8b3c4;
}

.auth-input-wrap .inline-btn {
    border: none;
    background: transparent;
    color: var(--auth-primary);
    font-size: 14px;
    font-weight: 600;
    padding: 0 14px;
    height: 52px;
    cursor: pointer;
    white-space: nowrap;
    border-left: 1px solid var(--auth-border);
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}

.auth-input-wrap .inline-btn:hover:not(:disabled) {
    color: var(--auth-primary-dark);
    background: rgba(47, 107, 255, 0.06);
}

.auth-input-wrap .inline-btn:disabled {
    color: var(--auth-muted);
    cursor: not-allowed;
    background: transparent;
}

.auth-btn {
    width: 100%;
    border: none;
    border-radius: 0;
    background: linear-gradient(180deg, #4c86ff 0%, var(--auth-primary) 55%, var(--auth-primary-dark) 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    padding: 15px;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 10px 22px rgba(47, 107, 255, 0.28);
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
    font-family: inherit;
}

.auth-btn:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(47, 107, 255, 0.32);
}

.auth-btn:active {
    transform: translateY(0) scale(0.99);
}

.auth-btn:disabled {
    filter: grayscale(0.15);
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.auth-message {
    min-height: 22px;
    font-size: 13px;
    margin: 14px 0 0;
    text-align: center;
}

.auth-message.error { color: var(--auth-error); }
.auth-message.success {
    color: var(--auth-success);
    background: rgba(22, 163, 74, 0.08);
    border-radius: 0;
    padding: 6px 12px;
    display: inline-block;
    width: 100%;
}

.auth-hint {
    margin: auto 0 0;
    padding-top: 28px;
    text-align: center;
    font-size: 12px;
    color: #9aa5b5;
    letter-spacing: 0.02em;
}

/* ===== 滑动拼图验证 ===== */
.slide-modal[hidden] {
    display: none !important;
}

.slide-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
}

.slide-panel {
    position: relative;
    width: min(360px, calc(100vw - 32px));
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 0;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.18);
    padding: 18px 18px 16px;
    animation: card-in 0.28s ease;
}

.slide-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 6px;
}

.slide-close {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #9aa5b5;
    cursor: pointer;
    padding: 0 4px;
}

.slide-close:hover { color: var(--auth-text); }

.slide-tip {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--auth-muted);
}

.slide-tip.success { color: var(--auth-success); }
.slide-tip.error { color: var(--auth-error); }

.slide-puzzle {
    position: relative;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    background: #e8f0ff;
    margin-bottom: 14px;
    user-select: none;
}

.slide-bg {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
}

.slide-piece {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: auto;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.slide-track {
    position: relative;
    height: 44px;
    border-radius: 0;
    background: #f3f6fb;
    border: 1px solid var(--auth-border);
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

.slide-track.active {
    border-color: var(--auth-primary);
}

.slide-track.ok {
    border-color: var(--auth-success);
    background: rgba(22, 163, 74, 0.08);
}

.slide-track.fail {
    border-color: var(--auth-error);
}

.slide-track-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #9aa5b5;
    pointer-events: none;
}

.slide-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--auth-primary-soft);
}

.slide-track.ok .slide-fill {
    background: rgba(22, 163, 74, 0.18);
}

.slide-knob {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
    color: var(--auth-primary);
    font-size: 18px;
    font-weight: 700;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 0;
}

.slide-knob:active { cursor: grabbing; }

.slide-knob.ok {
    background: var(--auth-success);
    color: #fff;
}

.slide-knob.fail {
    background: var(--auth-error);
    color: #fff;
}

.slide-refresh {
    display: block;
    margin: 12px auto 0;
    border: none;
    background: transparent;
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.slide-refresh:hover {
    color: var(--auth-primary-dark);
}

@media (max-width: 960px) {
    .auth-brand-block {
        position: static;
        text-align: center;
        padding: 24px 16px 0;
    }

    .auth-shell {
        width: min(520px, calc(100% - 32px));
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px 0 40px;
    }

    .auth-hero {
        padding: 0;
    }

    .auth-hero-art {
        width: min(100%, 360px);
        max-height: 200px;
        margin: 0 auto;
    }

    .auth-card {
        max-width: none;
        min-height: 0;
    }

    .auth-body {
        padding: 32px 24px 28px;
        min-height: 0;
    }

    .auth-title {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .leaf,
    .float-leaf,
    .auth-hero,
    .auth-panel,
    .auth-card,
    .slide-panel {
        animation: none !important;
    }
}
