/* 星河渡AI控制台 - 增强样式 */

/* 导入Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #1a202c;
    line-height: 1.6;
}

/* 头部样式增强 - 简洁设计 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    z-index: 1000;
    position: relative;
}

/* 确保主内容区域不与头部重叠 */
body {
    padding-top: 0;
}

/* 主内容区域样式 */
.main-content {
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

/* 用户菜单按钮旋转动画 */
#userMenuBtn:hover svg {
    transform: rotate(180deg);
}

/* 下拉菜单动画 */
#userDropdownMenu {
    animation: fadeInDown 0.2s ease-out;
}

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

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

/* Logo文字样式 - 简洁设计 */
.logo-text {
    color: #1f2937;
    font-weight: 500;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    font-family: 'Inter', sans-serif;
}

header .text-gray-600 {
    color: #cbd5e1 !important;
}

header .text-gray-500 {
    color: #94a3b8 !important;
}

header .hover\:text-gray-700:hover {
    color: #f1f5f9 !important;
}

/* 卡片样式增强 */
.enhanced-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.enhanced-card:hover {
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 按钮样式增强 */
.enhanced-btn {
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #8b5cf6;
    color: white;
}

.btn-secondary:hover {
    background: #7c3aed;
}

/* 输入框样式增强 */
.enhanced-input {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.enhanced-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 标签页样式增强 */
.enhanced-tabs {
    background: white;
    border-radius: 8px;
    padding: 4px;
    display: flex;
    gap: 4px;
    border: 1px solid #e5e7eb;
}

.enhanced-tab {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #64748b;
}

.enhanced-tab.active {
    background: #3b82f6;
    color: white;
}

/* 统计卡片样式 */
.stats-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-item:last-child {
    border-bottom: none;
}

.stats-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.stats-value.positive {
    color: #10b981;
}

/* 上传区域样式增强 */
.enhanced-upload {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.enhanced-upload:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

/* 左右布局优化 */
.console-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .console-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .console-grid {
        grid-template-columns: 1fr;
    }
}

/* 结果图片样式优化 - 现代化展示 */
.result-image {
    max-height: 600px;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.result-image:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.4);
}

/* 用户下拉菜单样式优化 */
#userDropdownMenu {
    animation: fadeIn 0.2s ease-out;
}

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

/* 积分显示样式 - 现代化渐变 */
#userCredits {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* 加载动画增强 - 现代化设计 */
.enhanced-loading {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: modernSpin 1s linear infinite, modernPulse 2s ease-in-out infinite;
}

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

@keyframes modernPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 脉冲文字动画 */
.pulse-animation {
    animation: modernTextPulse 2s ease-in-out infinite;
}

@keyframes modernTextPulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-2px);
    }
}

/* 增强加载效果 */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
}

.particle-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle-2 {
    top: 60%;
    left: 80%;
    animation-delay: 0.6s;
}

.particle-3 {
    top: 30%;
    left: 70%;
    animation-delay: 1.2s;
}

.particle-4 {
    top: 80%;
    left: 20%;
    animation-delay: 1.8s;
}

.particle-5 {
    top: 50%;
    left: 50%;
    animation-delay: 2.4s;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

/* 加载器容器 */
.loading-spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

/* 主加载器 */
.loading-spinner {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border: 3px solid transparent;
    border-top: 3px solid #667eea;
    border-right: 3px solid #764ba2;
    border-radius: 50%;
    animation: spinnerRotate 1s linear infinite;
}

/* 外环 */
.loading-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    animation: ringPulse 2s ease-in-out infinite;
}

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

@keyframes ringPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 进度条样式 */
.progress-container {
    position: relative;
    width: 200px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 1.5s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
}

/* 加载区域背景渐变 */
#loadingArea {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    animation: modernBorderGlow 3s ease-in-out infinite;
}

#loadingArea::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: loadingShimmer 2s linear infinite;
}

@keyframes loadingShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes modernBorderGlow {
    0%, 100% {
        border-color: rgba(102, 126, 234, 0.4);
        box-shadow: var(--shadow-soft), 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        border-color: rgba(118, 75, 162, 0.6);
        box-shadow: var(--shadow-hover), 0 0 30px rgba(118, 75, 162, 0.5);
    }
}

