/* ==================== CSS变量 ==================== */
:root {
    /* 主色调 */
    --primary-color: #FF6B6B;
    --primary-dark: #EE5A52;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --accent-purple: #A8E6CF;
    
    /* 背景色 */
    --bg-dark: #1A1A2E;
    --bg-darker: #0F0F1E;
    --bg-light: #16213E;
    
    /* 文字颜色 */
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8D1;
    --text-muted: #7A7A9D;
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    --gradient-secondary: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    --gradient-accent: linear-gradient(135deg, #FFE66D 0%, #FFAB73 100%);
    --gradient-bg: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F0F1E 100%);
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(255, 107, 107, 0.3);
    
    /* 动画时长 */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
}

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
}

/* ==================== 背景动画形状 ==================== */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    top: 50%;
    right: -200px;
    animation-delay: 5s;
}

.shape-3 {
    width: 600px;
    height: 600px;
    background: var(--accent-color);
    bottom: -300px;
    left: 30%;
    animation-delay: 10s;
}

.shape-4 {
    width: 350px;
    height: 350px;
    background: var(--accent-purple);
    top: 20%;
    left: 10%;
    animation-delay: 15s;
}

/* ==================== 粒子效果 ==================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

/* ==================== 主容器 ==================== */
.register-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideIn 0.6s ease-out;
}

/* ==================== 左侧装饰区域 ==================== */
.register-visual {
    background: var(--gradient-primary);
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.register-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.visual-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-logo {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-se {
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo-dash {
    color: rgba(255, 255, 255, 0.8);
}

.logo-me {
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.visual-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.visual-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.visual-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.visual-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    width: 100%;
    transition: all var(--transition-normal);
    animation: slideInLeft 0.6s ease-out backwards;
}

.visual-feature:nth-child(1) { animation-delay: 0.2s; }
.visual-feature:nth-child(2) { animation-delay: 0.4s; }
.visual-feature:nth-child(3) { animation-delay: 0.6s; }

.visual-feature:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.25);
}

.feature-icon {
    font-size: 2rem;
}

.visual-feature span {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

/* ==================== 右侧表单区域 ==================== */
.register-form-container {
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-wrapper {
    width: 100%;
    max-width: 450px;
}

.form-header {
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.6s ease-out 0.2s backwards;
}

.form-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==================== 表单样式 ==================== */
.register-form {
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.label-icon {
    font-size: 1.2rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-normal);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.form-input:focus ~ .input-border {
    width: 100%;
}

/* ==================== 验证码按钮 ==================== */
.code-wrapper {
    display: flex;
    gap: 0.8rem;
}

.code-wrapper .form-input {
    flex: 1;
}

.send-code-btn {
    padding: 0 1.5rem;
    background: var(--gradient-secondary);
    color: white;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    font-family: inherit;
}

.send-code-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

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

/* ==================== 密码切换按钮 ==================== */
.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity var(--transition-normal);
    padding: 0.5rem;
}

.toggle-password:hover {
    opacity: 1;
}

/* ==================== 密码强度指示器 ==================== */
.password-strength {
    margin-top: 0.8rem;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all var(--transition-normal);
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: #FF6B6B;
}

.strength-fill.medium {
    width: 66%;
    background: #FFE66D;
}

.strength-fill.strong {
    width: 100%;
    background: #4ECDC4;
}

.strength-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==================== 提交按钮 ==================== */
.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all var(--transition-normal);
    margin-top: 2rem;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text, .btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon {
    display: none;
}

.submit-btn.loading .btn-loader {
    display: block;
}

/* ==================== 提示信息 ==================== */
.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    text-align: center;
    display: none;
    animation: slideInUp 0.3s ease-out;
}

.form-message.show {
    display: block;
}

.form-message.success {
    background: rgba(78, 205, 196, 0.15);
    color: #4ECDC4;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.form-message.error {
    background: rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* ==================== 表单底部 ==================== */
.form-footer {
    margin-top: 2rem;
    text-align: center;
    animation: fadeIn 0.6s ease-out 0.6s backwards;
}

.form-footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-normal);
}

.footer-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

.back-home {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition-normal);
    display: inline-block;
}

.back-home:hover {
    color: var(--text-primary);
}

/* ==================== 动画关键帧 ==================== */
@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(5deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(3deg);
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 968px) {
    .register-container {
        grid-template-columns: 1fr;
        margin: 1rem;
    }
    
    .register-visual {
        padding: 3rem 2rem;
    }
    
    .brand-logo {
        font-size: 2.5rem;
    }
    
    .visual-title {
        font-size: 2rem;
    }
    
    .visual-subtitle {
        font-size: 1rem;
    }
    
    .register-form-container {
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {
    .register-visual {
        display: none;
    }
    
    .register-form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .register-container {
        margin: 0;
    }
    
    .register-form-container {
        padding: 2rem 1rem;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .code-wrapper {
        flex-direction: column;
    }
    
    .send-code-btn {
        width: 100%;
        padding: 1rem;
    }
}

