/* General Styles */
body {
    background-color: #090625;
    color: white;
    font-family: 'Helvetica Neue', sans-serif;
    margin: 0;
}

.container {
    max-width: 1920px; /* 与详情页一致 */
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    background: rgba(9, 6, 37, 0.1);
    backdrop-filter: blur(5px);
}

/* 与详情页一致的导航样式 */
.header-nav { gap: 2rem; align-items: center; }
.header-nav a { text-decoration: none; color: white; font-weight: 500; padding: 0.5rem 1rem; border-radius: 8px; transition: all 0.3s ease; }
.header-nav a:hover, .header-nav a.active { background: #723BFF; color: white; }
.logo-desktop, .header-nav, .language-selector {
    display: none;
}

.logo-mobile {
    display: block;
    height: 36px;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    background-color: #723BFF;
    padding: 8px 12px;
    border-radius: 8px;
    margin-right: 16px;
}

.user-profile img {
    margin-right: 4px;
}

.user-profile span {
    font-size: 12px;
}

.hamburger-menu {
    cursor: pointer;
}

/* Main Content */
.main-content {
    padding: 24px 0;
}

.leagues-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.leagues-header h1 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

/* 分类筛选条 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 16px 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    color: #CFC8FF;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(28, 18, 76, 0.7);
    transition: all .2s ease;
}

.filter-pill:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-1px);
}

.filter-pill.active {
    color: #fff;
    background: linear-gradient(90deg, #6A4DFF 0%, #8E2DE2 100%);
    border-color: transparent;
}

.search-icon-mobile {
    background: #1C124C;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar {
    display: none;
}

.leagues-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.league-card {
    background: #1C124C;
    border-radius: 16px;
    padding: 8px;
    text-align: center;
}

.league-card img {
    height: 48px;
    margin-bottom: 8px;
}

.league-card p {
    font-size: 12px;
    font-weight: 400;
    margin: 0;
    min-height: 28px; /* To handle different text lengths */
}

.league-card span {
    font-size: 10px;
    color: #9790DB;
}

/* 移动端新闻列表样式 */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-main {
    flex: 1;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    background: #1C124C;
    border-radius: 12px;
    overflow: hidden;
}

.news-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    padding: 16px;
    gap: 12px;
}

.news-image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.news-title {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.4;
}

.news-description {
    font-size: 12px;
    color: #A89FFF;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.news-date {
    font-size: 10px;
    color: #9790DB;
}

.news-source {
    font-size: 10px;
    color: #9790DB;
}

/* 侧边栏样式 */
.sidebar {
    margin-top: 24px;
}

.hot-articles {
    background: #1C124C;
    border-radius: 12px;
    padding: 16px;
}

.hot-articles h3 {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 16px 0;
}

.hot-articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-article-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.hot-article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hot-article-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    gap: 8px;
}

.hot-article-image {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
}

.hot-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hot-article-title {
    font-size: 12px;
    font-weight: 500;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-article-date {
    font-size: 10px;
    color: #9790DB;
}

/* 移动端分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 6px 12px;
    background: #1C124C;
    color: #A89FFF;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pagination-btn:hover {
    background: #723BFF;
    color: #FFFFFF;
    border-color: #723BFF;
}

.pagination-current {
    padding: 6px 12px;
    background: #723BFF;
    color: #FFFFFF;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.desktop-only {
    display: none;
}

/* Footer */
.footer {
    padding: 24px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
}

.footer-left {
    margin-bottom: 32px;
}

.footer-left .logo-desktop {
    display: none;
}

.footer-left .logo-mobile {
    display: block;
    height: 36px;
    margin-bottom: 8px;
}

.footer-left p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: space-between;
}

.link-section {
    margin-bottom: 32px;
}

.link-section h4 {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 20px 0;
}

.link-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-section ul li {
    margin-bottom: 12px;
}

.link-section a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 14px;
}

.link-section a.active {
    color: #9790DB;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.social-icons {
    display: none; /* Hidden on mobile based on figma */
}

