/* 专业搜索页面样式 */

.professional-search-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.professional-search-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 40px;
}

.professional-search-header {
    text-align: center;
    margin-bottom: 30px;
}

.professional-search-header h1 {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 10px;
}

.professional-search-header p {
    font-size: 1.1em;
    color: #666;
}

.professional-search-form-wrapper {
    margin-bottom: 30px;
}

.search-input-group {
    display: flex;
    border: 2px solid #3498db;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

#professional-search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1.1em;
    outline: none;
}

.search-submit-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0 30px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-submit-button:hover {
    background: #2980b9;
}

.search-options {
    margin-top: 20px;
    text-align: center;
}

.search-type-selector {
    display: inline-flex;
    background: #f8f9fa;
    border-radius: 30px;
    padding: 5px;
}

.search-type-option {
    display: flex;
    align-items: center;
    margin: 0 5px;
}

.search-type-option input {
    display: none;
}

.search-type-option span {
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-type-option input:checked + span {
    background: #3498db;
    color: white;
}

.search-type-option input:not(:checked) + span:hover {
    background: #e9ecef;
}

.search-instructions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.search-instructions h3 {
    margin-top: 0;
    color: #333;
}

.search-instructions ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.search-instructions li {
    margin-bottom: 8px;
    color: #555;
}

@media (max-width: 768px) {
    .professional-search-container {
        padding: 20px;
    }
    
    .professional-search-header h1 {
        font-size: 1.8em;
    }
    
    .search-input-group {
        flex-direction: column;
        border-radius: 10px;
    }
    
    #professional-search-input {
        padding: 15px;
        border-radius: 0;
    }
    
    .search-submit-button {
        padding: 15px;
        justify-content: center;
    }
    
    .search-type-selector {
        flex-wrap: wrap;
    }
}

/* 前端样式 */

/* 拼音索引样式 */
.pinyin-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.pinyin-index a {
    padding: 5px 10px;
    background-color: #f0f0f0;
    text-decoration: none;
    border-radius: 3px;
    color: #333;
    transition: background-color 0.3s ease;
}

.pinyin-index a:hover,
.pinyin-index a.active {
    background-color: #0073aa;
    color: white;
}

/* 部首索引样式 */
.radical-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.radical-index a {
    padding: 5px 10px;
    background-color: #f0f0f0;
    text-decoration: none;
    border-radius: 3px;
    color: #333;
    transition: background-color 0.3s ease;
}

.radical-index a:hover,
.radical-index a.active {
    background-color: #0073aa;
    color: white;
}

/* 汉字列表样式 */
.characters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.character-item {
    text-align: center;
}

