/* 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; /* è°ƒæ•´å›žç­”å†…å®¹çš„é¢œè‰² */
}