/* 现代化认证页面样式 */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

/* 认证页面动态背景效果 */
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation: floatBubble 20s ease-in-out infinite;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation: floatBubble 15s ease-in-out infinite reverse;
}

@keyframes floatBubble {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* 添加流星效果 */
.auth-wrapper .meteor {
    position: absolute;
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
    animation: meteor 3s linear infinite;
    opacity: 0;
}

.auth-wrapper .meteor:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.auth-wrapper .meteor:nth-child(2) {
    top: 30%;
    left: 60%;
    animation-delay: 1.5s;
}

.auth-wrapper .meteor:nth-child(3) {
    top: 50%;
    left: 40%;
    animation-delay: 3s;
}

@keyframes meteor {
    0% {
        transform: translateY(-100vh) translateX(0) rotate(-45deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(-50px) rotate(-45deg);
        opacity: 0;
    }
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-header {
    margin-bottom: 2rem;
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.brand-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.5);
}

.auth-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* 表单浮动标签样式 */
.form-floating {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-floating > .form-control {
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 1rem 1rem;
    font-size: 0.9375rem;
    height: auto;
    transition: all 0.2s ease;
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: var(--bg-primary);
}

.form-floating > label {
    color: var(--text-muted);
    padding: 1rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
    font-weight: 500;
}

/* 复选框样式 */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.form-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.form-check input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

.form-check input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-check label {
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    margin: 0;
}

.form-check label:hover {
    color: var(--primary-color);
}

/* 按钮样式 */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4);
}

.btn-gradient:active {
    transform: translateY(0);
}

/* 链接样式 */
.text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.text-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 分隔线 */
.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(148, 163, 184, 0) 0%, 
        rgba(148, 163, 184, 0.4) 50%, 
        rgba(148, 163, 184, 0) 100%
    );
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* 图形验证码 */
.image-code {
    width: 100%;
    height: 54px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    object-fit: cover;
}

.image-code:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.prompt-image-code {
    width: 100%;
    height: 54px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-image-code:hover {
    border-color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .brand-icon {
        width: 64px;
        height: 64px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeIn 0.5s ease-out;
}

/* 自定义滚动条 */
.auth-wrapper::-webkit-scrollbar {
    width: 8px;
}

.auth-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.auth-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.auth-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 错误提示样式 */
.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: var(--danger-color);
    margin-top: 0.5rem;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* OAuth 按钮样式 */
.btn-ghost {
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color);
    color: var(--text-secondary);
    background: transparent;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-ghost:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-style: solid;
}

/* 额外的美化 */
.d-grid {
    margin-top: 1rem;
}

.small {
    font-size: 0.875rem;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

