/* 全局样式 */
body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #e9f0ff, #ffffff);
    color: #333;
}

/* 标题区域 */
header {
    background: linear-gradient(90deg, #0a3d91, #1976d2);
    color: #fff;
    text-align: center;
    padding: 20px 10px;         /* 10px，缩小上下间距 */
    font-size: 1.8em;           /* 从 2.4em 改为 1.8em，标题更小 */
    font-weight: bold;
    letter-spacing: 1px;        /* 缩小字间距 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}
header h1 {
    margin: 0.4em 0;  /* 原来是默认1em上下间距，现在缩小到0.4em */
}
header p {
    font-size: 0.9em;           /* 从 1em 改为 0.9em */
    margin-top: 5px;
    opacity: 0.9;
}

.site-name {
    font-weight: 700;
    font-size: 1.2em;
    background: linear-gradient(45deg, #ffb347, #ff7e29, #ffae42); /* 橘色渐变 */
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 5px rgba(255, 140, 0, 0.7), 0 0 10px rgba(255, 99, 0, 0.5);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(255, 140, 0, 0.7), 0 0 10px rgba(255, 99, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 180, 0, 0.9), 0 0 20px rgba(255, 130, 0, 0.7);
    }
    100% {
        text-shadow: 0 0 5px rgba(255, 140, 0, 0.7), 0 0 10px rgba(255, 99, 0, 0.5);
    }
}

/* 动态微光闪烁 */
@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(255, 215, 0, 0.7), 0 0 10px rgba(255, 165, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 255, 100, 0.9), 0 0 20px rgba(255, 200, 0, 0.7);
    }
    100% {
        text-shadow: 0 0 5px rgba(255, 215, 0, 0.7), 0 0 10px rgba(255, 165, 0, 0.5);
    }
}

/* 默认：大屏幕下在一行显示 */
.title-part,
.subtitle-part {
    display: inline;   /* 默认在一行 */
}

/* 搜索框容器 */
.search-container {
    margin-top: 10px;
}

/* 搜索输入框 */
.search-container input {
    width: 80%;
    max-width: 375px;
    padding: 4px 20px 2px 20px;          /* 缩小内边距 */
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 0.75em;           /* 字体缩小 */
    outline: none;
    transition: 0.3s ease;
}
.search-container input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 4px rgba(25, 118, 210, 0.3);
}

/* 搜索按钮 */
.search-container button {
    padding: 8px 14px;          /* 缩小按钮 */
    margin-left: 8px;
    border: none;
    border-radius: 20px;
    background: #1976d2;
    color: #fff;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-container button:hover {
    background: #0d47a1;
}

/* 区域块 */
.channel-section {
    max-width: 1300px;
    margin: 50px auto;
    padding: 0 20px;
}

/* 区域标题 */
.section-title {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 25px;
    border-left: 5px solid #1976d2;
    padding-left: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 网格布局 */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

/* 频道卡片 */
.channel-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 悬停效果 */
.channel-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 缩略图 */
.channel-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: #f0f0f0;
}

/* 频道名称 */
.channel-card p {
    margin: 12px 0;
    font-size: 1.05em;
    font-weight: 600;
    color: #333;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 底部版权 */
footer {
    text-align: center;                  /* 内容居中 */
    padding: 20px 0;                     /* 上下间距 */
    color: #555;                         /* 字体颜色更柔和 */
    font-size: 0.95em;
    background: linear-gradient(to top, #f2f2f2, #ffffff); /* 浅灰渐变背景 */
    border-top: 1px solid #ddd;          /* 上边框 */
}

footer a {
    text-decoration: none;               /* 去掉下划线 */
    color: #1976d2;                      /* 主色调蓝色 */
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

footer a:hover {
    color: #0d47a1;                      /* 悬停更深蓝色 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 适配平板和手机 */
@media (max-width: 992px) {
    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .channel-card img {
        height: 90px;
    }
}

@media (max-width: 600px) {
    header {
        font-size: 1.6em;
        padding: 20px 5px;
    }

    header h1 {
        margin: 0.2em 0;  /* 手机上上下间距更小 */
    }

    .search-container input {
        width: 85%;
        font-size: 0.9em;
        padding: 8px 12px;
    }

    .search-container button {
        padding: 8px 14px;
        font-size: 0.9em;
    }

    .channel-card p {
        font-size: 0.85em;
        margin: 8px 0;
    }

    .channel-card img {
        height: 80px;
    }
}

/* 在手机屏幕宽度小于600px时强制换行 */
@media (max-width: 600px) {
    .title-part,
    .subtitle-part {
        display: block;  /* 小屏幕强制换行 */
    }
}
