﻿:root {
    --auth-bg-start: #4f46e5;
    --auth-bg-end: #7c3aed;
    --auth-panel-tint: rgba(255, 255, 255, 0.14);
    --auth-card-bg: rgba(255, 255, 255, 0.96);
    --auth-card-border: rgba(255, 255, 255, 0.32);
    --auth-text-primary: #1f2546;
    --auth-text-secondary: #5a6287;
    --auth-accent: #22d3ee;
    --auth-shadow: 0 32px 60px rgba(31, 38, 135, 0.28);
    --auth-radius-lg: 28px;
    --auth-radius-sm: 14px;
}

/* 重置body样式以确保全屏背景 */
body {
    margin: 0;
    padding: 0;
    background: none;
}

.auth-wrapper {
    min-height: 100vh;
    width: 100vw;
    display: grid;
    grid-template-columns: minmax(320px, 470px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 6vw, 88px);
    padding: clamp(32px, 6vw, 72px);
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 55%),
                radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.12), transparent 50%),
                linear-gradient(135deg, var(--auth-bg-start), var(--auth-bg-end));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 160"><g fill="rgba(255,255,255,0.12)"><circle cx="20" cy="20" r="1.5"/><circle cx="90" cy="60" r="1.2"/><circle cx="140" cy="120" r="2"/></g></svg>');
    opacity: 0.35;
    pointer-events: none;
}

.auth-card,
.auth-hero {
    position: relative;
    z-index: 1;
    max-width: 1420px;
    margin: 0 auto;
}

.auth-wrapper {
    display: block;
}

.auth-wrapper .auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: clamp(40px, 8vw, 120px);
    padding: clamp(40px, 8vw, 80px);
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2vh;
    padding-bottom: 14vh;
}

.auth-card {
    grid-column: 1;
    justify-self: end;
    background: var(--auth-card-bg);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-card-border);
    padding: clamp(36px, 5vw, 52px);
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: min(480px, 100%);
    max-width: 480px;
}

.auth-card__header h2 {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--auth-text-primary);
}

.auth-card__header p {
    margin: 0.4rem 0 0;
    color: var(--auth-text-secondary);
    font-size: 0.95rem;
}

.auth-card__highlight {
    border-radius: var(--auth-radius-sm);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(14, 165, 233, 0.18));
    border: 1px solid rgba(34, 211, 238, 0.35);
    padding: 1.25rem;
    display: grid;
    gap: 0.8rem;
}

.auth-card__highlight-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #065f8d;
}

.auth-card__highlight-meta {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.9rem;
}

.auth-card__highlight-meta div {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    color: #0f2935;
}

.auth-card__highlight dt {
    font-weight: 600;
}

.auth-card__highlight dd {
    margin: 0;
    padding: 0.1rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.55);
    color: #0f2935;
    font-weight: 500;
}

.auth-helper__button {
    justify-self: flex-start;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 1.4rem;
    background: rgba(34, 211, 238, 0.18);
    color: #0369a1;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-helper__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.25);
}

.auth-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: var(--auth-radius-sm);
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: slideDown 0.3s ease-out;
    border-left: 4px solid;
}

.auth-alert--error {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.8);
    color: #b91c1c;
    border-left-color: #ef4444;
}

.auth-alert--success {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.8);
    color: #059669;
    border-left-color: #10b981;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert i.material-icons {
    font-size: 22px;
    flex-shrink: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-field {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-field input {
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1.8px solid #e2e6f5;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    color: var(--auth-text-primary);
}

.form-field input::placeholder {
    color: transparent;
}

.form-field label {
    position: absolute;
    inset: 0 auto auto 1.1rem;
    transform: translateY(1rem);
    background: #fff;
    padding: 0 0.45rem;
    color: #7a82a6;
    transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
    pointer-events: none;
}

.form-field input:focus,
.form-field input:not(:placeholder-shown) {
    border-color: var(--auth-bg-start);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.18);
    transform: translateY(-1px);
}

.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label {
    transform: translateY(-0.6rem);
    font-size: 0.78rem;
    color: var(--auth-bg-start);
    font-weight: 600;
}

