/* poem_list.html 页面专用样式 */

/* 自定义样式 */
.poem-card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
    border: 1px solid #e5e7eb;
}

.poem-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.poem-title {
    font-family: 'STKaiti', 'KaiTi', '楷体', serif;
    font-weight: bold;
    color: #1f2937;
}

.poem-content {
    font-family: 'STKaiti', 'KaiTi', '楷体', serif;
    line-height: 1.8;
    color: #4b5563;
}

.filter-sidebar {
    position: sticky;
    top: 5rem;
}

.dynasty-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.author-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tag-badge {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* 按钮点击反馈 */
.action-btn {
    transition: all 0.2s ease;
}

.action-btn:active {
    transform: scale(0.95);
}

/* 骨架屏效果 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 分页按钮样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.pagination-content {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 2.5rem;
    min-height: 2.5rem;
}

.pagination-btn:hover {
    background-color: #f9fafb;
    color: #1f2937;
}

.pagination-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    color: #9ca3af;
    min-width: 2rem;
}

/* 移动端分页优化 */
@media (max-width: 768px) {
    .pagination-content {
        gap: 0.125rem;
    }
    
    .pagination-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        min-width: 2rem;
        min-height: 2rem;
    }
    
    .pagination-ellipsis {
        padding: 0.375rem 0.125rem;
        font-size: 0.75rem;
        min-width: 1.5rem;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .filter-sidebar {
        position: relative;
        top: 0;
    }
}

/* 搜索建议样式 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f3f4f6;
}

/* 表单控件样式 */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #fff;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 筛选面板样式 */
.filter-panel {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.filter-reset-btn,
.filter-apply-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-reset-btn {
    background-color: #f3f4f6;
    color: #374151;
}

.filter-reset-btn:hover {
    background-color: #e5e7eb;
}

.filter-apply-btn {
    background-color: #3b82f6;
    color: white;
}

.filter-apply-btn:hover {
    background-color: #2563eb;
}

/* 古诗列表项样式 */
.poem-item {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.poem-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.poem-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.poem-title-link {
    font-family: 'STKaiti', 'KaiTi', '楷体', serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    transition: color 0.2s ease;
    text-decoration: none;
}

.poem-title-link:hover {
    color: #3b82f6;
}

.poem-icons {
    display: flex;
    gap: 0.5rem;
}

.poem-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #6b7280;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.poem-icon-btn:hover {
    background-color: #e5e7eb;
}

.poem-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.poem-info-item {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.poem-excerpt {
    font-family: 'STKaiti', 'KaiTi', '楷体', serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 1rem;
}

.poem-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.poem-tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #374151;
}

.poem-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poem-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.poem-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #6b7280;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.poem-action-btn:hover {
    background-color: #e5e7eb;
}

/* 精选推荐样式 */
.featured-section {
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.featured-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.featured-title {
    font-family: 'STKaiti', 'KaiTi', '楷体', serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    transition: text-decoration 0.2s ease;
    text-decoration: none;
}

.featured-title:hover {
    text-decoration: underline;
}

.featured-content {
    font-family: 'STKaiti', 'KaiTi', '楷体', serif;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.featured-meta {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.featured-author,
.featured-dynasty {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.featured-action {
    text-align: center;
}

.featured-read-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
}

.featured-read-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 分类导航 */
.category-scroll-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.category-scroll-content {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}

.category-chip {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-chip:hover {
    background-color: #e5e7eb;
}

.category-chip.active {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

/* 隐藏滚动条 */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* 搜索框样式 */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.search-btn:hover {
    background-color: #2563eb;
}

/* 导航栏样式优化 */
#navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* 头像容器居中优化 */
.avatar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.avatar-container i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 页脚样式优化 */
#footer-container {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-center.mb-12 {
        margin-bottom: 1rem;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    .max-w-2xl {
        max-width: 100%;
    }
    
    .mb-8 {
        margin-bottom: 1rem;
    }
    
    .gap-8 {
        gap: 1rem;
    }
    
    .p-6 {
        padding: 1rem;
    }
    
    .poem-item, .poem-card {
        padding: 1rem;
    }
    
    .poem-title-link {
        font-size: 1.125rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .poem-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .poem-icons {
        margin-top: 0.5rem;
    }
    
    .poem-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .poem-action-buttons {
        margin-bottom: 1rem;
    }
    
    .grid.grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .flex.justify-between.items-center.mb-6 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .text-sm {
        font-size: 0.75rem;
    }
    
    .px-2.py-1 {
        padding: 0.25rem 0.5rem;
    }
    
    .text-xs {
        font-size: 0.625rem;
    }
    
    .gap-2 {
        gap: 0.5rem;
    }
    
    .gap-6 {
        gap: 1rem;
    }
    
    .pt-24 {
        padding-top: 4rem;
    }
    
    .pb-16 {
        padding-bottom: 4rem;
    }
    
    /* 移动端底部导航栏 */
    .mobile-bottom-nav {
        display: none;
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .poem-title-link {
        font-size: 1rem;
    }
    
    .poem-content {
        font-size: 0.875rem;
    }
    
    .poem-info {
        font-size: 0.75rem;
    }
    
    .poem-tag-item {
        padding: 0.125rem 0.5rem;
        font-size: 0.625rem;
    }
    
    .poem-action-btn {
        width: 2rem;
        height: 2rem;
        padding: 0.25rem;
    }
    
    .search-input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.875rem;
    }
    
    .search-icon {
        left: 0.75rem;
    }
    
    .search-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

/* 优化移动端横向布局 */
@media (max-width: 640px) {
    footer .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    footer .space-y-3 > div,
    footer .space-y-4 > div {
        margin-bottom: 0.75rem;
    }
}

/* 平板横向和小屏幕电脑优化 */
@media (min-width: 641px) and (max-width: 1024px) {
    footer .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    footer .sm\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* 优化超小屏幕显示 */
@media (max-width: 360px) {
    footer {
        font-size: 0.75rem;
    }
    footer .text-xs {
        font-size: 0.65rem;
    }
    footer .text-sm {
        font-size: 0.7rem;
    }
    footer .p-1\.5 {
        padding: 0.3rem;
    }
}

/* 横向移动设备优化 */
@media (max-height: 480px) and (orientation: landscape) {
    footer {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    footer .text-xs {
        font-size: 0.6rem;
    }
    footer .text-sm {
        font-size: 0.65rem;
    }
    footer .sm\:py-1 {
        padding-top: 0.2rem;
        padding-bottom: 0.2rem;
    }
    footer .mt-6 {
        margin-top: 0.5rem;
    }
    footer .pt-4 {
        padding-top: 0.2rem;
    }
}