/* styles.css */

/* 颜色变量 */
:root {
    --primary-color: #353740;
    --background-color: #ffffff;
    --secondary-background: #f7f7f8;
    --text-color: #353740;
    --secondary-text: #6e6e80;
}

/* 基本样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header 样式 */
header {
    padding: 1rem 0;
    margin: 0;
    background-color: var(--secondary-background);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

nav li {
    margin-right: 15px;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background-color: var(--background-color);
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: flex-start;
}

.hero-container {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.hero-text {
    flex: 0 0 40%;
    padding: 1.5rem;
    margin: 0;
    box-sizing: border-box;
    min-height: 500px;
    background-color: #f8f9fa;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.hero-text h2 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: #1a1a1a;
    font-weight: bold;
}

.hero-text p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hero-text strong {
    color: #2d3748;
    font-weight: bolder;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Input Area */
.input-area {
    flex: 0 0 55%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.input-area textarea,
.input-area input[type="text"] {
    width: 100%;
    min-height: 500px;
    background-color: var(--secondary-background);
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    resize: vertical;
    font-size: 16px;
    padding: 1.5rem;
    box-sizing: border-box;
    color: var(--text-color);
    font-family: inherit;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 1rem;
}

button,
input[type="file"]::file-selector-button {
    background-color: var(--text-color) !important;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover,
input[type="file"]::file-selector-button:hover {
    background-color: var(--secondary-text) !important;
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    text-align: center;
}

.feature-list {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.feature-item {
    flex: 1;
    min-width: 250px;
    background-color: var(--secondary-background);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

/* 结果容器样式 */
#resultContainer {
    display: none; /* 默认隐藏 */
    background-color: var(--secondary-background);
    border-radius: 8px;
}

.result-message {
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--secondary-background);
    border: 1px solid #e5e5e5;
}

/* 当结果容器有内容时显示 */
#resultContainer:not(:empty) {
    display: block;
}

.result-header {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.result-stats {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

.stat-item {
    margin: 1rem 0;
}

.stat-item strong {
    font-size: 1rem;
    color: #2d3748;
}

.stat-item span {
    font-size: 1rem;
    color: #555;
}

/* Footer */
footer {
    background-color: var(--secondary-background);
    color: var(--secondary-text);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-text {
        flex: 1;
        width: 100%;
    }
    
    .input-area {
        flex: 1;
        width: 100%;
    }
    
    .input-area textarea {
        min-height: 300px;
    }
}

/* 结果相关样式 */
#loadingMessage {
    text-align: left;
    padding: 20px;
}

.error-message {
    color: #000;
    text-align: left;
    padding: 20px;
}

.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pie-chart-container {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    gap: 30px;
}

.result-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    background-color: #f9f9f9;
}

.result-stats {
    background: none;
    padding: auto;
    font-family: inherit;
    color: #555;
}

.stat-item {
    margin-bottom: 10px;
}

.stat-item strong {
    font-size: 1em;
}

/* api.css */

/* 整体分析结果容器 */
.analysis-result {
    text-align: center;
    border-radius: 8px;
    background-color: #f9f9f9;
}


.stat-item {
    margin: 10px 0;
    font-size: 18px;
}

.note-item {
    color: #333;
    margin-top: 15px;
    font-size: 14px;
}

/* Reset body and html styles */
html, body {
    margin: 0; /* 去掉默认边距 */
    padding: 0; /* 去掉默认填充 */
    height: 100%; /* 确保高度为100% */
}

.faq-question {
    font-weight: normal; /* 将问题的字体加粗样式移除 */
    color: #555;
}

.faq-answer {
    color: #555; /* 调整回答内容的颜色 */
}