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

/* 认证页面容器 */
.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: 800px;
    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: 1.625rem 0.75rem 0.625rem 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);
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.auth-card .form-floating > .form-control:focus ~ label,
.auth-card .form-floating > .form-control:not(:placeholder-shown) ~ label,
.auth-card .form-floating > .form-control:-webkit-autofill ~ label,
.auth-card .form-floating.has-value > label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #2563eb;
}

.auth-card .form-floating > .form-control::placeholder {
    color: transparent;
}

.auth-card .form-floating > label {
    padding: 1rem 0.75rem;
    color: #94a3b8;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 1.5rem);
}

/* 复选框样式 */
.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;
    position: relative;
}

.captcha-group .row {
    position: relative;
}

.captcha-group .row > [class*="col-"]:first-child {
    position: relative;
}

.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;
    min-height: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    height: 100%;
}

.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;
    bottom: 100%;
    left: 0;
    width: 300px;
    margin-bottom: 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;
}

/* 两列布局样式 */
.auth-card .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.auth-card .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* 密码强度提示在两列布局中的样式 */
.auth-card .row .password-strength {
    margin-top: 0.5rem;
}

.auth-card .row .password-hint {
    margin-top: 0.25rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .auth-card {
        max-width: 100%;
    }
    
    .auth-card .row > [class*="col-md-"] {
        margin-bottom: 1rem;
    }
    
    /* 移动端密码强度提示全宽显示 */
    .auth-card .row .password-strength,
    .auth-card .row .password-hint {
        margin-top: 0.5rem;
    }
}

@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;
    }
    
    /* 移动端验证码反馈信息全宽显示 */
    .captcha-group .row > [class*="col-md-"] {
        margin-bottom: 0.5rem;
    }
    
    .captcha-feedback {
        margin-top: 0.5rem;
        min-height: auto;
    }
    
    /* 移动端弹窗宽度调整 */
    .captcha-popup {
        width: 100%;
        left: 0;
        right: 0;
    }
}

/* GDPR 同意选项样式 */
.gdpr-consent-group {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.gdpr-consent-group .form-label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: block;
}

.gdpr-consent-options {
    margin-bottom: 0.5rem;
}

.gdpr-consent-options .form-check {
    margin-bottom: 0.5rem;
    padding-left: 1.75rem;
}

.gdpr-consent-options .form-check-input {
    margin-top: 0.25rem;
}

.gdpr-consent-options .form-check-label {
    cursor: pointer;
    color: #475569;
    font-size: 0.95rem;
}

.gdpr-consent-group .form-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* 移动端 GDPR 样式调整 */
@media (max-width: 768px) {
    .gdpr-consent-group {
        padding: 0.875rem;
    }
    
    .gdpr-consent-group .form-label {
        font-size: 0.95rem;
    }
    
    .gdpr-consent-group .form-text {
        font-size: 0.8125rem;
    }
}

/* Gmail 登录按钮样式（白色 Google 风格按钮） */
.btn-auth.btn-gmail {
    background: #ffffff !important;
    border: 1px solid #dadce0 !important;
    color: #3c4043 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 1px 2px rgba(60, 64, 67, 0.15);
    text-transform: none;
}
.btn-auth.btn-gmail:hover {
    background: #f8f9fa !important;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.35), 0 1px 4px rgba(60, 64, 67, 0.2);
}

.btn-auth.btn-gmail:active {
    background: #f1f3f4 !important;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.btn-auth.btn-gmail .google-icon-wrapper {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-auth.btn-gmail .google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-auth.btn-gmail .google-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    vertical-align: middle;
}

.btn-auth.btn-gmail .google-btn-text {
    font-size: 0.95rem;
    font-weight: 500;
}

