/* ==================== 全局样式 ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1a1f3a 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==================== 导航栏 ==================== */

.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

/* ==================== 主要内容 ==================== */

.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== Hero Section ==================== */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-decoration {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gradient-blob {
    position: absolute;
    border-radius: 45% 55% 52% 48% / 48% 45% 55% 52%;
    filter: blur(40px);
    opacity: 0.4;
    mix-blend-mode: screen;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    animation: blob-animation 8s infinite;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    animation: blob-animation 8s infinite reverse;
    animation-delay: 2s;
    top: 50px;
    right: -50px;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    animation: blob-animation 8s infinite;
    animation-delay: 4s;
    bottom: 20px;
    left: 20px;
}

@keyframes blob-animation {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -50px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(50px, 50px) scale(1.05); }
}

/* ==================== 按钮 ==================== */

.btn {
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.2);
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1.1rem;
    position: relative;
}

.btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loader {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* ==================== 功能特性 ==================== */

.features {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    border: 1px solid var(--dark-border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== 上传区域 ==================== */

.upload-section {
    padding: 4rem 0;
}

.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    border: 1px solid var(--dark-border);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.upload-area {
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-box {
    width: 100%;
    aspect-ratio: 1;
    border: 2px dashed var(--primary-color);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(99, 102, 241, 0.05);
    position: relative;
}

.upload-box:hover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.upload-box.dragover {
    border-color: var(--secondary-color);
    background: rgba(236, 72, 153, 0.1);
}

.upload-icon {
    font-size: 3rem;
}

.upload-box h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.upload-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==================== 参数面板 ==================== */

.params-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.params-panel h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.param-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.param-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.param-group textarea,
.param-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.param-group textarea:focus,
.param-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.param-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.param-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group {
    display: flex;
    align-items: center;
    position: relative;
}

.input-group input {
    flex: 1;
    padding: 0.5rem;
    padding-right: 2rem;
}

.input-group .unit {
    position: absolute;
    right: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    pointer-events: none;
}

/* ==================== 任务监控 ==================== */

.task-monitor {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid var(--dark-border);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.task-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.task-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.status-badge.running {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ==================== 进度条 ==================== */

.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid var(--dark-border);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.progress-text {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==================== 任务操作 ==================== */

.task-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== 页脚 ==================== */

.footer {
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid var(--dark-border);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 4rem;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .navbar-content {
        padding: 1rem;
    }

    .logo-text {
        display: none;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-decoration {
        display: none;
    }

    .upload-container {
        grid-template-columns: 1fr;
    }

    .upload-box {
        aspect-ratio: auto;
        min-height: 200px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .params-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .params-grid {
        grid-template-columns: 1fr;
    }

    .btn-submit {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .task-info {
        grid-template-columns: 1fr;
    }

    .task-actions {
        flex-direction: column;
    }

    .task-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
