/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: #0F0F12;
    color: #E5E7EB;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 侧边导航栏样式 */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1a1a20 0%, #151519 100%);
    border-right: 1px solid #2D2D35;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

/* Logo区域 */
.logo-section {
    padding: 24px 20px;
    border-bottom: 1px solid #2D2D35;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-icon i {
    color: white;
    font-size: 18px;
}

.logo-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: #F9FAFB;
    margin: 0;
}

.logo-text span {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 400;
}

/* 导航菜单 */
.nav-section {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #9CA3AF;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #E5E7EB;
    transform: translateX(4px);
}

.nav-item:focus {
    outline: none;
    background: rgba(99, 102, 241, 0.08);
    color: #E5E7EB;
}

.nav-item:active {
    outline: none;
    background: rgba(99, 102, 241, 0.12);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #6366F1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-item span:not(.badge) {
    font-size: 14px;
}

.badge {
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: auto;
    font-weight: 600;
}

/* 用户信息区域 */
.user-section {
    padding: 20px;
    border-top: 1px solid #2D2D35;
    background: rgba(20, 20, 25, 0.5);
}

.user-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar i {
    color: #D1D5DB;
    font-size: 20px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: #F9FAFB;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credits {
    font-size: 11px;
    color: #10B981;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    width: fit-content;
    white-space: nowrap;
}

