/* Vercel 风格样式 */

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

:root {
    /* Vercel 浅色主题色板 */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #ffffff;
    --bg-hover: #f5f5f5;
    --border-color: #eaeaea;
    --border-hover: #ddd;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-tertiary: #888888;
    --accent-blue: #0070f3;
    --accent-blue-hover: #0761d1;
    --accent-green: #0070f3;
    --accent-purple: #7928ca;
    --accent-orange: #f5a623;
    --shadow-sm: 0 0 0 1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 导航栏 */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* 主内容区 */
.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* 任务列表 */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 任务区块 */
.task-section {
    display: block;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.task-section:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.task-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.task-prompt {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.2px;
}

.task-meta {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.task-type {
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 模型卡片网格 */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* 方形模型卡片 */
.model-card {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.model-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header-compact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
}

.model-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-name-small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.model-badge.gpt {
    background: rgba(0, 112, 243, 0.1);
    color: var(--accent-blue);
}

.model-badge.claude {
    background: rgba(121, 40, 202, 0.1);
    color: var(--accent-purple);
}

.model-badge.gemini {
    background: rgba(245, 166, 35, 0.1);
    color: var(--accent-orange);
}

.model-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-preview-compact {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* 图片类型卡片 */
.card-image-placeholder {
    flex: 1;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.card-image-icon {
    font-size: 36px;
}

.card-image-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
}

/* ========== 详情页面样式 ========== */

.detail-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-height: calc(100vh - 120px);
    overflow: hidden;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.back-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.back-icon {
    font-size: 16px;
}

.detail-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* 上方任务信息区 */
.task-info-section {
    padding: 24px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.info-row {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label {
    font-size: 13px;
    color: var(--text-tertiary);
}

.info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.prompt-section {
    margin-top: 16px;
}

.prompt-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.prompt-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    border-left: 3px solid var(--accent-blue);
}

/* 下方模型回答区 */
.results-section {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 厂商分组区域 */
.provider-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.provider-header .model-badge {
    font-size: 12px;
    padding: 4px 12px;
}

.provider-count {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* 厂商下的模型结果网格 */
.provider-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.result-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s ease;
}

.result-card:hover {
    border-color: var(--border-hover);
}

.result-card .result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    gap: 12px;
}

.result-model-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.model-badge-small {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.model-badge-small.gpt {
    background: rgba(0, 112, 243, 0.1);
    color: var(--accent-blue);
}

.model-badge-small.claude {
    background: rgba(121, 40, 202, 0.1);
    color: var(--accent-purple);
}

.model-badge-small.gemini {
    background: rgba(245, 166, 35, 0.1);
    color: var(--accent-orange);
}

.result-card .model-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-model-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-model-info .model-badge {
    font-size: 11px;
    padding: 4px 10px;
}

.result-model-info .model-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-time {
    font-size: 13px;
    color: var(--text-tertiary);
}

.result-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
}

.result-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary);
}

.result-content code {
    background: var(--bg-hover);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    color: var(--accent-blue);
}

.image-desc {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.result-remark {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.result-remark summary {
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 600;
    user-select: none;
}

.result-remark pre {
    margin-top: 10px;
    max-height: 280px;
    overflow: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 图片结果展示 */
.image-result-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
}

.image-placeholder-large {
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
}

.image-placeholder-large .icon {
    font-size: 72px;
}

.image-placeholder-large .desc {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 400px;
    padding: 0 24px;
    line-height: 1.6;
}

/* 响应式 */
@media (max-width: 1024px) {
    .info-row {
        gap: 32px;
    }

    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
        height: 60px;
    }

    .main-container {
        padding: 20px 16px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }

    .models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .model-card {
        padding: 14px;
    }

    .task-section {
        padding: 20px;
    }

    .info-row {
        flex-direction: column;
        gap: 10px;
    }

    .results-section {
        padding: 20px;
        gap: 24px;
    }

    .provider-results {
        grid-template-columns: 1fr;
    }

    .result-model-info .model-name {
        font-size: 15px;
    }

    .image-placeholder-large {
        height: 280px;
    }

    .detail-header {
        padding: 16px 20px;
    }

    .task-info-section,
    .results-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo {
        font-size: 18px;
    }
}
