/**
 * 订阅组归档页面主样式
 * 包含基础布局、响应式设计和通用组件
 */

/* 基础重置 */
.subscription-archive-container *,
.subscription-archive-container *::before,
.subscription-archive-container *::after {
    box-sizing: border-box;
}

/* 主容器 */
.subscription-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    color: #333;
    background: #fafafa;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* 顶部区域 */
.subscription-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.subscription-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1a1a2e;
    position: relative;
    display: inline-block;
}

.subscription-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3a36e0, #4facfe);
}

.subscription-description {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #666;
}

/* 搜索与筛选区域 */
.subscription-filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 15px;
}

/* 搜索框样式 */
.subscription-search-box {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.subscription-search-box input[type="search"] {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #eee;
    border-radius: 25px;
    font-size: 1rem;
    background: #f9f9f9;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset;
    height: 46px;
}

.subscription-search-box input[type="search"]:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2);
    background: #fff;
}

.subscription-search-box button {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.subscription-search-box button:hover {
    color: #999;
    transform: translateY(-50%);
    background-color: unset;
}

/* 筛选器下拉菜单 */
.subscription-filter-select {
    position: relative;
    min-width: 220px;
}

.subscription-filter-select select {
    appearance: none;
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #eee;
    border-radius: 25px;
    font-size: 1rem;
    background: #f9f9f9;
    cursor: pointer;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    height: 46px;
}

.subscription-filter-select select:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2);
    background: #fff;
}

.subscription-filter-select::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
    transition: all 0.2s ease;
}

.subscription-filter-select:hover::after {
    border-color: #4facfe;
    transform: translateY(-30%) rotate(45deg);
}

/* 布局切换按钮 */
.subscription-layout-toggle {
    display: flex;
    gap: 5px;
}

.subscription-layout-toggle button {
    background: #f1f1f1;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #888;
}

.subscription-layout-toggle button.active {
    background: #4facfe;
    color: white;
    box-shadow: 0 2px 10px rgba(79, 172, 254, 0.3);
}

/* 主内容区域 */
.subscription-content-wrapper {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.subscription-main-content {
    flex: 1;
    width: 100%;
    min-width: 0; /* 防止flex项目溢出 */
}

.subscription-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* 加载指示器 */
.subscription-loading {
    text-align: center;
    padding: 30px;
    display: none;
}

.subscription-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 172, 254, 0.3);
    border-radius: 50%;
    border-top-color: #4facfe;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 无结果提示 */
.no-groups-found {
    text-align: center;
    padding: 60px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.no-groups-found p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.no-groups-found .suggestion {
    color: #4facfe;
    font-weight: 500;
}

/* 分页导航 */
.subscription-pagination {
    margin-top: 40px;
    text-align: center;
}

.subscription-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    background: white;
    border-radius: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.subscription-pagination li {
    margin: 0;
}

.subscription-pagination a,
.subscription-pagination .current {
    display: inline-block;
    padding: 12px 18px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    min-width: 45px;
    transition: all 0.2s ease;
}

.subscription-pagination a:hover {
    background: #f7f7f7;
    color: #4facfe;
}

.subscription-pagination .current {
    background: #4facfe;
    color: white;
}

.subscription-pagination .dots {
    padding: 12px 18px;
    color: #999;
}

/* 侧边栏样式 */
.subscription-sidebar-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.subscription-sidebar-section:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.subscription-sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f1f1;
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
    position: relative;
}

.subscription-sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-left: 15px;
}

.subscription-sidebar-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(to bottom, #4facfe, #00f2fe);
    border-radius: 2px;
}

.subscription-sidebar-content {
    padding: 20px;
    background-color: #fff;
}

.categories-list,
.popular-list,
.recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li,
.popular-list li,
.recent-list li {
    border-bottom: 1px solid #f1f1f1;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.categories-list li:last-child,
.popular-list li:last-child,
.recent-list li:last-child {
    border-bottom: none;
}

.categories-list a,
.popular-list a,
.recent-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 3px 0;
}

.categories-list a:hover,
.popular-list a:hover,
.recent-list a:hover {
    color: #4facfe;
    padding-left: 5px;
}

.categories-list .count,
.popular-list .count,
.recent-list .date {
    background: #f5f5f5;
    color: #888;
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 15px;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
}

.categories-list a:hover .count,
.popular-list a:hover .count {
    background: #4facfe;
    color: white;
}

/* 热门订阅组特殊样式 */
.popular-list li {
    position: relative;
    padding-left: 22px;
}

.popular-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #4facfe;
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.popular-list li:hover::before {
    background: #ff416c;
    transform: translateY(-50%) scale(1.5);
    opacity: 1;
}

.popular-list li:nth-child(1)::before,
.popular-list li:nth-child(2)::before,
.popular-list li:nth-child(3)::before {
    background: #ff416c;
    width: 8px;
    height: 8px;
    opacity: 1;
}

.popular-list span.rank {
    font-size: 0.7rem;
    font-weight: bold;
    color: #888;
    margin-right: 8px;
    min-width: 14px;
    text-align: center;
}

.popular-list li:nth-child(1) span.rank,
.popular-list li:nth-child(2) span.rank,
.popular-list li:nth-child(3) span.rank {
    color: #ff416c;
}

/* 最新订阅组特殊样式 */
.recent-list li {
    position: relative;
}

.recent-list .date {
    font-size: 0.75rem;
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.2);
    padding: 1px 8px;
}

.recent-list a:hover .date {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .subscription-content-wrapper {
        flex-direction: column;
    }
    
    .subscription-main-content,
    .subscription-sidebar {
        width: 100%;
    }
    
    .subscription-sidebar {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .subscription-filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .subscription-filter-select,
    .subscription-layout-toggle {
        width: 100%;
        margin-top: 10px;
    }
    
    .subscription-title {
        font-size: 2rem;
    }
    
    .subscription-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .subscription-archive-container {
        padding: 20px 15px;
    }
    
    .subscription-pagination a,
    .subscription-pagination .current {
        padding: 10px 15px;
        min-width: 40px;
    }
    
    .subscription-title {
        font-size: 1.8rem;
    }
}

.no-items {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: 15px 0;
    margin: 0;
    background: rgba(0,0,0,0.02);
    border-radius: 4px;
}

/* 订阅组简介样式 */
.sg-group-description {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 5px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sg-group-description p {
    margin: 0 0 10px;
    line-height: 1.6;
    color: #333;
}

.sg-group-description p:last-child {
    margin-bottom: 0;
    font-size: 13px;
}

.sg-group-description ul, 
.sg-group-description ol {
    margin-left: 20px;
    margin-bottom: 10px;
    color: #333;
}

.sg-group-description img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.sg-group-description a {
    color: #3498db;
    text-decoration: none;
}

.sg-group-description a:hover {
    text-decoration: underline;
} 