/*
 * PHPDisk 用户认证页面样式
 * 适用于：登录、注册、找回密码等页面
 */

/* 认证页面容器 */
.auth-wrapper {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
}

/* 认证卡片 */
.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    animation: fadeInUp 0.5s ease-out;
}

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

/* 认证头部 */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.auth-header .logo {
    color: #2563eb;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: #64748b;
    font-size: 0.9rem;
}

/* 表单样式 */
.auth-card .form-floating {
    margin-bottom: 1rem;
}

.auth-card .form-floating > .form-control {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 1rem 0.75rem;
    height: calc(3.5rem + 2px);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card .form-floating > .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-card .form-floating > label {
    padding: 1rem 0.75rem;
    color: #94a3b8;
}

/* 复选框样式 */
.auth-card .form-check {
    margin-bottom: 1.5rem;
}

.auth-card .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* 提交按钮 */
.btn-auth {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-auth:hover {
    transform: translateY(-2px);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

.btn-auth:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* 页脚链接 */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.auth-footer a {
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer a {
    color: #2563eb;
}

/* 提示框 */
.auth-card .alert {
    border-radius: 10px;
    border: none;
    padding: 0.875rem 1rem;
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    background: #e2e8f0;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background 0.3s;
}

.password-strength-bar.weak {
    width: 33%;
    background: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background: #22c55e;
}

.password-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* 服务条款文本 */
.terms-text {
    font-size: 0.85rem;
    color: #64748b;
}

.terms-text a {
    color: #2563eb;
}

/* 输入组样式 */
.auth-card .input-group-text {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #64748b;
}

.auth-card .input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.auth-card .input-group .form-control:focus {
    border-color: #e2e8f0;
    box-shadow: none;
}

.auth-card .input-group:focus-within .input-group-text,
.auth-card .input-group:focus-within .form-control {
    border-color: var(--primary-color);
}

/* 验证码输入框样式 */
.captcha-group {
    margin-bottom: 1rem;
}

.captcha-group .form-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.captcha-group .form-label i {
    color: #2563eb;
    margin-right: 0.5rem;
}

.captcha-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.captcha-input-group .form-control {
    flex: 1;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.625rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-align: center;
    text-transform: uppercase;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
    height: 40px;
}

.captcha-input-group .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
    outline: none;
}

.captcha-refresh-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 1rem;
}

.captcha-refresh-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
    transform: rotate(180deg);
}

.captcha-refresh-btn:active {
    transform: rotate(180deg) scale(0.95);
}

/* 验证码反馈提示 */
.captcha-feedback {
    margin-top: 0.5rem;
    min-height: 22px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.captcha-feedback.text-success {
    color: #16a34a !important;
    font-weight: 600;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-left: 3px solid #16a34a;
}

.captcha-feedback.text-success i {
    font-size: 1.1rem;
    color: #16a34a !important;
}

.captcha-feedback.text-success span {
    color: #16a34a !important;
    font-weight: 600;
}

.captcha-feedback.text-danger {
    color: #dc2626 !important;
    font-weight: 600;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 3px solid #dc2626;
}

.captcha-feedback.text-danger i {
    font-size: 1.1rem;
    color: #dc2626 !important;
}

.captcha-feedback.text-danger span {
    color: #dc2626 !important;
    font-weight: 600;
}

.captcha-feedback.text-info {
    color: #2563eb !important;
    font-weight: 500;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 3px solid #2563eb;
}

.captcha-feedback.text-info i {
    font-size: 1.1rem;
    color: #2563eb !important;
}

.captcha-feedback.text-info span {
    color: #2563eb !important;
    font-weight: 500;
}

/* 验证码浮动弹窗 */
.captcha-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.captcha-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.captcha-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.captcha-popup-header span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
}

.captcha-popup-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
}

.captcha-popup-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.captcha-popup-body {
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.captcha-popup-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.2s;
    display: block;
    margin: 0 auto;
}

.captcha-popup-image:hover {
    transform: scale(1.02);
}

.captcha-popup-tip {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .auth-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .auth-header .logo {
        font-size: 2rem;
    }
    
    .auth-header h2 {
        font-size: 1.25rem;
    }
    
    .captcha-input-group {
        flex-direction: column;
    }
    
    .captcha-refresh-btn {
        width: 100%;
        height: 44px;
    }
}

