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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e6ed;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #2a2a3e;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #64ffda;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #64ffda, #82b1ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.user-name,
.session-id {
    font-size: 0.85rem;
    color: #b8c6db;
}

.session-id code {
    background: rgba(100, 255, 218, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #64ffda;
    font-size: 0.8rem;
}

/* 主要内容布局 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* 面板样式 */
.panel {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(100, 255, 218, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.panel:last-child {
    margin-bottom: 0;
}

.panel:hover {
    border-color: rgba(100, 255, 218, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.panel-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
    background: rgba(100, 255, 218, 0.05);
}

.panel-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #64ffda;
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-content {
    padding: 25px;
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 30px;
}

.upload-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #b8c6db;
    font-weight: 500;
}

.upload-area {
    position: relative;
    border: 2px dashed rgba(100, 255, 218, 0.3);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(100, 255, 218, 0.02);
}

.upload-area:hover {
    border-color: rgba(100, 255, 218, 0.6);
    background: rgba(100, 255, 218, 0.05);
}

.upload-area.drag-over {
    border-color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
}

.upload-placeholder {
    pointer-events: none;
}

.upload-placeholder i {
    font-size: 3rem;
    color: #64ffda;
    margin-bottom: 15px;
    display: block;
}

.upload-placeholder p {
    color: #b8c6db;
    font-size: 1.1rem;
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 8px;
    display: none;
}

.file-info.show {
    display: block;
}

.file-info .file-name {
    font-weight: 500;
    color: #64ffda;
    margin-bottom: 5px;
}

.file-info .file-size {
    color: #b8c6db;
    font-size: 0.9rem;
}

/* 输出选项样式 */
.output-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-label {
    font-weight: 500;
    color: #e0e6ed;
    margin-bottom: 5px;
}

.option-note {
    color: #b8c6db;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 5px;
}

/* 复选框样式 */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #e0e6ed;
    gap: 10px;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(100, 255, 218, 0.4);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #64ffda;
    border-color: #64ffda;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #1a1a2e;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.small-select {
    max-width: 300px;
}

/* F标记检测样式 */
.f-markers-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 8px;
}

.f-markers-display {
    padding: 10px;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 6px;
    margin: 8px 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.f-marker-tag {
    background: #64ffda;
    color: #1a1a2e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.loading-text {
    color: #b8c6db;
    font-style: italic;
}

.edit-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* 模板选择样式 */
.template-selection,
.model-selection {
    display: flex;
    gap: 15px;
    align-items: center;
}

.select-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.8);
    color: #e0e6ed;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.select-input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.select-input:disabled {
    background: rgba(26, 26, 46, 0.4);
    color: #6b7280;
    border-color: rgba(100, 255, 218, 0.2);
    cursor: not-allowed;
}

/* 按钮样式 */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:hover::before {
    width: 200%;
    height: 200%;
}

