/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #333;
    background-color: #f8f9fa;
}

/* 容器 */
.container {
    max-width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}



/* 搜索区域 */
.search-section {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.search-container {
    position: relative;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 450px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 30px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
    font-weight: 400;
}

.search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-input:focus {
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.search-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
}

.search-btn:active {
    transform: translateY(0);
}

.search-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* 悬浮刷新按钮 */
.floating-refresh-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 50px;
    height: 50px;
    background: rgba(0, 123, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    user-select: none;
}

.floating-refresh-btn:hover {
    background: rgba(0, 123, 255, 1);
    transform: scale(1.1);
}

.floating-refresh-btn:active {
    transform: scale(0.95);
}

.floating-refresh-icon {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.floating-refresh-btn:hover .floating-refresh-icon {
    transform: rotate(180deg);
}

/* 刷新按钮旋转动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.8);
}

.search-results.show {
    display: block;
    animation: searchResultsSlideIn 0.3s ease-out;
}

@keyframes searchResultsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
}

.search-result-item:active {
    transform: translateX(2px);
}

.search-result-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.search-result-item:hover .search-result-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.search-result-category {
    font-size: 0.8rem;
    color: #7f8c8d;
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
    padding: 4px 10px;
    border-radius: 15px;
    display: inline-block;
    font-weight: 500;
    border: 1px solid rgba(189, 195, 199, 0.3);
}

.search-no-results {
    padding: 30px 20px;
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    font-size: 0.95rem;
}

.search-no-results::before {
    content: "🔍";
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

/* 搜索区域响应式设计 */
@media (max-width: 768px) {
    .search-input-wrapper {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 12px 16px;
    }
    
    .search-btn {
        width: 44px;
        height: 44px;
    }
    
    .search-icon {
        font-size: 1.1rem;
    }
    
    .search-results {
        margin: 0 15px;
        width: calc(100% - 30px);
        left: 0;
        right: 0;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 16px 0;
    }
    
    .search-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .search-btn {
        width: 40px;
        height: 40px;
    }
    
    .search-icon {
        font-size: 1rem;
    }
    
    .search-results {
        margin: 0 10px;
        width: calc(100% - 20px);
    }
    
    .search-result-item {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .search-result-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

/* 轮播图区域 */
.carousel-section {
    margin-top: 0;
    width: 100%;
    background: #fff;
}

/* 公告区域 */
.announcement-section {
    background: #fff8dc;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
    overflow: hidden;
}

.homepage-scrolling-announcement {
    display: flex;
    align-items: center;
    padding: 0 15px;
    position: relative;
    white-space: nowrap;
}

.announcement-label {
    flex-shrink: 0;
    font-weight: 600;
    margin-right: 8px;
    color: #333;
    font-size: 12px;
}

.announcement-scroll-text {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.announcement-message {
    display: inline-block;
    animation: scrollText 20s linear infinite;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
}





.announcement-action {
    flex-shrink: 0;
}

.announcement-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.announcement-btn:hover {
    background: #0056b3;
}

/* 图片网格区域 - 单列矩形布局 */
.image-grid-section {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.image-grid-list {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 15px !important;
}

.image-grid-item {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-grid-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-grid-item .image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

/* 图片网格响应式设计 */
@media (max-width: 768px) {
    .image-grid-list {
        grid-template-columns: 1fr;
    }
}



/* 分类区域 */
.category-section {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
    padding: 0 15px;
}

.category-tag {
    position: relative;
    background: #f8f9fa;
    color: #333;
    padding: 5px 4px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    overflow: visible;
    white-space: nowrap;
}

.category-tag:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.category-tag.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.category-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: #fff;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    font-weight: 600;
}

/* 置顶推荐区域 */
.pinned-section {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.pinned-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 15px;
}

.pinned-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.pinned-category-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.current-category {
    background: #007bff;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.category-indicator {
    color: #999;
}

.pinned-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
}

.pinned-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
}

.pinned-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.placeholder-icon {
    font-size: 2rem;
    z-index: 2;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    gap: 0;
    min-height: 90px;
}

.card-header {
    margin-bottom: 1px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 0;
    flex-wrap: wrap;
    justify-content: space-between;
}

.rating {
    color: #ffc107;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating::before {
    content: "★";
    color: #ffc107;
}

/* 新的评分信息样式 */
.rating-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating-stars .star {
    font-size: 0.9rem;
    line-height: 1;
}

.rating-stars .star.full {
    color: #ffc107;
}

.rating-stars .star.half {
    color: #ffc107;
    opacity: 0.7;
}

.rating-stars .star.empty {
    color: #ddd;
}

.rating-score {
    color: #666;
    font-size: 0.75rem;
    font-weight: 500;
}

.downloads {
    color: #666;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.card-description {
    color: #666;
    line-height: 1.2;
    margin-bottom: 0;
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0;
}

.card-footer {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.release-time {
    color: #999;
    font-size: 0.7rem;
}

.separator {
    color: #ccc;
    font-size: 0.7rem;
}

.downloads {
    color: #999;
    font-size: 0.7rem;
}

.card-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.btn-view {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    position: absolute;
    bottom: 4px;
    right: 4px;
    z-index: 10;
}

/* 置顶标签样式 */
.pinned-tag {
    background: #ff4757;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    position: absolute;
    top: 12px;
    right: 12px;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
    z-index: 10;
}





.btn-view:hover {
    background: #0056b3;
    transform: translateY(-1px);
}



/* 空状态样式 */
.pinned-empty {
    text-align: center;
    padding: 40px 20px;
}

.empty-message {
    color: #666;
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    color: #ccc;
}

.empty-message p {
    font-size: 1rem;
    margin: 0;
    color: #999;
}

/* 置顶推荐响应式设计 */
@media (max-width: 768px) {
    .pinned-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pinned-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .card-meta {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .card-actions {
        flex-direction: column;
    }
    

}

@media (max-width: 480px) {
    .pinned-section {
        padding: 15px 0;
    }
    
    .pinned-header {
        padding: 0 10px;
    }
    
    .pinned-grid {
        padding: 0 10px;
    }
    
    .pinned-card {
        padding: 8px;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    .card-description {
        font-size: 0.85rem;
    }
}

/* 无限滚动样式 */
.pinned-grid {
    /* 启用平滑滚动 */
    scroll-behavior: smooth;
}

/* 滚动条样式优化 */
.pinned-section {
    /* 为整个页面启用平滑滚动 */
    scroll-behavior: smooth;
}

/* 内容卡片加载动画 */
.pinned-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动到底部时的提示 */
.scroll-end-indicator {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.scroll-end-indicator .icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.6;
}

/* 滚动加载状态 */
.loading-more {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* 轮播图样式 */
.carousel-container {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none !important;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto !important;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 10px 15px 8px;
    text-align: center;
}

.carousel-caption h3 {
    font-size: 0.9rem;
    margin-bottom: 2px;
    font-weight: 600;
}

.carousel-caption p {
    font-size: 0.7rem;
    margin: 0;
    opacity: 0.9;
}

/* 轮播图指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
}

/* 轮播图控制按钮 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.carousel-control:hover {
    background: rgba(0,0,0,0.7);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}





/* 后台管理系统样式 */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 2000;
    overflow-y: auto;
}

/* 管理员登录界面 */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

/* 后台管理主界面 */
.admin-main {
    display: block;
}

.admin-header {
    background: #007bff;
    color: #fff;
    padding: 6px 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 2001;
}

.admin-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.admin-logout {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.admin-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.admin-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.admin-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-nav {
    background: #f8f9fa;
    padding: 0 15px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.admin-nav-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    color: #666;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
}

.admin-nav-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: #fff;
}

.admin-nav-btn:hover {
    color: #007bff;
    background: #e9ecef;
}

.admin-content {
    padding: 15px 20px;
}

.admin-tab {
    display: none;
}

.admin-tab.active {
    display: block;
}



/* 内容过滤器 */
.content-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-control {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    min-width: 200px;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* 设置页面样式 */
.settings-content {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
}

.setting-group {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.setting-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.setting-group h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.tab-header h3 {
    margin: 0;
    color: #333;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
}

/* 列表样式 */
.category-list,
.content-list,
.carousel-list,
.announcement-list {
    display: grid;
    gap: 15px;
}

.category-item,
.content-item,
.carousel-item,
.announcement-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.item-info {
    margin-bottom: 15px;
}

.item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.item-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.item-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 富文本编辑器样式 */
#editor-wrapper,
#announcement-editor-wrapper {
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 5px;
}

#toolbar-container,
#announcement-toolbar-container {
    border-bottom: 1px solid #ccc;
    background-color: #f8f9fa;
}

#editor-container,
#announcement-editor-container {
    height: 300px;
    min-height: 200px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-nav {
        padding: 0 15px;
    }
    
    .admin-nav-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .item-actions {
        flex-direction: column;
    }
    
    .item-actions .btn {
        width: 100%;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .content-filters {
        flex-direction: column;
    }
    
    .form-control {
        min-width: auto;
    }
}

/* 公告类型样式 */
.announcement-section.announcement-info {
    border-left: 4px solid #17a2b8;
}

.announcement-section.announcement-warning {
    border-left: 4px solid #ffc107;
}

.announcement-section.announcement-success {
    border-left: 4px solid #28a745;
}

.announcement-section.announcement-error {
    border-left: 4px solid #dc3545;
}

/* 无内容提示 */
.no-content {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功/错误提示 */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid transparent;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* 表格样式优化 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #007bff;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.pagination button:hover {
    background: #007bff;
    color: #fff;
}

.pagination button.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination button:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* 文件上传样式 */
.file-upload {
    border: 2px dashed #dee2e6;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    color: #666;
    font-size: 0.9rem;
}

.file-upload-label strong {
    color: #007bff;
}

/* 拖拽排序样式 */
.sortable-item {
    cursor: move;
    transition: all 0.3s;
}

.sortable-item:hover {
    background-color: #f8f9fa;
}

.sortable-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}


/* 搜索高亮效果 */
.pinned-card.highlight {
    animation: highlightPulse 2s ease-in-out;
    border-color: #007bff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

@keyframes highlightPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* 响应式优化 */
@media (max-width: 480px) {
    .login-container {
        padding: 20px;
        margin: 20px;
    }
    
    .admin-header {
        padding: 15px;
        gap: 15px;
    }
    
    .admin-user {
        order: -1;
    }
    
    .dashboard-stats {
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .quick-actions .btn {
        width: 100%;
    }
}

/* 富文本编辑器加载状态样式 */
.editor-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.editor-loading p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.editor-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: #fff5f5;
    border: 2px dashed #feb2b2;
    border-radius: 8px;
    min-height: 200px;
}

.error-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.editor-error p {
    color: #e53e3e;
    font-size: 14px;
    margin-bottom: 16px;
}

.retry-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.retry-btn:hover {
    background: #c53030;
}

/* 移动端编辑器加载状态优化 */
@media (max-width: 768px) {
    .editor-loading, .editor-error {
        min-height: 150px;
        padding: 20px 15px;
    }
    
    .loading-spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .error-icon {
        font-size: 24px;
    }
}

/* 图片上传样式 */
.image-upload-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background-color: #fafafa;
    transition: border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.image-upload-container:hover {
    border-color: #007bff;
}

.upload-image-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.upload-image-btn:hover {
    background-color: #0056b3;
}

.image-upload-preview {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.image-upload-preview img {
    flex-shrink: 0;
}

.remove-image-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.remove-image-btn:hover {
    background-color: #c82333;
}

/* 内容详情页样式 */
.content-detail-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 1000;
    overflow-y: auto;
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.detail-header {
    position: sticky;
    top: 0;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.back-btn {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #007bff;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.back-btn:hover {
    background-color: #f8f9fa;
}



.detail-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: center;
}

.detail-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.scrolling-announcement {
    background: #fff8dc;
    color: #333;
    padding: 12px 20px;
    margin: -20px -20px 20px -20px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.announcement-text {
    display: inline-block;
    animation: scrollText 15s linear infinite;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
}

@keyframes scrollText {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 移除了详情页元数据、评分、统计信息和图片的样式 */

.detail-description {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.detail-rich-content {
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding: 0;
    text-align: center;
}

.detail-rich-content h1,
.detail-rich-content h2,
.detail-rich-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
}

.detail-rich-content h1:first-child,
.detail-rich-content h2:first-child,
.detail-rich-content h3:first-child {
    margin-top: 0;
}

.detail-rich-content p {
    margin-bottom: 15px;
}

.detail-rich-content ul,
.detail-rich-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.detail-rich-content li {
    margin-bottom: 5px;
}

.detail-rich-content strong {
    font-weight: 600;
    color: #333;
}

.detail-rich-content em {
    font-style: italic;
}

.detail-rich-content u {
    text-decoration: underline;
}

/* 移除了下载和分享按钮的样式 */

/* 响应式设计 */

@media (max-width: 768px) {
    .detail-content {
        padding: 15px;
    }
    
    
    /* 移除了详情页元数据和统计信息的响应式样式 */
    
    /* 移除了下载和分享按钮的响应式样式 */
}

/* 下载按钮样式 */
.btn-download {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.3s ease;
}

.btn-download:hover {
    background: #218838;
}

.btn-download-detail {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-download-detail:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.download-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

/* 内容区域分区样式 */
.pinned-recommendations {
    margin-bottom: 40px;
}

.latest-posts {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #28a745;
}