/* 滑块样式增强 - 现代化设计 */
.enhanced-range {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #e5e7eb 0%, #3b82f6 0%, #3b82f6 100%, #e5e7eb 100%);
    outline: none;
    transition: var(--transition);
}

.enhanced-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: var(--transition);
}

.enhanced-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.enhanced-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: var(--transition);
}

.enhanced-range::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

/* 加载动画增强 - 现代化容器 */
.enhanced-loading {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.enhanced-loading .animate-spin {
    animation: modernSpinAnimation 1s linear infinite;
    color: #667eea;
}

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

/* 结果区域样式 - 现代化增强 */
.result-image {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.result-image:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.4);
}

/* 左右分栏布局 */
.console-layout {
    display: flex;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 80px);
}

.console-left {
    flex: 1;
    min-width: 400px;
}

.console-right {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
}

/* 进度条样式 */
.progress-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.progress-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-top: 16px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background-color: #9ca3af;
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 结果区域样式增强 */
.result-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .console-layout {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .console-left,
    .console-right {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .enhanced-card {
        margin: 10px;
    }
    
    .enhanced-tabs {
        flex-direction: column;
        gap: 4px;
    }
    
    .enhanced-tab {
        text-align: center;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .console-layout {
        padding: 12px;
    }
    
    .progress-container {
        padding: 24px 16px;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 代码字体 */
.font-mono {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* 粒子动画效果 */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* 蓝色粒子动画 - 快速模型 */
.particle-blue-1 {
    width: 4px;
    height: 4px;
    background: #3b82f6;
    top: 20%;
    left: 15%;
    animation: float-blue-1 3s ease-in-out infinite;
}

.particle-blue-2 {
    width: 6px;
    height: 6px;
    background: #60a5fa;
    top: 60%;
    right: 20%;
    animation: float-blue-2 4s ease-in-out infinite;
}

.particle-blue-3 {
    width: 3px;
    height: 3px;
    background: #1d4ed8;
    bottom: 30%;
    left: 70%;
    animation: float-blue-3 2.5s ease-in-out infinite;
}

@keyframes float-blue-1 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.7; }
    33% { transform: translateY(-20px) translateX(10px); opacity: 1; }
    66% { transform: translateY(10px) translateX(-5px); opacity: 0.8; }
}

@keyframes float-blue-2 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.6; }
    25% { transform: translateY(15px) translateX(-10px); opacity: 1; }
    50% { transform: translateY(-10px) translateX(15px); opacity: 0.9; }
    75% { transform: translateY(5px) translateX(-8px); opacity: 0.7; }
}

@keyframes float-blue-3 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.8; }
    50% { transform: translateY(-25px) translateX(20px); opacity: 1; }
}

/* 紫色粒子动画 - 标准模型 */
.particle-purple-1 {
    width: 5px;
    height: 5px;
    background: #8b5cf6;
    top: 25%;
    left: 20%;
    animation: float-purple-1 3.5s ease-in-out infinite;
}

.particle-purple-2 {
    width: 4px;
    height: 4px;
    background: #a78bfa;
    top: 70%;
    right: 15%;
    animation: float-purple-2 4.2s ease-in-out infinite;
}

.particle-purple-3 {
    width: 6px;
    height: 6px;
    background: #7c3aed;
    bottom: 40%;
    left: 75%;
    animation: float-purple-3 2.8s ease-in-out infinite;
}

@keyframes float-purple-1 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.6; }
    40% { transform: translateY(-15px) translateX(12px); opacity: 1; }
    80% { transform: translateY(8px) translateX(-6px); opacity: 0.8; }
}

@keyframes float-purple-2 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.7; }
    30% { transform: translateY(18px) translateX(-12px); opacity: 1; }
    60% { transform: translateY(-8px) translateX(18px); opacity: 0.9; }
    90% { transform: translateY(3px) translateX(-10px); opacity: 0.6; }
}

@keyframes float-purple-3 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.8; }
    50% { transform: translateY(-20px) translateX(15px); opacity: 1; }
}

/* 进度条动画增强 */
#fastProgressBar, #standardProgressBar {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#fastProgressBar::after, #standardProgressBar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}