.credits i {
    font-size: 9px;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-recharge {
    flex: 1;
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-recharge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.btn-logout {
    flex: 1;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px 40px;
    background: #0F0F12;
    min-height: 100vh;
}

.header {
    text-align: center;
    margin-bottom: 48px;
}

.header h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #F9FAFB 0%, #D1D5DB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.header p {
    font-size: 18px;
    color: #9CA3AF;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* 功能卡片网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: linear-gradient(145deg, #1A1A20 0%, #151519 100%);
    border: 1px solid #2D2D35;
    border-radius: 20px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-image {
    margin-bottom: 20px;
}

.image-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.image-placeholder i {
    font-size: 32px;
    color: #6366F1;
    opacity: 0.7;
}

.feature-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #F9FAFB;
    margin-bottom: 8px;
}

.feature-content p {
    font-size: 14px;
    color: #9CA3AF;
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-cost {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    width: fit-content;
}

.feature-cost i {
    font-size: 10px;
}

.feature-btn {
    width: 100%;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

.feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

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

/* 移动端顶部导航 */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: linear-gradient(135deg, #1a1a20 0%, #151519 100%);
    border-bottom: 1px solid #2D2D35;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    height: 56px;
}

.mobile-menu-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #6366F1;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.mobile-menu-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    margin: 0 16px;
}

.mobile-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.mobile-logo-icon i {
    color: white;
    font-size: 16px;
}

.mobile-logo span {
    font-size: 16px;
    font-weight: 600;
    color: #F9FAFB;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-credits {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.mobile-credits i {
    font-size: 10px;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-delay-600 { animation-delay: 0.6s; }

/* ========== 全局提示组件样式 ========== */

/* Toast 提示样式 */
.toast-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
}

/* Toast位置样式 */
.toast-container-top-right {
    top: 20px;
    right: 20px;
}

.toast-container-top-left {
    top: 20px;
    left: 20px;
}

.toast-container-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container-bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-container-bottom-left {
    bottom: 20px;
    left: 20px;
}

.toast-container-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.toast {
    background: #1A1A20;
    border: 1px solid #2D2D35;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    min-width: 300px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 不同位置的Toast初始状态 */
.toast-top-right, .toast-bottom-right {
    transform: translateX(400px);
}

.toast-top-left, .toast-bottom-left {
    transform: translateX(-400px);
}

.toast-top-center, .toast-bottom-center {
    transform: translateY(-50px);
}

.toast-center {
    transform: translate(-50%, -50%) scale(0.8);
    min-width: 350px;
    max-width: 500px;
}

/* Toast显示状态 */
.toast.show.toast-top-right, .toast.show.toast-bottom-right,
.toast.show.toast-top-left, .toast.show.toast-bottom-left {
    transform: translateX(0);
    opacity: 1;
}

.toast.show.toast-top-center, .toast.show.toast-bottom-center {
    transform: translateY(0);
    opacity: 1;
}

.toast.show.toast-center {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* 兼容旧版本（默认右上角） */
.toast.show:not([class*="toast-"]) {
    transform: translateX(0);
    opacity: 1;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.toast-success .toast-icon { background: #10B981; color: white; }
.toast-error .toast-icon { background: #EF4444; color: white; }
.toast-warning .toast-icon { background: #F59E0B; color: white; }
.toast-info .toast-icon { background: #3B82F6; color: white; }

.toast-title {
    font-weight: 600;
    font-size: 14px;
}

.toast-success .toast-title { color: #10B981; }
.toast-error .toast-title { color: #EF4444; }
.toast-warning .toast-title { color: #F59E0B; }
.toast-info .toast-title { color: #3B82F6; }

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: rgba(107, 114, 128, 0.1);
    color: #D1D5DB;
}

.toast-message {
    color: #D1D5DB;
    font-size: 14px;
    line-height: 1.4;
}

/* 确认对话框样式 */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: linear-gradient(145deg, #1A1A20 0%, #151519 100%);
    border: 1px solid #2D2D35;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.confirm-overlay.show .confirm-modal {
    transform: translateY(0) scale(1);
}

.confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 20px;
}

.confirm-warning .confirm-icon { background: #F59E0B; color: white; }
.confirm-error .confirm-icon { background: #EF4444; color: white; }
.confirm-info .confirm-icon { background: #3B82F6; color: white; }
.confirm-success .confirm-icon { background: #10B981; color: white; }

/* 无图标版本样式 */
.confirm-modal.confirm-no-icon {
    text-align: center;
}

.confirm-modal.confirm-no-icon .confirm-title {
    margin-bottom: 12px;
    margin-top: 0;
}

.confirm-modal.confirm-no-icon .confirm-message {
    margin-bottom: 20px;
}

.confirm-title {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #F9FAFB;
    margin-bottom: 12px;
}

.confirm-message {
    text-align: center;
    color: #9CA3AF;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-btn-cancel {
    background: rgba(107, 114, 128, 0.1);
    color: #9CA3AF;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.confirm-btn-cancel:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #D1D5DB;
}

.confirm-btn-confirm {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
}

.confirm-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 加载提示样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-modal {
    background: linear-gradient(145deg, #1A1A20 0%, #151519 100%);
    border: 1px solid #2D2D35;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    min-width: 200px;
}

.loading-overlay.show .loading-modal {
    transform: translateY(0) scale(1);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2D2D35;
    border-top: 3px solid #6366F1;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #D1D5DB;
    font-size: 14px;
    margin-bottom: 16px;
}

.loading-progress {
    margin-top: 16px;
}

.loading-progress-bar {
    width: 100%;
    height: 6px;
    background: #2D2D35;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.loading-progress-text {
    font-size: 12px;
    color: #9CA3AF;
}

.loading-cancel {
    margin-top: 16px;
    background: rgba(107, 114, 128, 0.1);
    color: #9CA3AF;
    border: 1px solid rgba(107, 114, 128, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.loading-cancel:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #D1D5DB;
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 280px;
        padding: 24px 20px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 20px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .header p {
        font-size: 16px;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
    .mobile-header {
        display: block;
    }
    
    .sidebar {
        width: 70%;
        max-width: 300px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        top: 56px;
        height: calc(100vh - 56px);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* 遮罩层 */
    .sidebar-overlay {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(2px);
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 16px;
        margin-top: 56px;
        min-height: calc(100vh - 56px);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .image-placeholder {
        height: 140px;
    }
    
    .header {
        margin-bottom: 32px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .header p {
        font-size: 14px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1A1A20;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4B5563;
}

/* 背景装饰效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 登录按钮样式 */
.btn-login {
    flex: 1;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* 退出登录按钮样式（后期启用） */
/*
.btn-logout {
    flex: 1;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}
*/

/* 登录注册弹窗样式 */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: linear-gradient(145deg, #1A1A20 0%, #151519 100%);
    border: 1px solid #2D2D35;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(50px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.auth-modal-overlay.show .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #F9FAFB 0%, #D1D5DB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.auth-modal-close {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #EF4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Tab切换 */
.auth-tabs {
    display: flex;
    margin: 0 24px 24px;
    background: rgba(45, 45, 53, 0.5);
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    color: #9CA3AF;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.auth-tab.active {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.auth-tab:hover:not(.active) {
    color: #E5E7EB;
    background: rgba(99, 102, 241, 0.1);
}

/* 表单容器 */
.auth-form-container {
    padding: 0 24px 24px;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form-container.hidden {
    display: none;
    opacity: 0;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #F9FAFB;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    color: #6B7280;
    font-size: 16px;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    background: rgba(45, 45, 53, 0.8);
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 12px 40px 12px 40px;
    color: #F9FAFB;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(45, 45, 53, 0.9);
}

.input-wrapper input::placeholder {
    color: #6B7280;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6B7280;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #9CA3AF;
}

/* 验证码样式 */
.captcha-group {
    margin-bottom: 24px;
}

.captcha-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-display {
    position: relative;
    background: rgba(45, 45, 53, 0.8);
    border: 1px solid #374151;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-display:hover {
    border-color: #6366F1;
    transform: translateY(-1px);
}

.captcha-refresh {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 42px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(139, 92, 246, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.captcha-display:hover .captcha-refresh {
    opacity: 1;
}

.captcha-refresh i {
    color: white;
    font-size: 10px;
}

#loginCaptchaCanvas, #registerCaptchaCanvas {
    display: block;
    background: #2D2D35;
    border-radius: 12px;
    width: 80px;
    height: 42px;
}

/* 提交按钮 */
.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

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

/* 注册提示样式 */
.auth-register-tip {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9CA3AF;
    text-align: center;
}

.auth-register-tip i {
    color: #6366F1;
    font-size: 14px;
    flex-shrink: 0;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .auth-modal {
        width: 95%;
        margin: 0 10px;
    }
    
    .auth-modal-header {
        padding: 20px 20px 0;
    }
    
    .auth-modal-title {
        font-size: 20px;
    }
    
    .auth-tabs {
        margin: 0 20px 20px;
    }
    
    .auth-form-container {
        padding: 0 20px 20px;
    }
    
    .captcha-wrapper {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .captcha-input {
        flex: 1;
        min-width: 0;
    }
    
    .captcha-display {
        flex-shrink: 0;
        margin-top: 0;
    }
    
}

