:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff6b6b;
    --accent-color: #ffd93d;
    --background-dark: #000000;
    --background-card: #031535ab;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.main-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .main-area {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--background-card);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgb(0 0 0 / 28%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* 多图预览容器 */
.multi-preview-container {
    border-radius: 12px;
    overflow: hidden;
    min-height: 200px;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
    overflow-y: auto;
    padding: 10px;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.preview-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 图片选择器 */
.image-selector {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.image-selector h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.image-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.image-thumbnail.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumbnail .thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px;
    font-size: 0.7rem;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-container {
    margin-top: 20px;
    display: none;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

.result-card {
    display: none;
}

.video-container {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: black;
}

.video-player {
    width: 100%;
    max-height: 500px;
    display: block;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    background: var(--background-card);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateX(150%);
    opacity: 0;
    transition: all 0.3s;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* 加载时的过渡效果 */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.page-transition.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 60px;
    height: 60px;
    position: relative;
}

.loader::before,
.loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.loader::after {
    border-top-color: var(--secondary-color);
    animation-delay: 0.2s;
}

/* 任务ID显示样式 */
.task-id-display {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: none;
}

.task-id-row {
    display: block;
    margin-bottom: 15px;
}

.task-id-row:last-child {
    margin-bottom: 0;
}

.task-id-label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.task-id-value {
    display: block;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    word-break: break-all;
    margin-bottom: 10px;
}

.copy-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:hover {
    background: var(--secondary-color);
}

/* 结果卡片样式 */
.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.result-actions .btn {
    flex: 1;
    min-width: 150px;
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border-left: 4px solid #ff4757;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.share-link {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.share-link input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 5px;
    font-family: monospace;
}

.share-link input:focus {
    outline: none;
}

/* 多图预览样式 */
.multi-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.multi-preview-container .preview-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.multi-preview-container .preview-image:first-child {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}