/* 佛学大辞典样式 */

/* 搜索区域 */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-btn, .random-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
}

.search-btn {
    background-color: #4CAF50;
    color: white;
}

.search-btn:hover {
    background-color: #45a049;
}

.random-btn {
    background-color: #2196F3;
    color: white;
}

.random-btn:hover {
    background-color: #0b7dda;
}

/* 结果区域 */
.result-container {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.welcome-message {
    text-align: center;
    padding: 20px;
}

.welcome-message h2 {
    margin-bottom: 15px;
    color: #333;
}

.welcome-message p {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

.popular-terms {
    margin-top: 30px;
}

.popular-terms h3 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.popular-terms-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.popular-term {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.popular-term:hover {
    background-color: #e0e0e0;
}

.result-not-found {
    padding: 20px;
    text-align: center;
    color: #666;
}

.result-not-found h3 {
    margin-bottom: 15px;
    color: #d32f2f;
}

.result-not-found ul {
    list-style-type: disc;
    padding-left: 20px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.result-not-found li {
    margin-bottom: 10px;
    color: #555;
}

.result-found {
    padding: 20px;
}

.term-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.term-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.term-aliases, .term-category {
    color: #666;
    margin-bottom: 5px;
}

.term-explanation, .term-source {
    margin-bottom: 20px;
}

.term-explanation h3, .term-source h3, .related-terms h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.explanation-content, .source-content {
    line-height: 1.8;
    color: #333;
}

.related-terms {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.related-terms-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.related-terms-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.related-terms-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-term-link {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
}

.related-term-link:hover {
    text-decoration: underline;
}

.related-term-brief {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

/* 历史记录区域 */
.history-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.history-container h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.no-history {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

.history-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.history-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    margin-bottom: 15px;
}

.history-term {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
}

.history-term:hover {
    text-decoration: underline;
}

.history-brief {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.clear-history-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
    text-align: center;
}

.clear-history-btn:hover {
    background-color: #d32f2f;
}

/* 无障碍访问 - 屏幕阅读器专用 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }

    .search-btn, .random-btn {
        width: 100%;
    }

    .term-header {
        text-align: center;
    }
}