/* 登录注册页面通用高端样式 - 统一设计语言 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gold-gradient: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 16px 64px rgba(0, 0, 0, 0.2);
}

/* 统一背景样式 */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 70%, #667eea 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
}








/* 页面整体容器 */
.page {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    height: 100vh;
    padding-bottom: 120px;
    display: flex;
    flex-direction: column;
}

/* 现代化头部样式 */
.header-bar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-bar .title {
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.header-bar a,
.language-switcher {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-bar a:hover,
.language-switcher:hover {
    transform: translateY(-2px);
}

/* 通用容器样式 */
.login-container,
.signup-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
}

.login-container {
    justify-content: center;
}

/* 通用头部区域 */
.login-header,
.signup-header {
    text-align: center;
    margin-bottom: 0px;
}

.logo-container {
    margin-bottom: 25px;
}

.logo-icon {
    margin-bottom: 0px;
    display: inline-block;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.logo-title {
    font-size: 36px;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
    font-family: 'Arial Black', Arial, sans-serif;
    background: linear-gradient(45deg, #fff, #f0f0f0, #fff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.welcome-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
}

.welcome-title {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

/* 通用面板样式 */
.login-panel,
.signup-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    overflow: hidden;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.transaction-panel {
    padding: 30px;
}

/* 输入组样式 */
.input-group {
    margin-bottom: 25px;
    width: 100%
}

.input-label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    z-index: 2;
    pointer-events: none;
}

.premium-input {
    width: 100%;
    padding: 20px 20px 20px 55px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.4s ease;
    outline: none;
    min-height: 56px;
}

.premium-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.premium-input:focus {
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 40px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.01);
}

/* 下拉框样式 */
.premium-select {
    padding-left: 55px;
    padding-right: 45px;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.7)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    cursor: pointer;
}

/* 密码切换按钮 */
.password-toggle {
    position: absolute;
    right: 18px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

/* 密码输入包装器（注册页面专用）*/
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .premium-input {
    padding-right: 55px;
}

/* 验证码容器样式 */
.captcha-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input-wrapper {
    flex: 1;
}

.captcha-input {
    padding-right: 20px !important;
}

.captcha-image-container {
    position: relative;
    width: 120px;
    height: 56px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.captcha-image-container:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

.captcha-image {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

/* 验证码容器（注册页面专用）*/
.captcha-container {
    margin-bottom: 25px;
}

/* 高端按钮样式 */
.premium-submit-btn,
.premium-step-btn {
    width: 100%;
    padding: 18px 25px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #ffa500 100%);
    color: #333;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 30px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.premium-submit-btn {
    margin: 30px 0;
}

/* 上一步按钮样式 */
.step-btn-prev {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1) !important;
}

.step-btn-prev:hover {
    box-shadow: 0 15px 50px rgba(255, 255, 255, 0.2) !important;
}

/* 按钮光效 */
.premium-submit-btn::before,
.premium-step-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.premium-submit-btn:hover::before,
.premium-step-btn:hover::before {
    left: 100%;
}

.premium-submit-btn:hover,
.premium-step-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 15px 50px rgba(255, 215, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.premium-submit-btn:active,
.premium-step-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon {
    position: relative;
    z-index: 2;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.premium-submit-btn:hover .btn-shine,
.premium-step-btn:hover .btn-shine {
    transform: translateX(100%);
}

/* 步骤导航按钮 */
.step-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.step-navigation .premium-step-btn {
    flex: 1;
    margin: 0;
}

/* 认证链接样式 */
.auth-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    margin-right: 8px;
    font-weight: 500;
}

.auth-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: width 0.3s ease;
}

.auth-link:hover {
    color: #ffb347;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
}

.auth-link:hover::after {
    width: 100%;
}

/* 进度指示器样式（注册页面专用）*/
.progress-tracker {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 25px 20px;
    gap: 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.step-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.progress-step.active .step-number {
    background: var(--gold-gradient);
    border-color: #ffd700;
    color: #333;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.progress-step.active .step-label {
    color: white;
}

.progress-step.completed .step-number {
    background: #2ed573;
    border-color: #2ed573;
    color: white;
    box-shadow: 0 5px 20px rgba(46, 213, 115, 0.4);
}

.progress-step.completed .step-label {
    color: rgba(255, 255, 255, 0.8);
}

.progress-line {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.progress-line.completed {
    background: #2ed573;
    box-shadow: 0 2px 10px rgba(46, 213, 115, 0.3);
}

/* 步骤容器 */
.step-container {
    display: none;
}

.step-container.active {
    display: block;
}

/* 状态样式 */
.premium-input.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.premium-input.success {
    border-color: #2ed573;
    box-shadow: 0 0 20px rgba(46, 213, 115, 0.3);
}

/* 移动端响应式设计 */
@media (max-width: 480px) {
    .page {
        height: auto;
        min-height: 100vh;
    }
    
    .header-bar {
        padding: 15px;
    }
    
    .header-bar .title {
        font-size: 18px;
    }
    
    .login-container,
    .signup-container {
        padding: 15px;
    }
    
    .logo-title {
        font-size: 28px;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .welcome-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .transaction-panel {
        padding: 25px 20px;
    }
    
    .input-group {
        margin-bottom: 20px;
    }
    
    .premium-input {
        padding: 16px 18px 16px 50px;
        font-size: 15px;
        min-height: 52px;
    }
    
    .captcha-wrapper {
        gap: 10px;
    }
    
    .captcha-image-container {
        width: 100px;
        height: 52px;
    }
    
    .progress-tracker {
        padding: 25px 20px 15px;
        gap: 15px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .progress-line {
        width: 45px;
    }
    
    .premium-submit-btn,
    .premium-step-btn {
        font-size: 15px;
        padding: 16px 20px;
    }
}

@media (min-width: 768px) {
    .page {
        max-width: 600px;
        margin: 0 auto;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    }
}

/* iOS安全区域适配 */
@supports (padding-top: env(safe-area-inset-top)) {
    .header-bar {
        padding-top: calc(20px + env(safe-area-inset-top));
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .page {
        padding-bottom: calc(120px + env(safe-area-inset-bottom));
    }
}

/* 触摸反馈增强 */
.premium-submit-btn:active,
.premium-step-btn:active,
.auth-link:active {
    transform: scale(0.95);
}

/* 加载动画 */
@keyframes loadingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading .premium-submit-btn,
.loading .premium-step-btn {
    animation: loadingPulse 1.5s ease-in-out infinite;
    pointer-events: none;
}

/* 深色模式优化 */
@media (prefers-color-scheme: dark) {
    .premium-input {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .premium-input:focus {
        background: rgba(255, 255, 255, 0.1);
    }
}