.btn-primary {
    background: linear-gradient(45deg, #64ffda, #82b1ff);
    color: #1a1a2e;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.3);
}

.btn-secondary {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.btn-secondary:hover {
    background: rgba(100, 255, 218, 0.2);
    border-color: #64ffda;
}

.btn-outline {
    background: transparent;
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.btn-outline:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: #64ffda;
}

.btn-large {
    padding: 18px 30px;
    font-size: 1.2rem;
    border-radius: 12px;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* 生成区域样式 */
.generate-section {
    margin-top: 30px;
    text-align: center;
}

.loading {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.loading.show {
    display: flex;
}

.loading i {
    font-size: 1.5rem;
    color: #64ffda;
}

.loading span {
    font-size: 1.1rem;
    color: #b8c6db;
}

/* 标签页样式 */
.tabs {
    display: flex;
    margin-bottom: 20px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 8px;
    padding: 4px;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #b8c6db;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button.active {
    background: rgba(100, 255, 218, 0.15);
    color: #64ffda;
}

.tab-button:hover {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
}

/* 文件列表样式 */
.file-lists {
    position: relative;
    min-height: 400px;
}

.file-list {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.file-list.active {
    display: block;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.file-list-header h4 {
    color: #b8c6db;
    font-size: 1.1rem;
    font-weight: 500;
}

.file-items {
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 255, 218, 0.3) transparent;
}

.file-items::-webkit-scrollbar {
    width: 6px;
}

.file-items::-webkit-scrollbar-track {
    background: transparent;
}

.file-items::-webkit-scrollbar-thumb {
    background: rgba(100, 255, 218, 0.3);
    border-radius: 3px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(100, 255, 218, 0.05);
    border-color: rgba(100, 255, 218, 0.3);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-item-info i {
    font-size: 1.2rem;
    color: #64ffda;
}

.file-item-details {
    flex: 1;
}

.file-item-name {
    font-weight: 500;
    color: #e0e6ed;
    margin-bottom: 4px;
}

.file-item-size {
    font-size: 0.85rem;
    color: #b8c6db;
}

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

.file-item-actions .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
}

.notification.error {
    background: linear-gradient(45deg, #f44336, #ef5350);
}

.notification.info {
    background: linear-gradient(45deg, #2196f3, #42a5f5);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(100, 255, 218, 0.3);
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.modal-content h3 {
    color: #64ffda;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.modal-content p {
    color: #b8c6db;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .panel-content {
        padding: 20px;
    }
    
    .template-selection {
        flex-direction: column;
        gap: 10px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: center;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 页脚样式 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.footer-content {
    text-align: center;
    padding: 10px 20px;
    color: #7c88b3;
}

/* 文件动作按钮组 */
.file-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 危险按钮样式 */
.btn-danger {
    background: linear-gradient(45deg, #f44336, #ef5350);
    color: white;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(45deg, #d32f2f, #e53935);
    border-color: rgba(244, 67, 54, 0.5);
    transform: translateY(-2px);
}

/* 生成说明样式 */
.generate-note {
    margin-top: 8px;
    text-align: center;
}

.generate-note small {
    color: #b8c6db;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* 为页脚留出空间 */
.container {
    padding-bottom: 60px;
}

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

.file-item {
    animation: fadeIn 0.3s ease;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* 终端输出样式 */
.terminal-output {
    background: #1a1a1a;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    padding: 15px;
    border-radius: 8px;
    height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(100, 255, 218, 0.2);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: rgba(100, 255, 218, 0.4);
    border-radius: 4px;
}

.terminal-output::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 255, 218, 0.6);
}

/* 面板动作按钮 */
.panel-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 上传进度条 */
.upload-progress {
    margin-top: 10px;
    display: none;
}

.upload-progress.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #64ffda, #82b1ff);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #b8c6db;
    text-align: center;
} 

/* AI处理按钮特殊样式 */
.btn-primary {
    background: linear-gradient(45deg, #64ffda, #82b1ff);
    color: #1a1a2e;
    border: none;
    font-weight: 600;
    animation: glow 2s ease-in-out infinite alternate;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.4);
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(100, 255, 218, 0.4);
    }
    to {
        box-shadow: 0 0 20px rgba(100, 255, 218, 0.6);
    }
}

/* 文件项操作按钮布局优化 */
.file-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.file-item-actions .btn {
    font-size: 0.85rem;
    padding: 6px 12px;
    min-width: 70px;
    text-align: center;
}

/* 标签页样式优化 */
.tab-button {
    position: relative;
    padding: 12px 20px;
    font-size: 0.9rem;
}

.tab-button.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(45deg, #64ffda, #82b1ff);
    border-radius: 2px;
}

/* 文件列表优化 */
.file-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-item:hover {
    background: rgba(100, 255, 218, 0.05);
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .file-item-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .file-item-actions .btn {
        width: 100%;
        margin: 2px 0;
    }
}