/* Desktop Styles */
@media (min-width: 768px) {
    .container {
        padding: 0 236px;
    }

    .logo-mobile, .hamburger-menu, .search-icon-mobile {
        display: none;
    }

    .logo-desktop, .header-nav, .language-selector, .search-bar {
        display: flex;
    }

    .header {
        padding: 14px 0;
        height: 80px;
    }
    
    .header-left .logo-desktop {
        height: 60px;
    }

    .header-nav a {
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        font-size: 20px;
        margin: 0 20px;
        padding: 8px 12px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .header-nav a:hover,
    .header-nav a.active {
        background: #723BFF;
        color: #fff;
        font-weight: 500;
    }

    .language-selector, .user-profile {
        font-size: 20px;
        margin-left: 20px;
    }
    
    .user-profile {
        background-color: #723BFF;
        padding: 10px 20px;
        border-radius: 8px;
        margin-right: 0;
    }

    .user-profile img {
        margin-right: 8px;
    }
    
    .user-profile span {
        font-size: 20px;
    }

    .main-content {
        padding: 32px 0;
    }

    .leagues-header {
        margin-bottom: 24px;
    }

    .leagues-header h1 {
        font-size: 40px;
        font-weight: 700;
    }

    .search-bar {
        align-items: center;
        background: rgba(168, 159, 255, 0.15);
        border: 1px solid #A89FFF;
        border-radius: 8px;
        padding: 12px 24px;
        width: 400px;
    }

    .search-bar img {
        margin-right: 8px;
    }

    .search-bar span {
        color: rgba(168, 159, 255, 0.6);
        font-size: 16px;
    }

    .leagues-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .league-card {
        padding: 16px;
    }
    
    .league-card.active {
        background: #723BFF;
    }

    .league-card img {
        width: 83px;
        height: 72px;
        margin-bottom: 16px;
    }

    .league-card p {
        font-size: 20px;
        font-weight: 500;
        min-height: auto;
    }

    .league-card span {
        font-size: 16px;
        color: #A89FFF;
    }
    
    /* 新闻列表样式 */
    .content-wrapper {
        display: flex;
        flex-direction: row;
        gap: 32px;
    }
    
    .news-main {
        flex: 1;
    }
    
    .sidebar {
        flex: 1;
        margin-top: 0;
        max-width: 350px;
    }
    
    .news-list {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .news-item {
        background: #1C124C;
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .news-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(114, 59, 255, 0.3);
    }
    
    .news-link {
        display: flex;
        text-decoration: none;
        color: inherit;
        padding: 20px;
        gap: 16px;
    }
    
    .news-image {
        flex-shrink: 0;
        width: 180px;
        height: 120px;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .news-content {
        display: flex;
        flex-direction: column;
        gap: 12px;
        flex: 1;
    }
    
    .news-title {
        font-size: 18px;
        font-weight: 600;
        color: #FFFFFF;
        margin: 0;
        line-height: 1.4;
    }
    
    .news-description {
        font-size: 14px;
        color: #A89FFF;
        margin: 0;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .news-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .news-date {
        font-size: 12px;
        color: #9790DB;
    }
    
    .news-source {
        font-size: 12px;
        color: #9790DB;
    }
    
    /* 推荐文章样式 - 与页面深色风格一致 */
    .recommended-articles {
        background: #1C124C;
        border-radius: 12px;
        padding: 1.25rem;
        box-shadow: none;
        border: 1px solid rgba(168, 159, 255, 0.15);
    }
    
    .recommended-articles h3 {
        color: #A89FFF;
        font-size: 1.2em;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(168, 159, 255, 0.2);
    }
    
    .recommended-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(168, 159, 255, 0.12);
        transition: all 0.3s ease;
    }
    
    .recommended-item:last-child {
        border-bottom: none;
    }
    
    .recommended-item:hover {
        background: rgba(168, 159, 255, 0.08);
        border-radius: 8px;
        padding: 0.75rem;
        margin: 0 -0.75rem;
    }
    
    .recommended-item a {
        text-decoration: none;
        color: inherit;
        display: block;
    }
    
    .recommended-item h4 {
        color: #FFFFFF;
        font-size: 0.9em;
        margin-bottom: 0.5rem;
        line-height: 1.4;
        font-weight: 600;
    }
    
    .recommended-item .meta {
        font-size: 0.75em;
        color: #9790DB;
        margin-bottom: 0.25rem;
    }
    
    .recommended-item .summary {
        font-size: 0.8em;
        color: #A89FFF;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* 分页样式 */
    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 32px;
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        padding: 8px 16px;
        background: #1C124C;
        color: #A89FFF;
        text-decoration: none;
        border-radius: 8px;
        font-size: 14px;
        transition: all 0.2s ease;
        border: 1px solid transparent;
    }
    
    .pagination-btn:hover {
        background: #723BFF;
        color: #FFFFFF;
        border-color: #723BFF;
    }
    
    .pagination-current {
        padding: 8px 16px;
        background: #723BFF;
        color: #FFFFFF;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
    }
    
    .desktop-only {
        display: block;
    }

    .footer {
        padding: 72px 236px;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .footer-left {
        width: 226px;
        margin-bottom: 0;
    }
    
    .footer-left .logo-mobile {
        display: none;
    }
    
    .footer-left .logo-desktop {
        display: block;
        height: 60px;
        margin-bottom: 16px;
    }

    .footer-left p {
        font-size: 16px;
    }

    .footer-links {
        display: flex;
    }

    .link-section {
        margin-left: 120px;
        margin-bottom: 0;
    }

    .link-section h4 {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 25px;
    }
    
    .link-section ul li {
        margin-bottom: 15px;
    }

    .link-section a {
        font-size: 20px;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 24px;
        font-size: 16px;
    }

    .social-icons {
        display: block;
    }

    .social-icons img {
        margin-left: 20px;
    }
}

/* Fallback: ensure left-image-right-text even if markup lacks .news-image/.news-link wrappers */
.news-item > a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 16px;
}

.news-item > a > img {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

/* Earlier breakpoint to keep sidebar on the right for most desktops/tablets */
@media (min-width: 640px) {
  .content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 24px;
  }
  .news-main { flex: 1; }
  .sidebar {
    flex: 0 0 320px; /* 固定右侧栏宽度，提升列表可用宽度 */
    margin-top: 0;
    max-width: 320px;
  }
  .news-item > a { gap: 16px; padding: 20px; }
  .news-item > a > img { width: 180px; height: 120px; }
}