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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 顶部导航栏 */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    width: 100%;
    margin: 0;
    padding: 0 4rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo i {
    font-size: 2rem;
    color: #667eea;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.nav-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* 主布局 */
.main-layout {
    display: flex;
    min-height: calc(100vh - 120px);
    width: 100%;
    margin: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 左侧边栏 */
.sidebar {
    width: 320px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header i {
    color: #667eea;
}

.sidebar-subtitle {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.5rem;
}

/* 工具导航 */
.tool-nav {
    flex: 1;
    padding: 2rem 0;
    overflow-y: auto;
}

.tool-category {
    margin-bottom: 1.5rem;
}

.category-header {
    padding: 0.5rem 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-header i {
    font-size: 1rem;
}

.tool-list {
    list-style: none;
}

.tool-item {
    display: block;
    padding: 0.75rem 2rem;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.tool-item:hover {
    background: #edf2f7;
    color: #2d3748;
    border-left-color: #667eea;
}

.tool-item.active {
    background: #ebf4ff;
    color: #3182ce;
    border-left-color: #3182ce;
    font-weight: 500;
}

.tool-item-icon {
    display: inline-block;
    width: 20px;
    margin-right: 0.5rem;
}

.sidebar-footer {
    padding: 1rem 2rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

/* 右侧内容区域 */
.content-area {
    flex: 1;
    padding: 3rem 4rem;
    overflow-y: auto;
    max-width: calc(100vw - 320px);
}

/* 欢迎界面 */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.welcome-card {
    text-align: center;
    max-width: 600px;
}

.welcome-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 2rem;
}

.welcome-card h2 {
    font-size: 2.5rem;
    color: #1a202c;
    margin-bottom: 1rem;
    font-weight: 700;
}

.welcome-text {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 3rem;
}

/* 分类展示卡片 */
.category-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 工具工作区 */
.tool-workspace {
    animation: fadeIn 0.3s ease-in-out;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.back-btn {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.back-btn:hover {
    background: #edf2f7;
    color: #2d3748;
}

.tool-info h2 {
    font-size: 1.8rem;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.tool-info p {
    color: #718096;
    font-size: 1rem;
}

/* 工具内容区域 */
.tool-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    min-height: 500px;
}

.tool-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
}

.results-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
}

.results-panel h3 {
    color: #1a202c;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 表单样式 */
.tool-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9rem;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
}

.file-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-text {
    color: #4a5568;
    font-size: 1rem;
}

.upload-hint {
    color: #718096;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    color: #2d3748;
}

/* 加载动画 */
.loading-placeholder,
.form-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #718096;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

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

/* 结果展示 */
.result-content {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.result-markdown {
    font-family: inherit;
}

.result-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.result-markdown th,
.result-markdown td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.result-markdown th {
    background: #f8fafc;
    font-weight: 600;
    color: #2d3748;
}

.result-json {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
        margin: 0;
    }
    
    .sidebar {
        width: 100%;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .content-area {
        padding: 2rem 1rem;
        max-width: 100vw;
    }
    
    .tool-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo h1 {
        font-size: 1.4rem;
    }
    
    .welcome-card h2 {
        font-size: 2rem;
    }
    
    .category-showcase {
        grid-template-columns: 1fr;
    }
} 