@import url("./style.css");

.auth-main {
    padding: 0 5vw 48px;
}

.auth-hero {
    margin: 0 5vw 28px;
}

.auth-panel-wrap {
    max-width: 420px;
    margin: 0 auto;
    animation: authPanelIn 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes authPanelIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-panel {
    position: relative;
    padding: 26px 24px 28px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(140, 180, 230, 0.5);
    box-shadow: 0 20px 50px rgba(4, 39, 92, 0.12);
    overflow: hidden;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto;
    height: 120px;
    background: linear-gradient(105deg, rgba(90, 212, 255, 0.35), rgba(79, 141, 255, 0.08), transparent);
    pointer-events: none;
    animation: authShimmer 8s ease-in-out infinite alternate;
}

@keyframes authShimmer {
    from {
        transform: translateX(-8%) rotate(-2deg);
        opacity: 0.85;
    }
    to {
        transform: translateX(8%) rotate(2deg);
        opacity: 1;
    }
}

.auth-panel-heading {
    position: relative;
    margin: 0 0 6px;
    font-size: 22px;
    color: #0a3c86;
}

.auth-panel .auth-lead {
    position: relative;
    margin: 0 0 22px;
    font-size: 13px;
    color: #5a7399;
    line-height: 1.5;
}

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

.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #3b5571;
}

.auth-field input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border-radius: 12px;
    border: 1px solid rgba(140, 180, 230, 0.65);
    background: rgba(250, 252, 255, 0.95);
    color: #082642;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: rgba(79, 141, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(79, 141, 255, 0.2);
}

/* 密码框 + 显示/隐藏 */
.auth-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-password-wrap input {
    width: 100%;
    padding-right: 72px;
}

.auth-toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #2a5cad;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(140, 180, 230, 0.7);
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-toggle-password:hover {
    background: #fff;
    border-color: rgba(79, 141, 255, 0.85);
    color: #0a4ea8;
}

.auth-toggle-password:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 141, 255, 0.45);
}

.auth-field-row .auth-inline {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.auth-field-row .auth-inline input {
    flex: 1;
    min-width: 0;
}

.auth-field-row .auth-inline .btn {
    flex-shrink: 0;
    white-space: nowrap;
    font: inherit;
    cursor: pointer;
}

/* 发送验证码：主按钮样式、加载与冷却态 */
.auth-send-code {
    min-width: 118px;
    padding: 11px 14px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3d7dff, #2563eb);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.auth-send-code:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.auth-send-code:active:not(:disabled) {
    transform: translateY(0);
}

.auth-send-code:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.auth-send-code.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.auth-send-code.is-cooldown {
    background: linear-gradient(135deg, #64748b, #475569);
    box-shadow: 0 2px 10px rgba(71, 85, 105, 0.35);
}

@media (max-width: 420px) {
    .auth-field-row .auth-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-send-code {
        width: 100%;
        min-width: 0;
    }
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    align-items: center;
}

.auth-actions .btn.primary {
    border: none;
    cursor: pointer;
    font: inherit;
}

.auth-msg {
    margin-top: 14px;
    min-height: 1.2em;
    font-size: 13px;
    color: #c0392b;
}

.auth-msg.is-ok {
    color: #1e7a4a;
}

.auth-alt {
    position: relative;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(140, 180, 230, 0.35);
    font-size: 13px;
    color: #5a7399;
}

.auth-alt a {
    color: #0a4ea8;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .auth-panel-wrap,
    .auth-panel::before {
        animation: none !important;
    }
}
