/* 竞品风格的紧凑卡片布局 - v2.0 */

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-size: 14px;
}

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

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #0088cc;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background-color: #0088cc;
    color: white;
    transform: translateY(-1px);
}

/* 主要内容区域 */
.main {
    padding: 30px 0;
    min-height: calc(100vh - 140px);
}

/* 搜索和筛选区域 */
.filter-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.search-input:focus {
    border-color: #0088cc;
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
    background: white;
}

.search-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

/* 分类筛选 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid #e1e5e9;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #0088cc;
    transform: translateY(-1px);
}

.category-btn.active {
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: white;
    border-color: #0088cc;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

/* 分类标题样式 */
.category-section {
    margin-bottom: 30px;
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border-left: 4px solid #0088cc;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* 紧凑卡片网格 */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

/* 紧凑卡片设计 - 模仿竞品 */
.channel-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    cursor: pointer;
}

.channel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    border-color: rgba(0, 136, 204, 0.3);
    background: rgba(255, 255, 255, 0.98);
}

/* 水平布局：头像在左，信息在右 */
.channel-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-word;
}

.channel-description {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

/* 分类标签（小版本） */
.channel-category {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

/* 热度指示器 */
.hotness-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 136, 204, 0.1);
    border-top: 3px solid #0088cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 底部 */
.footer {
    background: rgba(51, 51, 51, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* 5. 优化导航栏 - 保持顶部固定，增强移动端体验 */
    .header {
        padding: 12px 0;
        box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    }
    
    .header .container {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    /* 1. 触摸友好 - 增大导航链接点击区域 */
    .nav-link {
        padding: 12px 20px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    /* 1. 触摸反馈效果 */
    .nav-link:active {
        transform: scale(0.98);
        background-color: #0066aa;
    }
    
    .search-box {
        flex-direction: column;
        gap: 12px;
    }
    
    /* 1. 触摸友好 - 增大搜索按钮 */
    .search-btn {
        min-height: 48px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .search-input {
        min-height: 48px;
        font-size: 16px;
        border-radius: 8px;
        padding: 12px 16px;
    }
    
    /* 4. 间距优化 - 增大卡片间距避免误触 */
    .channels-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* 2. 分类滑动优化 */
    .category-filter {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding-bottom: 8px;
        margin-bottom: 8px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
    
    .category-filter::-webkit-scrollbar {
        height: 4px;
    }
    
    .category-filter::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.1);
        border-radius: 2px;
    }
    
    .category-filter::-webkit-scrollbar-thumb {
        background: #0088cc;
        border-radius: 2px;
    }
    
    /* 1. 触摸友好 - 优化分类按钮 */
    .category-btn {
        min-height: 44px;
        padding: 12px 20px;
        margin-right: 8px;
        font-size: 15px;
        border-radius: 22px;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        white-space: nowrap;
    }
    
    /* 1. 触摸反馈 */
    .category-btn:active {
        transform: scale(0.95);
    }
    
    /* 4. 间距优化 - 紧凑布局卡片优化 */
    .channel-card {
        padding: 16px;
        min-height: 100px;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    /* 1. 触摸反馈 - 紧凑卡片 */
    .channel-card:active {
        transform: scale(0.98);
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    }
    
    .filter-section {
        padding: 20px 16px;
        margin: 15px 8px;
        border-radius: 16px;
    }
    
    /* 4. 文字大小优化 - 紧凑布局 */
    .category-title {
        font-size: 20px;
        padding: 12px 0;
        margin-bottom: 16px;
    }
    
    .channel-header {
        gap: 12px;
    }
    
    .channel-name {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 4px;
    }
    
    .channel-description {
        font-size: 14px;
        line-height: 1.5;
        color: #666;
    }
    
    .channel-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }
    
    .channel-header {
        gap: 10px;
    }
    
    .channel-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .channel-name {
        font-size: 14px;
    }
    
    .channel-description {
        font-size: 12px;
    }
}

/* 管理页面样式 */
.admin-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-input:focus {
    outline: none;
    border-color: #0088cc;
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
    background: white;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.btn-primary {
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.admin-list {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-item {
    padding: 20px;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.admin-item:hover {
    background: rgba(248, 250, 252, 0.8);
}

.admin-item:last-child {
    border-bottom: none;
}

.admin-item-info {
    flex: 1;
    min-width: 0;
}

.admin-item-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a1a1a;
    font-size: 14px;
}

.admin-item-category {
    color: #64748b;
    font-size: 12px;
}