/* Telegram频道导航站 - 响应式样式表 */
/* 移动端优先 */

:root {
    --telegram-blue: #0088cc;
    --telegram-light-blue: #5cbbd6;
    --telegram-gradient: linear-gradient(135deg, #0a7fd9 0%, #5cb6ff 45%, #7ad8ff 100%);
    --primary-color: #0088cc;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --text-dark: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --border-color: #e0e0e0;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--telegram-blue);
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 5px;
}

.nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    padding: 10px 0;
}

.nav-menu.active {
    display: flex;
}

.nav-link {
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-light);
}

.nav-search {
    display: none;
}

.nav-search form {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 20px;
    padding: 5px 15px;
    margin: 10px 20px;
}

.nav-search input {
    flex: 1;
    border: none;
    background: none;
    padding: 5px;
    font-size: 0.9rem;
    outline: none;
}

.nav-search button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
}

/* ==================== Banner ==================== */
.banner {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 45%),
        radial-gradient(circle at 80% 80%, rgba(0, 57, 102, 0.2) 0%, rgba(0, 57, 102, 0) 42%),
        var(--telegram-gradient);
    color: white;
    padding: 60px 15px;
    text-align: center;
}

.banner h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.banner p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.banner-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.banner-search input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
    outline: none;
}

.banner-search button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 0 25px 25px 0;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.banner-search button:hover {
    background: #006699;
}

/* ==================== 面包屑 ==================== */
.breadcrumb {
    background: var(--bg-white);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb i {
    color: var(--text-lighter);
    font-size: 0.8rem;
}

/* ==================== 页面标题 ==================== */
.page-header {
    background: var(--bg-white);
    padding: 30px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.page-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.page-desc {
    color: var(--text-light);
    margin-bottom: 5px;
}

.page-info {
    color: var(--text-lighter);
    font-size: 0.9rem;
}

.search-header .page-desc strong {
    color: var(--primary-color);
}

/* ==================== 分类区域 ==================== */
.main {
    padding: 30px 15px;
}

.category-section {
    margin-bottom: 40px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.category-header h2 {
    font-size: 1.3rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.view-more {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.view-more:hover {
    color: #006699;
    gap: 8px;
}

/* ==================== 频道卡片网格 ==================== */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.channel-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
}

.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.channel-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-light);
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--telegram-gradient);
    color: white;
    font-size: 1.5rem;
}

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

.channel-info h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-username {
    font-size: 0.85rem;
    color: var(--text-lighter);
    margin-bottom: 5px;
}

.channel-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.channel-members {
    font-size: 0.8rem;
    color: var(--text-lighter);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==================== 加载更多按钮 ==================== */
.load-more {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.load-more:hover {
    background: var(--primary-color);
    color: white;
}

.load-more:disabled {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-lighter);
    cursor: not-allowed;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.page-link:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==================== 空状态 ==================== */
.empty-result {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-result i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--text-lighter);
}

.empty-result p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #006699;
}

/* ==================== 页脚 ==================== */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 40px 15px 20px;
    margin-top: 60px;
}

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

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--telegram-blue);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--telegram-blue);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== 响应式设计 ==================== */

/* 平板 */
@media (min-width: 768px) {
    .navbar .container {
        padding: 15px 30px;
    }

    .nav-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        background: none;
        box-shadow: none;
        padding: 0;
    }

    .nav-link {
        padding: 10px 15px;
    }

    .nav-search {
        display: block;
    }

    .nav-search form {
        margin: 0 0 0 20px;
    }

    .banner {
        padding: 80px 30px;
    }

    .banner h1 {
        font-size: 2.5rem;
    }

    .banner p {
        font-size: 1.2rem;
    }

    .main {
        padding: 40px 30px;
    }

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

/* 桌面 */
@media (min-width: 1024px) {
    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

    .channel-card {
        gap: 20px;
        padding: 20px;
    }

    .channel-avatar {
        width: 70px;
        height: 70px;
    }

    .channel-info h3 {
        font-size: 1.2rem;
    }
}

/* 手机横屏 */
@media (max-width: 767px) and (orientation: landscape) {
    .banner {
        padding: 30px 15px;
    }

    .banner h1 {
        font-size: 1.5rem;
    }

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

/* 小屏幕手机 */
@media (max-width: 480px) {
    .channel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .channel-card {
        gap: 8px;
        padding: 8px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .channel-avatar {
        width: 50px;
        height: 50px;
    }

    .banner h1 {
        font-size: 1.5rem;
    }

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

/* ==================== 加载动画 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.channel-card {
    animation: fadeIn 0.5s ease;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #006699;
}

/* ==================== 热搜关键词 ==================== */
.hot-keywords {
    margin-top: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hot-label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 14px;
}

.hot-tag {
    display: inline-block;
    background: rgba(0, 136, 204, 0.1);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.hot-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 136, 204, 0.3);
}

/* Banner区域的热搜关键词样式（蓝色背景下更清晰） */
.banner .hot-keywords {
    margin: 20px auto 0;
    justify-content: center;
    max-width: 600px;
}

.banner .hot-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.banner .hot-tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner .hot-tag:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* 页面头部热搜关键词样式调整 */
.page-header .hot-keywords {
    margin-top: 20px;
    justify-content: center;
}

.page-header .hot-label {
    color: var(--text-lighter);
}

/* 移动端热搜关键词 */
@media (max-width: 768px) {
    .hot-keywords {
        justify-content: center;
    }

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