/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #FFF5F7;
    color: #333333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #FF6B8B;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 加载动画 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #FFEFF2;
    border-top: 5px solid #FF5C7F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 头部样式 */
header {
    background-color: #FFEFF2;
    box-shadow: 0 2px 10px rgba(255, 175, 189, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #FF5C7F;
}

.logo img {
    height: 40px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background-color: #FF5C7F;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #FFCCD5;
    border-radius: 25px;
    background-color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #FF8FA3;
    box-shadow: 0 0 0 3px rgba(255, 143, 163, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #FF8FA3;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #FF5C7F;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #FF3366;
}

.loading-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    gap: 5px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background-color: #FF5C7F;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    font-weight: 500;
    color: #555;
    position: relative;
}

.nav-links a.active {
    color: #FF5C7F;
}

.nav-links a.active:after {
    width: 100%;
}

.nav-links a:hover {
    color: #FF5C7F;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #FF5C7F;
    transition: width 0.3s ease;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #FF5C7F;
    cursor: pointer;
}

/* 英雄区样式 */
.hero-banner {
    background-color: #FFE6EA;
    padding: 60px 0;
    margin-bottom: 40px;
}

.banner-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.banner-content h1 {
    font-size: 36px;
    color: #FF5C7F;
    margin-bottom: 20px;
}

.banner-content p {
    font-size: 18px;
    color: #777;
    margin-bottom: 30px;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.btn-primary {
    background-color: #FF5C7F;
    color: white;
    border: 2px solid #FF5C7F;
}

.btn-primary:hover {
    background-color: #FF3366;
    border-color: #FF3366;
    color: white;
}

.btn-secondary {
    background-color: white;
    color: #FF5C7F;
    border: 2px solid #FF5C7F;
}

.btn-secondary:hover {
    background-color: #FFEFF2;
}

/* 主内容区通用样式 */
main {
    padding: 40px 0;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    color: #FF5C7F;
}

.page-title h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.page-title p {
    color: #777;
    max-width: 700px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 24px;
    color: #FF5C7F;
}

.section-header:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #FF8FA3;
    border-radius: 3px;
}

.view-all {
    color: #FF5C7F;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all:hover {
    text-decoration: underline;
}

/* 分类区域 */
.category-section {
    margin-bottom: 60px;
}

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

.category-card {
    background-color: white;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 175, 189, 0.1);
    transition: box-shadow 0.3s ease;
}

.category-card:hover {
    box-shadow: 0 10px 25px rgba(255, 175, 189, 0.2);
}

.category-icon {
    font-size: 36px;
    margin-bottom: 15px;
    color: #FF5C7F;
}

.category-name {
    font-weight: 600;
    color: #333;
}

/* 文章列表区域 */
.articles-section {
    margin: 30px 0 60px;
}

.articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(255, 175, 189, 0.1);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: 0 10px 25px rgba(255, 175, 189, 0.2);
}

.article-title-container {
    margin-bottom: 15px;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px;
}

.article-title a {
    color: #333;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.article-title a:hover {
    color: #FF5C7F;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #777;
    font-size: 14px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #FFEFF2;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    color: #FF8FA3;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.article-tag {
    background-color: #FFEFF2;
    color: #FF5C7F;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background-color: #FF5C7F;
    color: white;
}

/* 网站列表区域 */
.sites-section {
    margin-bottom: 60px;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.site-card {
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 175, 189, 0.1);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-card:hover {
    box-shadow: 0 10px 25px rgba(255, 175, 189, 0.2);
}

.site-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: #FFEFF2;
    padding: 5px;
}

.site-logo-large {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #FFEFF2;
    padding: 10px;
}

.default-logo {
    width: 60px;
    height: 60px;
    background-color: #FFE6EA;
    color: #FF5C7F;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.default-logo-large {
    width: 120px;
    height: 120px;
    background-color: #FFE6EA;
    color: #FF5C7F;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.site-info {
    width: 100%;
}

.site-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-domain {
    font-size: 13px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-desc {
    font-size: 12px;
    color: #555;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 热门标签区域 */
.tags-section {
    margin: 60px 0;
}

.section-title {
    font-size: 24px;
    color: #FF5C7F;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.section-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #FF8FA3;
    border-radius: 3px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tag {
    background-color: white;
    border: 1px solid #FFCCD5;
    color: #555;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background-color: #FF5C7F;
    color: white;
    border-color: #FF5C7F;
}

.tag.hot {
    position: relative;
}

.tag.hot:before {
    content: '热门';
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #FF3366;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
}

/* 详情页样式 */
.detail-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(255, 175, 189, 0.1);
    padding: 30px;
    margin-bottom: 40px;
}

.detail-header, .tag-header, .directory-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #FFEFF2;
}

.detail-title {
    font-size: 28px;
    color: #FF5C7F;
    margin-bottom: 15px;
}

.tag-header h1, .directory-header h1 {
    font-size: 28px;
    color: #FF5C7F;
    margin-bottom: 15px;
}

.tag-count, .directory-count {
    color: #777;
    font-size: 16px;
}

.site-detail {
    margin-bottom: 40px;
}

.site-info-box {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.site-main-info {
    flex: 1;
    min-width: 300px;
}

.site-main-info p {
    margin-bottom: 15px;
    font-size: 16px;
}

.site-main-info strong {
    color: #FF5C7F;
    width: 100px;
    display: inline-block;
}

.visit-site {
    margin-top: 20px;
}

.read-more {
    display: inline-block;
    background-color: #FF5C7F;
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    background-color: #FF3366;
    color: white;
}

.related-title {
    font-size: 22px;
    color: #FF5C7F;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
}

.related-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #FF8FA3;
    border-radius: 3px;
}

/* 文章详情相关样式 */
.article-detail {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(255, 175, 189, 0.1);
    margin-bottom: 40px;
}

.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #FFEFF2;
    padding-bottom: 20px;
}