.form-tip {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: var(--auth-text-secondary);
}

.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.form-checkbox input {
    position: absolute;
    opacity: 0;
}

.form-checkbox__decor {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid #d1d5f0;
    display: grid;
    place-items: center;
    color: white;
    background: transparent;
    transition: all 0.2s ease;
}

.form-checkbox input:checked + .form-checkbox__decor {
    background: var(--auth-bg-start);
    border-color: var(--auth-bg-start);
}

.form-checkbox__decor i.material-icons {
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.form-checkbox input:checked + .form-checkbox__decor i.material-icons {
    opacity: 1;
}

.form-checkbox__label {
    color: var(--auth-text-secondary);
    font-size: 0.9rem;
}

.form-link {
    color: var(--auth-bg-start);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    position: relative;
}

.form-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.form-link:hover::after {
    transform: scaleX(1);
}

.form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 18px;
    width: 100%;
    padding: 1.05rem;
    background: linear-gradient(135deg, var(--auth-bg-start), var(--auth-bg-end));
    color: white;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 44px rgba(79, 70, 229, 0.4);
}

.form-button.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.form-button.is-loading .form-button__label::after {
    content: '';
    width: 1em;
    height: 1em;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    margin-left: 0.5rem;
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--auth-text-secondary);
}

.auth-footer a {
    color: var(--auth-bg-start);
    font-weight: 600;
    text-decoration: none;
}

.form-field input.is-invalid {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18);
    animation: shake 0.3s ease-in-out;
}

.form-field input.is-valid {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.auth-hero {
    grid-column: 2;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-inline: 0;
}

.auth-hero__card {
    max-width: 480px;
    width: min(100%, 480px);
    padding: clamp(28px, 4vw, 40px);
    border-radius: var(--auth-radius-lg);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(26px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    box-shadow:
        0 25px 50px rgba(20, 20, 43, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-hero__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
}

.auth-hero__card h1 {
    margin-top: 0;
}

.auth-hero__badge {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.auth-hero__title {
    font-size: clamp(2rem, 3.5vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-hero__subtitle {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 24px 0;
    opacity: 0.9;
    font-weight: 400;
}

.auth-hero__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.auth-hero__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--auth-radius-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-hero__list li:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.auth-hero__list i.material-icons {
    font-size: 20px;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.auth-hero__list span {
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0.95;
}

.auth-hero__list span strong {
    font-weight: 600;
    color: #e0e7ff;
}

.auth-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item {
    text-align: center;
    padding: 12px;
    border-radius: var(--auth-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 500;
}

.auth-hero__footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.auth-hero__footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
    font-style: italic;
}

.auth-hero__footer strong {
    color: #22d3ee;
    font-weight: 600;
    font-style: normal;
}

.auth-wrapper::after,
.auth-card__highlight {
    backdrop-filter: blur(16px);
}

.form-field input.is-invalid {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18);
}

.form-field input.is-valid {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

@media (max-width: 1024px) {
    .auth-wrapper .auth-grid {
        grid-template-columns: 1fr;
        gap: clamp(32px, 6vw, 60px);
        padding: clamp(32px, 6vw, 60px);
        text-align: center;
        padding-top: 1.5vh;
        padding-bottom: 10vh;
    }

    .auth-card {
        justify-self: center;
        width: min(500px, 100%);
        max-width: 500px;
    }

    .auth-hero {
        grid-column: 1;
        justify-content: center;
        order: -1;
    }

    .auth-hero__card {
        padding: 28px;
        text-align: center;
    }

    .auth-hero__stats {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 24px;
    }
}

@media (max-width: 640px) {
    .auth-wrapper .auth-grid {
        padding: 24px 20px;
        gap: 24px;
        padding-top: 1vh;
        padding-bottom: 8vh;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .auth-hero__card {
        padding: 24px;
    }

    .auth-hero__stats {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 24px;
    }

    .stat-item {
        padding: 16px;
    }

    .form-extras {
        flex-direction: column;
        align-items: flex-start;
    }
}
