/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Navbar ===== */
.navbar {
    background: linear-gradient(135deg, #1a237e, #283593);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
}
.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}
.nav-menu {
    display: flex;
    gap: 6px;
}
.nav-menu li a {
    color: rgba(255,255,255,0.85);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.nav-menu li a:hover { background: rgba(255,255,255,0.15); color: #fff; }
.nav-menu li a.active { background: rgba(255,255,255,0.2); color: #fff; font-weight: 600; }
.nav-menu li a.disabled { opacity: 0.5; cursor: default; pointer-events: none; }
.nav-lang .lang-btn {
    color: #ffd54f;
    border: 1px solid #ffd54f;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.nav-lang .lang-btn:hover { background: #ffd54f; color: #1a237e; }

/* Hamburger toggle button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 110;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile language switcher inside menu - not used */
.nav-lang-mobile { display: none; }

/* ===== Banner ===== */
.banner {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
}
.banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 300px;
}

/* ===== Main Content ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    flex: 1;
    width: 100%;
}

/* ===== Home Layout ===== */
/* Top: Data Service 100% width */
.data-service-top {
    width: 100%;
    margin-bottom: 24px;
}
.data-service-body {
    display: flex;
    gap: 24px;
    align-items: stretch;
}
.data-service-left {
    flex: 0 0 576px;
    max-width: 576px;
}
.ds-img {
    width: 576px;
    height: 270px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.data-service-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

/* Bottom: 4 columns each 25% */
.home-bottom {
    display: flex;
    gap: 20px;
}
.home-col {
    flex: 1;
    min-width: 0;
}

/* ===== Cards ===== */
.card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #dae3f3;
}
.card-header h2 {
    font-size: 1.15rem;
    color: #1a237e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.title-icon {
    font-size: 1.2rem;
}
.card-body { padding: 20px; }
.card-body-img { padding: 0; overflow: hidden; }
.card-img-full {
    width: 100%;
    display: block;
    border-radius: 0;
}
.card-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
    object-fit: cover;
    max-height: 200px;
}
.card-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}
.view-more {
    color: #1a237e;
    font-size: 0.85rem;
    font-weight: 500;
}
.view-more:hover { color: #3949ab; }
.coming-soon-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 8px;
}

/* Data Service Card */
.data-service-card { display: flex; flex-direction: column; }
.data-service-card .card-body { flex: 1; }

/* Data service link wrapper */
.ds-link { display: block; }
.ds-link:hover .data-service-card {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Douyin & Handball CC link cards */
.douyin-card a, .handball-card a { display: block; }
.douyin-card a:hover .card-header h2,
.handball-card a:hover .card-header h2 { color: #3949ab; }

/* ===== Home Video List ===== */
.video-list-home li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.video-list-home li:last-child { border-bottom: none; }
.video-list-home li a {
    color: #333;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.video-list-home li a:hover { color: #1a237e; }

/* ===== Video Page ===== */
.video-page {
    max-width: 900px;
    margin: 0 auto;
}
.video-page-header {
    margin-bottom: 24px;
}
.video-page-header h1 {
    font-size: 1.6rem;
    color: #1a237e;
    font-weight: 700;
    position: relative;
    padding-left: 16px;
}
.video-page-header h1::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, #1a237e, #5c6bc0);
    border-radius: 2px;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 0.9rem;
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
    transition: all 0.2s;
    font-weight: 500;
}
.tab-btn:hover { background: #e8eaf6; color: #1a237e; border-color: #c5cae9; }
.tab-btn.active {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: #fff;
    border-color: transparent;
}

/* Video List */
.video-list-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 8px 0;
}
.video-item {
    border-bottom: 1px solid #f5f5f5;
}
.video-item:last-child { border-bottom: none; }
.video-item a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #333;
    transition: background 0.2s;
}
.video-item a:hover { background: #f8f9ff; }
.video-icon {
    color: #1a237e;
    margin-right: 14px;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.video-title {
    font-size: 0.95rem;
    line-height: 1.5;
}
.video-item a:hover .video-title { color: #1a237e; }
.no-data {
    text-align: center;
    padding: 48px 20px;
    color: #999;
    font-size: 0.95rem;
    background: #fff;
    border-radius: 8px;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 16px 0;
}
.page-btn {
    padding: 8px 16px;
    background: #1a237e;
    color: #fff;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
}
.page-btn:hover:not(.disabled) {
    background: #283593;
    text-decoration: none;
}
.page-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}
.page-info {
    color: #666;
    font-size: 0.9rem;
}
.total-count {
    font-size: 0.85rem;
    color: #888;
    font-weight: normal;
}

/* ===== Home Game List ===== */
.game-list-home {
    list-style: none;
    padding: 0;
    margin: 0;
}
.game-list-home li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.game-list-home li:last-child { border-bottom: none; }
.game-list-home li a {
    color: #333;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.game-list-home li a:hover { color: #1a237e; }

/* ===== History Home Search ===== */
.history-home {
    margin-bottom: 24px;
}

/* ===== Home News List ===== */
.news-module {
    margin-top: 20px;
    margin-bottom: 20px;
}
.news-list-home {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-list-home li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.news-list-home li:last-child { border-bottom: none; }
.news-list-home li a {
    color: #333;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-list-home li a:hover { color: #1a237e; }

/* ===== News Show Page ===== */
.news-show-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.news-show-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.news-show-header h1 {
    font-size: 1.6rem;
    color: #1a237e;
    font-weight: 700;
    line-height: 1.4;
}
.news-show-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    min-height: 200px;
}
.news-show-content img {
    max-width: 100%;
    height: auto;
}
.news-show-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.btn-back {
    display: none;
    padding: 10px 20px;
    background: #1a237e;
    color: #fff;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.btn-back:hover {
    background: #3949ab;
    text-decoration: none;
}

/* ===== Footer ===== */
.footer {
    background: #1a237e;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 20px;
    margin-top: auto;
}
.footer p { font-size: 0.85rem; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .home-bottom { flex-wrap: wrap; }
    .home-col { flex: 0 0 calc(50% - 10px); min-width: calc(50% - 10px); }
}
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 16px;
        min-height: 56px;
    }
    .nav-brand { font-size: 1.2rem; }

    /* Show hamburger button */
    .nav-toggle { display: flex; order: 3; }

    /* Lang switcher always visible on mobile, between brand and hamburger */
    .nav-lang { display: flex; order: 2; margin-left: auto; margin-right: 8px; }

    /* Mobile menu: collapsed by default */
    .nav-menu {
        display: none;
        order: 3;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 8px 0 12px;
        border-top: 1px solid rgba(255,255,255,0.15);
    }
    .nav-menu.open { display: flex; }

    .nav-menu li a {
        display: block;
        padding: 12px 8px;
        border-radius: 0;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .nav-menu li:last-child a { border-bottom: none; }
    .nav-menu li a:hover, .nav-menu li a.active {
        background: rgba(255,255,255,0.12);
    }

    /* No mobile lang inside menu anymore */

    /* Other responsive styles */
    .data-service-body { flex-direction: column; }
    .data-service-left { flex: 0 0 100%; max-width: 100%; }
    .ds-img { width: 100%; height: auto; max-height: 200px; }
    .history-grid { grid-template-columns: 1fr !important; }
    .home-bottom { flex-direction: column; }
    .home-col { flex: 0 0 100%; min-width: 100%; }
    .category-tabs { gap: 6px; }
    .tab-btn { padding: 6px 14px; font-size: 0.8rem; }
    .main-content { padding: 20px 12px; }
    .banner img { max-height: 160px; }

    /* History stats stack vertically on mobile */
    .history-stats { flex-direction: column !important; gap: 12px !important; }
    .history-stat-sep { display: none; }

    /* Footer smaller on mobile */
    .footer { padding: 12px; }
    .footer p { font-size: 0.75rem; }
}