.article-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.article-content h2, .article-content h3 {
    color: #333;
    margin: 1.5em 0 0.8em;
    font-weight: 600;
}

.resource-info {
    background-color: #FFF5F7;
    border-left: 4px solid #FF5C7F;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 30px 0;
}

.resource-info h3 {
    color: #FF5C7F;
    margin-bottom: 15px;
    font-size: 18px;
}

.resource-link {
    display: flex;
    gap: 10px;
}

.resource-link input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #FFCCD5;
    border-radius: 6px;
    font-size: 14px;
}

.copy-btn {
    background-color: #FF5C7F;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #E64A6C;
}

.article-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
}

.share-btn, .like-btn {
    background-color: white;
    border: 1px solid #FFCCD5;
    color: #FF5C7F;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.share-btn:hover, .like-btn:hover {
    background-color: #FF5C7F;
    color: white;
}

.related-articles {
    margin: 40px 0;
}

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

.related-article {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(255, 175, 189, 0.1);
    transition: box-shadow 0.3s ease;
}

.related-article:hover {
    box-shadow: 0 5px 15px rgba(255, 175, 189, 0.2);
}

.related-article h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
}

/* 分类筛选 */
.category-filter {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(255, 175, 189, 0.1);
}

.category-filter ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
}

.category-filter a {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #FFCCD5;
}

.category-filter a:hover {
    background-color: #FFEFF2;
    color: #FF5C7F;
}

.category-filter a.active {
    background-color: #FF5C7F;
    color: white;
    border-color: #FF5C7F;
}

/* 无结果样式 */
.no-results, .no-articles, .no-data {
    text-align: center;
    padding: 60px 20px;
    background-color: #FFF5F7;
    border-radius: 12px;
    margin-bottom: 40px;
}

.no-results-icon, .no-articles-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #FFCCD5;
}

.no-results p, .no-articles p, .no-data {
    color: #777;
    margin-bottom: 25px;
    font-size: 16px;
}

.btn-reset {
    display: inline-block;
    background-color: #FF5C7F;
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-reset:hover {
    background-color: #FF3366;
    color: white;
}

/* 分页样式 */
.pagination-container {
    margin-top: 30px;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px;
    flex-wrap: wrap;
}

.page-link, .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #FFCCD5;
    color: #555;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover, .page-btn:hover {
    background-color: #FFEFF2;
    color: #FF5C7F;
    border-color: #FF8FA3;
}

.page-link.active, .pagination .current {
    background-color: #FF5C7F;
    color: white;
    border-color: #FF5C7F;
}

.page-btn.prev, .page-btn.next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

.page-ellipsis {
    color: #999;
    padding: 0 5px;
}

/* 调试信息 */
.debug-info {
    background: #f8f8f8;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    display: none;
}

/* 页脚样式 */
footer {
    background-color: #FFEFF2;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: #FF5C7F;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #FF8FA3;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #666;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #FF5C7F;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #FFCCD5;
    color: #888;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .articles-list, .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .sites-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        width: 100%;
        margin: 15px 0 0;
        max-width: none;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        padding: 15px 20px;
        border-bottom: 1px solid #f5f5f5;
        display: block;
    }

    .nav-links a:after {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-banner {
        padding: 40px 0;
    }

    .banner-content h1 {
        font-size: 28px;
    }

    .btn-primary, .btn-secondary {
        display: block;
        margin: 10px auto;
        width: 80%;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .articles-list, .articles-grid {
        grid-template-columns: 1fr;
    }

    .sites-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .detail-container {
        padding: 20px;
    }

    .detail-title, .tag-header h1, .directory-header h1 {
        font-size: 24px;
    }

    .site-info-box {
        flex-direction: column;
        text-align: center;
    }

    .site-main-info {
        min-width: auto;
    }

    .site-main-info strong {
        display: inline-block;
        text-align: left;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .category-filter ul {
        gap: 10px;
    }

    .category-filter a {
        padding: 6px 12px;
        font-size: 13px;
    }

    .pagination {
        gap: 5px;
    }

    .page-link, .page-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .pagination .current {
        width: 34px;
        height: 34px;
    }

    .article-header h1 {
        font-size: 24px;
    }

    .resource-link {
        flex-direction: column;
    }

    .copy-btn {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .page-title h1 {
        font-size: 26px;
    }

    .banner-content h1 {
        font-size: 24px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .section-header h2, .section-title {
        font-size: 20px;
    }

    .articles-list, .categories-grid, .sites-grid {
        grid-template-columns: 1fr;
    }

    .sites-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-title, .tag-header h1, .directory-header h1 {
        font-size: 20px;
    }

    .related-title {
        font-size: 18px;
    }

    .tags-container {
        gap: 10px;
    }

    .tag {
        padding: 6px 12px;
        font-size: 13px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .article-actions {
        flex-direction: column;
    }

    .share-btn, .like-btn {
        width: 100%;
        justify-content: center;
    }
}