/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 头部 */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

.header .subtitle {
    font-size: 1.2em;
    color: #666;
}

/* 主内容区 */
.main {
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 搜索区域 */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.search-box button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 分类区域 */
.category-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 25px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover {
    background: #667eea;
    color: white;
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* 心灵鸡汤区域 */
.quote-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quote-section h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.quote-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #333;
}

.quote-text {
    font-size: 1.3em;
    font-style: italic;
    margin-bottom: 15px;
}

.quote-author {
    color: #666;
    font-size: 1em;
}

.new-quote-btn {
    padding: 12px 30px;
    background: white;
    color: #f5576c;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.new-quote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* 内容区域 */
.content-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.section-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.section-subtitle {
    color: #666;
    font-size: 0.9em;
}

/* 知识卡片 */
.knowledge-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.knowledge-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.knowledge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-title {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.card-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
}

.card-category {
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.8em;
}

.card-date {
    color: #999;
}

.no-results {
    text-align: center;
    color: #666;
    font-size: 1.1em;
    padding: 40px;
}

/* 量表区域 */
.surveys-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.surveys-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 量表卡片使用和知识卡片相同的样式 */
.survey-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.survey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.survey-questions {
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.8em;
}

/* 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .search-box {
        flex-direction: column;
    }

    .categories {
        flex-direction: column;
    }

    .category-btn {
        width: 100%;
    }

    .knowledge-list,
    .surveys-list {
        grid-template-columns: 1fr;
    }
}
