/* 容器样式 */
.auth-bg {
    background: rgb(0, 0, 0, 0.30);
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9;
}
.auth-container, .auth-container div{
    box-sizing: content-box;
}
.auth-container {
    padding: 2.5rem;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: all 0.3s ease;
    min-height: 400px;
    overflow: hidden;
    height: auto;
    position: relative;
    width: 460px;
    margin: 2rem auto;
}

.auth-container:hover {
    transform: translateY(-4px);
}

/* 标签切换 */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab.active {
    background: #4a90e2;
    color: white;
    box-shadow: 0 4px 6px rgba(74, 144, 226, 0.1);
}

/* 表单样式 */
.auth-form {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.auth-form.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    visibility: hidden;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.code-input-group {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 1.2rem;
}

.send-code-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.send-code-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none !important;
}

.send-code-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

@media (max-width: 480px) {
    .code-input-group {
        grid-template-columns: 1fr;
    }

    .send-code-btn {
        width: 100%;
        padding: 12px;
    }
}

.form-input {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: #4a90e2;
    outline: none;
}

/* 密码可见性切换按钮 */
@font-face {
    font-family: 'iconfont';
    src: url('../V2018/iconfont/iconfont.woff2') format('woff2'), url('../V2018/iconfont/iconfont.woff') format('woff'), url('../V2018/iconfont/iconfont.ttf?t=1741931850381') format('truetype');
}

.icon-chakanmima:before {
    content: "\e663";
}

.toggle-password-btn {
    position: absolute;
    z-index: 2;
    right: 16px;
    top: 50px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-btn:hover {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 50%;
}

.toggle-password-btn i {
    font-size: 18px;
    transition: transform 0.2s ease;
    font-family: 'iconfont';
}

.toggle-password-btn .icon-eye-open {
    color: #4a90e2;
}

/* 记住密码 */
.remember-group {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.remember-label {
    margin-left: 8px;
    color: #495057;
    cursor: pointer;
}

/* 按钮样式 */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4a90e2 0%, #2672c8 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.2);
}

/* 错误提示 */
.error-message,
.code-error-message {
    color: #ef4444;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-message.show,
.code-error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.code-error-message {
    position: absolute;
    bottom: -28px;
    left: 0;
    width: 100%;
}

.error-message {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ff0000;
    background-color: #ffe6e6;
    border: 1px solid #ffcccc;
    padding: 10px;
    border-radius: 6px;
    margin-top: 18px;
    display: inline-block;
    transition: all 0.3s ease;
}


/* 新增标签样式 */
.form-label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

/* 优化表单容器 */
.auth-forms-container {
    position: relative;
    min-height: 380px;
    transition: height 0.3s ease;
}

/* 表单定位优化 */
.auth-form {
    position: absolute;
    left: 0;
    right: 0;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.success-message {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    opacity: 0;
    z-index: 9999;
    animation: successSlideIn 0.5s ease forwards;
}

@keyframes successSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


/* 倒计时按钮样式 */
.send-code-btn.paused {
    background: #f59e0b !important;
    position: relative;
}

.pause-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: grid;
    place-items: center;
}

.icon-play {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #4f46e5;
}

/* 取消登录按钮样式 */
.cancel-btn {
    width: 100%;
    padding: 14px;
    background: #6c757d;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 117, 125, 0.2);
}
