﻿/* 注册页面专属样式 */

/* 动画背景 */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    overflow: hidden;
}

/* 浮动装饰元素 */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -100px;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    bottom: -125px;
    left: 30%;
    animation-delay: 10s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    top: 20%;
    right: 20%;
    animation-delay: 15s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* 增强的认证包装器 */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* 玻璃态效果卡片 */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 图标包装器 */
.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    }
}

/* 表单组动画 */
.form-group-animated {
    position: relative;
    transition: all 0.3s ease;
}

.form-group-animated.focused .form-label {
    color: #667eea;
    font-weight: 600;
}

/* 输入框增强 */
.input-with-icon {
    position: relative;
}

.input-with-icon .form-control {
    padding-right: 45px;
    transition: all 0.3s ease;
}

.input-with-icon .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 验证图标 */
.validation-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    display: none;
    z-index: 10;
    animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.3);
    }

    50% {
        transform: translateY(-50%) scale(1.1);
    }

    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.form-group-animated.is-valid .validation-icon {
    display: block;
}

/* 密码切换按钮 */
.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 10;
    transition: all 0.3s ease;
}

.btn-toggle-password:hover {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background-color: #dee2e6;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#strengthLabel {
    font-weight: 600;
    margin-left: 5px;
}

/* 验证码按钮 */
.btn-code {
    white-space: nowrap;
    min-width: 120px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-code:hover:not(:disabled) {
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 渐变按钮 */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

.btn-gradient:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 链接样式 */
.link-login {
    color: #667eea;
    transition: all 0.3s ease;
}

.link-login:hover {
    color: #764ba2;
    transform: translateX(2px);
    display: inline-block;
}

.link-home {
    transition: all 0.3s ease;
}

.link-home:hover {
    color: #667eea !important;
    transform: translateX(-3px);
    display: inline-block;
}

/* 输入框样式增强 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.form-group-animated.focused .input-group-text {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

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

.input-group .form-control:focus+.input-group-text,
.form-control:focus~.input-group-text {
    border-color: #667eea;
}

/* 无效反馈 */
.invalid-feedback {
    display: none;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 5px;
}

.form-group-animated.is-invalid .invalid-feedback {
    display: block;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .auth-card {
        padding: 30px 20px;
    }

    .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .auth-header h3 {
        font-size: 1.5rem;
    }

    .btn-code {
        font-size: 0.85rem;
        min-width: 100px;
        padding: 0.375rem 0.5rem;
    }

    .floating-shape {
        opacity: 0.5;
    }
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border {
    animation: spin 0.75s linear infinite;
}