.character-link {
    display: block;
    text-decoration: none;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.character-link:hover {
    background-color: #f5f5f5;
    border-color: #0073aa;
}

.character-char {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.character-pinyin {
    font-size: 14px;
    color: #666;
}

/* 书法作品筛选样式 */
.calligraphy-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.calligraphy-filter-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.filter-button {
    padding: 5px 10px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.filter-button:hover {
    background-color: #005a87;
}

/* 书法作品画廊样式 */
.calligraphy-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.calligraphy-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.calligraphy-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calligraphy-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.calligraphy-info {
    padding: 15px;
}

.calligraphy-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.calligraphy-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

/* 子分类筛选样式 */
.subcategory-filter {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.subcategory-filter h3 {
    margin-top: 0;
}

.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.subcategory-item {
    padding: 5px 10px;
    background-color: #e0e0e0;
    text-decoration: none;
    border-radius: 3px;
    color: #333;
    transition: all 0.3s ease;
}

.subcategory-item:hover,
.subcategory-item.active {
    background-color: #0073aa;
    color: white;
}

/* 分类搜索框样式 */
.category-search-box {
    margin-bottom: 15px;
}

.category-search-form {
    display: flex;
    gap: 5px;
}

.category-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.category-search-button {
    padding: 8px 15px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.category-search-button:hover {
    background-color: #005a87;
}

/* 搜索结果样式 */
.search-results {
    margin: 20px 0;
}

.result-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.result-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.result-excerpt {
    color: #666;
}

.result-meta {
    font-size: 14px;
    color: #999;
}

/* 文章来源信息样式 */
.article-source-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 4px solid #0073aa;
}

.article-source-info h4 {
    margin-top: 0;
    color: #333;
}

.article-source-info p {
    margin: 5px 0;
}

.article-source-info a {
    color: #0073aa;
    text-decoration: none;
}

.article-source-info a:hover {
    text-decoration: underline;
}

/* 增强评论样式 */
.enhanced-comment-content {
    margin: 10px 0;
}

.enhanced-comment-content p {
    margin: 10px 0;
}

.enhanced-comment-content blockquote {
    margin: 15px 0;
    padding: 10px 15px;
    border-left: 4px solid #0073aa;
    background-color: #f9f9f9;
}

.enhanced-comment-content ul,
.enhanced-comment-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.enhanced-comment-content ul li,
.enhanced-comment-content ol li {
    margin-bottom: 5px;
}

.enhanced-comment-content strong {
    font-weight: bold;
}

.enhanced-comment-content em {
    font-style: italic;
}

.enhanced-comment-content underline {
    text-decoration: underline;
}

.comment-preview {
    margin: 15px 0;
    padding: 10px;
    border: 1px dashed #ddd;
    background-color: #f9f9f9;
    min-height: 50px;
}

/* 论坛样式评论区域 */
.comments-area.forum-style {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

.forum-style .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forum-style .comment {
    border-bottom: 1px solid #eee;
    padding: 15px;
}

.forum-style .comment:last-child {
    border-bottom: none;
}

.forum-style .comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.forum-style .comment-author .avatar {
    margin-right: 10px;
    border-radius: 50%;
}

.forum-style .comment-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.forum-style .comment-content {
    margin-left: 0;
}

.forum-style .comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
}

.forum-style .comment-reply-link:hover {
    background-color: #005a87;
}

.forum-style .comment-form {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

/* 加载状态样式 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .characters-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .calligraphy-filters {
        flex-direction: column;
    }
    
    .calligraphy-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .pinyin-index,
    .radical-index {
        gap: 5px;
    }
    
    .pinyin-index a,
    .radical-index a {
        padding: 3px 8px;
        font-size: 14px;
    }
    
    .category-search-form {
        flex-direction: column;
    }
    
    .category-search-button {
        align-self: flex-start;
    }
}

/* 原有样式保持不变 */
.character-dictionary {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Microsoft YaHei", sans-serif;
}

.search-section {
    text-align: center;
    margin-bottom: 30px;
}

#character-search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#character-input {
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    width: 300px;
    max-width: 100%;
}

#character-search-form button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#character-search-form button:hover {
    background-color: #005a87;
}

.character-result {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fff;
}

.character-basic-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.character-display h1 {
    font-size: 4em;
    margin: 0;
    color: #333;
}

.character-details {
    flex: 1;
    min-width: 250px;
}

.character-details p {
    margin: 10px 0;
    font-size: 16px;
}

.tab-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.tab-header {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.tab-link {
    margin-bottom: 0;
}

.tab-link a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    border-right: 1px solid #ddd;
    transition: background-color 0.3s;
}

.tab-link:last-child a {
    border-right: none;
}

.tab-link a:hover {
    background-color: #e0e0e0;
}

.tab-link.active a {
    background-color: #0073aa;
    color: white;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.character-not-found, .loading-message {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: #666;
}

/* 汉字页面样式 */
.character-basic-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.character-display h1 {
    font-size: 4em;
    margin: 0;
    color: #333;
}

.character-display .full-pinyin {
    font-size: 1.2em;
    color: #666;
    margin: 10px 0 0 0;
}

.character-details {
    flex: 1;
    min-width: 250px;
}

.character-details p {
    margin: 10px 0;
    font-size: 16px;
}

/* 词语页面样式 */
.dictionary-basic-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.dictionary-display h1 {
    font-size: 4em;
    margin: 0;
    color: #333;
}

.dictionary-display .full-pinyin {
    font-size: 1.2em;
    color: #666;
    margin: 10px 0 0 0;
}

.dictionary-details {
    flex: 1;
    min-width: 250px;
}

.dictionary-details p {
    margin: 10px 0;
    font-size: 16px;
}

/* 成语页面样式 */
.idiom-basic-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.idiom-display h1 {
    font-size: 4em;
    margin: 0;
    color: #333;
}

.idiom-display .idiom-pinyin {
    font-size: 1.2em;
    color: #666;
    margin: 10px 0 0 0;
}

.idiom-details {
    flex: 1;
    min-width: 250px;
}

.idiom-details p {
    margin: 10px 0;
    font-size: 16px;
}

.tab-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.tab-header {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.tab-link {
    margin-bottom: 0;
}

.tab-link a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    border-right: 1px solid #ddd;
    transition: background-color 0.3s;
}

.tab-link:last-child a {
    border-right: none;
}

.tab-link a:hover {
    background-color: #e0e0e0;
}

.tab-link.active a {
    background-color: #0073aa;
    color: white;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.idiom-not-found, .loading-message {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: #666;
}

/* 拼音索引样式 */
.pinyin-index-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pinyin-header {
    text-align: center;
    margin-bottom: 30px;
}

.pinyin-header h1 {
    color: #333;
    margin-bottom: 10px;
}

.pinyin-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.pinyin-group {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
}

.pinyin-group h3 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.pinyin-characters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pinyin-character {
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.pinyin-character:hover {
    background-color: #0073aa;
    color: white;
}

/* 部首索引样式 */
.radical-index-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.radical-header {
    text-align: center;
    margin-bottom: 30px;
}

.radical-header h1 {
    color: #333;
    margin-bottom: 10px;
}

.radical-stroke-groups {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.radical-stroke-group {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
}

.radical-stroke-group h3 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.radical-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.radical-item {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
}

.radical-item:hover {
    background-color: #0073aa;
    color: white;
}

.radical-item.active {
    background-color: #0073aa;
    color: white;
    font-weight: bold;
}

.character-results {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.character-stroke-groups {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.character-stroke-group h4 {
    margin: 10px 0 5px;
    color: #666;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.character-card {
    text-align: center;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fafafa;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    display: block;
}

.character-card:hover {
    background-color: #0073aa;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.character-card .char {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.character-card .pinyin {
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.character-card .stroke-count {
    font-size: 11px;
    color: #666;
}

.character-card:hover .stroke-count {
    color: #ddd;
}

.placeholder-text {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pinyin-groups {
        grid-template-columns: 1fr;
    }
    
    .tab-header {
        flex-direction: column;
    }
    
    .tab-link a {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .tab-link:last-child a {
        border-bottom: none;
    }
    
    .character-basic-info {
        flex-direction: column;
    }
    
    .character-display {
        text-align: center;
    }
    
    #character-input {
        width: 100%;
    }
    
    #character-search-form {
        flex-direction: column;
        align-items: center;
    }
    
    #character-search-form button {
        width: 100%;
        max-width: 300px;
    }
}

/* 图片说明文字样式 */
.gallery-caption {
    position: absolute;
    bottom: 10px;
    left: 8px;
    right: 8px;
    top:3px;
    /*background: rgba(0, 0, 0, 0.7);*/
    background: rgba(0, 0, 0, 0);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    opacity: 1; /* 始终可见 */
    transition: opacity 0.3s ease;
}

.gallery-lightbox .lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    font-size: 16px;
}
