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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --card-light: #ffffff;
    --card-dark: #1e293b;
    --text-light: #1e293b;
    --text-dark: #f1f5f9;
    --border-light: #e2e8f0;
    --border-dark: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* 浅色模式 */
body {
    background: var(--bg-light);
    color: var(--text-light);
}

/* 深色模式 */
body.dark-mode {
    background: var(--bg-dark);
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* 章节通用样式 */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* 介绍区域 */
.intro {
    background: var(--card-light);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .intro {
    background: var(--card-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.intro p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* AI助手展示 */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.agent-card {
    background: var(--card-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark-mode .agent-card {
    background: var(--card-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.agent-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
}

.agent-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.agent-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.agent-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.agent-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    background: var(--success-color);
    color: white;
}

/* 交互区域 */
.input-area {
    margin-bottom: 2rem;
}

#userQuestion {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    background: var(--card-light);
    color: var(--text-light);
    transition: border-color 0.3s;
}

body.dark-mode #userQuestion {
    border-color: var(--border-dark);
    background: var(--card-dark);
    color: var(--text-dark);
}

#userQuestion:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    margin-top: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* 协作面板 */
.collaboration-panel {
    background: var(--card-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .collaboration-panel {
    background: var(--card-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.collaboration-panel h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.agent-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.agent-message {
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.agent-message.coder {
    background: #dbeafe;
    border-color: #3b82f6;
}

body.dark-mode .agent-message.coder {
    background: #1e3a8a;
}

.agent-message.designer {
    background: #fce7f3;
    border-color: #ec4899;
}

body.dark-mode .agent-message.designer {
    background: #831843;
}

.agent-message.writer {
    background: #fef3c7;
    border-color: #f59e0b;
}

body.dark-mode .agent-message.writer {
    background: #78350f;
}

.agent-message.analyst {
    background: #d1fae5;
    border-color: #10b981;
}

body.dark-mode .agent-message.analyst {
    background: #064e3b;
}

.agent-message.strategist {
    background: #e0e7ff;
    border-color: #6366f1;
}

body.dark-mode .agent-message.strategist {
    background: #312e81;
}

.agent-message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.agent-message-content {
    line-height: 1.6;
}

/* 最终结论 */
.final-verdict {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.final-verdict h3 {
    color: white;
    margin-bottom: 1rem;
}

.final-verdict-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* 功能特性 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    background: var(--card-light);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

body.dark-mode .feature-item {
    background: var(--card-dark);
}

.feature-item:hover {
    transform: translateY(-5px);
}

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

.feature-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.feature-item p {
    opacity: 0.8;
}

/* 使用场景 */
.case-list {
    display: grid;
    gap: 1rem;
}

.case-item {
    background: var(--card-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

body.dark-mode .case-item {
    background: var(--card-dark);
}

.case-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* 工具类 */
.hidden {
    display: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .agents-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}
