/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: #333;
}
a:hover {
    color: #1677ff;
}
ul {
    list-style: none;
}

/* 顶部导航条 */
.top-bar {
    background-color: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    font-size: 13px;
    color: #999;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.top-bar .left a, .top-bar .right a {
    color: #666;
    margin-right: 15px;
}
.top-bar .left a:hover, .top-bar .right a:hover {
    color: #1677ff;
}
.top-bar .right span {
    margin-right: 15px;
    color: #999;
}

/* 主体容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

/* 搜索区域 */
.search-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.logo {
    font-size: 28px;
    font-weight: 700;
    color: #1677ff;
    margin-right: 30px;
    letter-spacing: 2px;
    white-space: nowrap;
}
.logo span {
    color: #ff6a00;
}
.search-box {
    flex: 1;
    display: flex;
    min-width: 280px;
}
.search-box form {
    display: flex;
    flex: 1;
    min-width: 280px;
}
.search-box input {
    flex: 1;
    height: 42px;
    border: 2px solid #1677ff;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
}
.search-box button {
    height: 42px;
    padding: 0 25px;
    background-color: #1677ff;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}
.search-box button:hover {
    background-color: #0958d9;
}

/* 内容网格 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}
@media (max-width: 850px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* 左侧：网址导航卡片 */
.nav-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}
.nav-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
    margin-bottom: 14px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-card h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: #1677ff;
}
.nav-card h3 .more-link {
    font-size: 13px;
    font-weight: 400;
    color: #999;
    cursor: pointer;
}
.nav-card h3 .more-link:hover {
    color: #1677ff;
}
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}
.nav-links a {
    font-size: 14px;
    color: #444;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.nav-links a:hover {
    color: #1677ff;
    border-bottom-color: #1677ff;
}

/* ===== 影视/小说卡片样式 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 4px;
}
.card-item {
    background: #f7f9fc;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #f0f2f5;
}
.card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
    border-color: #1677ff;
}
.card-item .poster {
    width: 100%;
    aspect-ratio: 2 / 2.8;
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #6b8cff;
    font-weight: 300;
    position: relative;
    overflow: hidden;
}
/* 模拟不同海报底色 */
.card-item:nth-child(1) .poster { background: linear-gradient(135deg, #fecaca, #fca5a5); }
.card-item:nth-child(2) .poster { background: linear-gradient(135deg, #bbf7d0, #86efac); }
.card-item:nth-child(3) .poster { background: linear-gradient(135deg, #fde68a, #fcd34d); }
.card-item:nth-child(4) .poster { background: linear-gradient(135deg, #bfdbfe, #93c5fd); }
.card-item:nth-child(5) .poster { background: linear-gradient(135deg, #e9d5ff, #d8b4fe); }
.card-item:nth-child(6) .poster { background: linear-gradient(135deg, #fecdd3, #fda4af); }
.card-item:nth-child(7) .poster { background: linear-gradient(135deg, #c4b5fd, #a78bfa); }
.card-item:nth-child(8) .poster { background: linear-gradient(135deg, #fdba74, #fb923c); }
.card-item:nth-child(9) .poster { background: linear-gradient(135deg, #a7f3d0, #6ee7b7); }
.card-item:nth-child(10) .poster { background: linear-gradient(135deg, #fca5a5, #f87171); }

.card-item .poster .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}
.card-item .poster .episodes {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}
.card-item .info {
    padding: 8px 10px 10px;
}
.card-item .info .title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-item .info .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}
.card-item .info .meta .tags span {
    background: #eef2f6;
    padding: 0 8px;
    border-radius: 10px;
    margin-right: 4px;
    font-size: 11px;
    color: #666;
}
.card-item .info .meta .rating {
    color: #f59e0b;
    font-weight: 600;
}
.card-item .info .desc {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右侧小工具卡片 */
.widget-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}
.widget-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.widget-card h4 .more-link {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    cursor: pointer;
}
.widget-card h4 .more-link:hover {
    color: #1677ff;
}
.widget-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px dashed #f5f5f5;
}
.widget-item:last-child {
    border-bottom: none;
}

/* 热搜列表样式 */
.hot-list {
    list-style: none;
    padding: 0;
}
.hot-list li {
    display: flex;
    align-items: flex-start;
    padding: 7px 0;
    border-bottom: 1px solid #f2f4f7;
    font-size: 14px;
    line-height: 1.5;
}
.hot-list li:last-child {
    border-bottom: none;
}
.hot-list .index {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #e6e8eb;
    color: #555;
    text-align: center;
    line-height: 20px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 2px;
    font-weight: 600;
}
.hot-list .index.top1 {
    background: #f24a4a;
    color: #fff;
}
.hot-list .index.top2 {
    background: #f58a3c;
    color: #fff;
}
.hot-list .index.top3 {
    background: #f5b342;
    color: #fff;
}
.hot-list .hot-text {
    color: #222;
    flex: 1;
}
.hot-list .hot-text:hover {
    color: #1677ff;
}
.hot-list .tag {
    background: #f0f2f5;
    font-size: 11px;
    padding: 0 8px;
    border-radius: 10px;
    color: #777;
    margin-left: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.hot-list .tag.hot {
    background: #ffebec;
    color: #e54545;
}
.hot-list .tag.new {
    background: #e6f7ff;
    color: #1677ff;
}

/* 游戏模块 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.game-item {
    background: #f7f9fc;
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
    font-size: 13px;
    color: #555;
    transition: 0.2s;
    cursor: default;
}
.game-item:hover {
    background: #e6f0ff;
    color: #1677ff;
}
.game-item .icon {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 25px 0 15px;
    color: #aaa;
    font-size: 13px;
    border-top: 1px solid #e8e8e8;
    margin-top: 20px;
}
.footer a {
    color: #888;
    margin: 0 8px;
}
.footer a:hover {
    color: #1677ff;
}

/* 天气占位 */
.weather-placeholder {
    background: #f7f9fc;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    color: #888;
    font-size: 14px;
}
.weather-placeholder strong {
    color: #333;
}
.slogan-box {
    background: #f7f9fc;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 8px 0;
    font-size: 14px;
    color: #555;
    text-align: center;
    border-left: 4px solid #1677ff;
}
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}
.tag-group span {
    background: #f0f2f5;
    padding: 2px 14px;
    border-radius: 12px;
    font-size: 13px;
    color: #555;
}
.tag-group span:hover {
    background: #e6f0ff;
    color: #1677ff;
}

/* 卡片链接 */
.card-item a {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* 海报图片 */
.card-item .poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 海报区保持固定比例 */
.card-item .poster {
    width: 100%;
    aspect-ratio: 2 / 2.8;
    position: relative;
    overflow: hidden;
    background: #e8ecf0;
}