/* 內容 */


.left-main {
    width: 20%;
}

.middle-main {
    width: 50%;
}

.right-main {
    width: 30%;
}

/* 內容-end */

/* 熱門賽事 */
.hot-match {
    width: 100%;
    background-color: #fff;
    border-radius: 5px;
    padding: 20px 0 10px 0;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: #000;
    position: relative;
    padding-left: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    border-radius: 0 10px 10px 0;
    background-color: #CC0303;
}

.hot-list {
    margin-top: 10px;
}

.hot-list ul {
    display: flex;
    flex-direction: column;
}

.hot-list ul li {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    gap: 10px;
    cursor: pointer;

}

.hot-list ul li img {
    width: 22px;
    height: auto;
}

.hot-list ul li span {
    font-size: 16px;
    color: #000;
    font-weight: 500;
    padding-top: 2px;
}

.hot-list ul li:hover span {
    color: #CC0303;
}

.hot-list ul li.active span {
    color: #CC0303;
}

.cats-lists li a svg {
    position: relative;
    top: 3px;
    left: 1px;
    width: 16px;
    height: 16px;
}

.cats-lists li a {
    display: inline;
    width: 22px;
    height: 22px;
    line-height: 22px;
    background-color: #f0f0f0;
    border-radius: 50%;
    text-align: center;
    position: absolute;
    right: 15px;
}

.cats-lists li {
    position: relative;
}

.cats-lists li a:hover {
    background-color: #cc0303;
}

.cats-lists li a:hover svg path {
    fill: white;
}


/* 熱門賽事-end */

/* 全部賽事 */
.all-match {
    width: 100%;
    background-color: #fff;
    border-radius: 5px;
    padding: 20px 0 10px 0;
    margin-top: 20px;
}

.all-list {
    margin-top: 10px;
}

.all-list ul {
    display: flex;
    flex-direction: column;
}

.all-list ul li {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    gap: 10px;
    cursor: pointer;
}

.all-list ul li img {
    width: 20px;
}

.all-list ul li span {
    font-size: 16px;
    color: #000;
    font-weight: 500;
    padding-top: 2px;
}

.all-list ul li:hover span,
.all-list ul li.active span {
    color: #CC0303;
}

.search-wrapper {
    padding: 0 10px;
    margin-top: 10px;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border-radius: 5px;
    border: 1px solid #EFEFF0;
    outline: none;
    background-color: #F7F9FC;
    font-size: 15px;
}

.search-wrapper input::placeholder {
    color: #999;
    font-size: 13px;
}

.search-wrapper .match-search {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background-image: url('../images/search-icon.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    cursor: pointer;
}


/* 中間 */
.top-list ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.top-list ul li {
    list-style: none;
    background-color: #fff;
    border-radius: 5px;
    padding: 10px;
    flex: 1 auto;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.top-list ul li:hover {
    /* background-color: #CC0303; */
    border: 1px solid #CC0303;
}

/*
.top-list ul li:hover a img{
    filter: invert(1);
} */

.top-list ul li a {
    display: flex;
    align-items: center;
    gap: 5px;

}

.top-list ul li a span {
    font-size: 17px;
    color: #000;
    font-weight: 500;
    padding-top: 5px;
}

.top-list ul li a img {
    width: 40px;
    height: 40px;
}


.middle-banner {
    width: 100%;
    height: auto;
    margin-top: 20px;
}

.middle-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tab-box {
    /* margin-top: 20px; */
    background-color: #fff;
    border-radius: 15px;
}

/* PC端樣式 */
.pc-tab-list {
    display: block;
}

.mobile-tab-list {
    display: none;
}

.tab-list ul {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

.tab-list ul li {
    padding: 10px 15px;
    font-size: 15px;
    font-weight: 500;
    flex: 1 auto;
    text-align: center;
    cursor: pointer;
}

.tab-list ul li.active {
    background-color: #CC0303;
    color: #fff;
}

.tab-list li:first-child {
    background: url('/static/images/live.png') 15px center no-repeat;
    background-size: 22px 22px;
    padding-left: 30px;
    padding-right: 8px;
}

.tab-list li:first-child:not(.active) {
    background: url('/static/images/live-black.png') 15px center no-repeat;
    background-size: 22px 22px;
    padding-left: 30px;
    padding-right: 8px;
}

.tab-content .tab-item {
    display: none;
}

.tab-content .tab-item.active {
    display: block;
}

/* 賽事列表 */
/* 賽事列表樣式 */
.match-list {
    padding: 20px;
}

.league-group {
    margin-bottom: 30px;
}

.league-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 0 10px;
}

.country-flag {
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

.league-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.match-item {
    display: flex;
    align-items: center;
    background-color: #F7F9FC;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.ingMatch .match-item {
    border: 1px solid transparent;
    text-decoration: none;
}

.ingMatch .match-item.actived {
    animation: ingColor 2s infinite;
}


@keyframes ingColor {
    0% {
        border-color: transparent;
    }

    50% {
        border-color: #CC0303;
    }

    100% {
        border-color: transparent;
    }
}


.match-item:hover {
    background-color: #E8F4FD;
    cursor: pointer;
}

.match-time {
    width: 60px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    text-align: center;
}

.team-home,
.team-away {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-home {
    justify-content: flex-end;
    padding-right: 20px;
}

.team-away {
    justify-content: flex-start;
    padding-left: 20px;
}

.team-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.team-flag {
    height: 26px;
    object-fit: cover;
    border-radius: 2px;
}

.left-box {
    display: flex;
    align-items: center;
}

.match-score {
    width: 60px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #CC0303;
    background-color: #fff;
    border-radius: 4px;
    padding: 5px 10px 3px 10px;
    border: 1px solid #E5E5E5;
}

.duration {
    margin-left: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #CC0303;
    min-width: 30px;
}

.duration span {
    font-size: 12px;
    font-weight: normal;
    color: #999
}

.right-box {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: flex-end;
}

.corner-kicks {
    display: flex;
    align-items: center;
}

.corner-kicks img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.corner-kicks span {
    font-size: 14px;
    font-weight: 500;
    color: #CC0303;
}

.first-half span {
    font-size: 12px;
    color: #333;
}

.tab-content {
    background-color: #fff;
    border-radius: 0 0 20px 20px;
    min-height: 400px;
}

.tab-item {
    display: none;
}

.tab-item.active {
    display: block;
}


/* 賽事列表結束 */

/* Banner Swiper 樣式 */
.middle-banner {
    margin-bottom: 20px;
    position: relative;
}

.banner-swiper {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
}

.banner-swiper .swiper-slide {
    width: 100%;
    height: 100%;
}

.banner-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-swiper .swiper-pagination {
    bottom: 15px;
}

.banner-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.banner-swiper .swiper-pagination-bullet-active {
    background-color: #CC0303;
}

.banner-swiper .swiper-button-next,
.banner-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    color: #fff;
}

.banner-swiper .swiper-button-next:after,
.banner-swiper .swiper-button-prev:after {
    font-size: 16px;
}

.banner-swiper .swiper-button-next {
    right: 15px;
}

.banner-swiper .swiper-button-prev {
    left: 15px;
}

.banner-swiper .swiper-button-next:hover,
.banner-swiper .swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.swiper-button-next,
.swiper-button-prev {
    display: none;
}



/* 最受歡迎的賽事樣式 */
.welcome-match {
    width: 100%;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    /* margin-bottom: 25px; */
}

/* .welcome-match:not(:empty) {
    margin-bottom: 25px;
} */
.welcome-match:has(*) {
    margin-bottom: 25px;
}

.welcome-match-pc {
    display: block;
}

.welcome-match-m {
    display: none;
}

.welcome-title {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: #000;
    position: relative;
    padding: 18px 15px 15px 15px;
}

.welcome-title::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 0;
    width: 4px;
    height: 26px;
    border-radius: 0 10px 10px 0;
    background-color: #CC0303;
}

.welcome-content {
    padding: 0 15px 20px 15px;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.team-left,
.team-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 5px;
}

.team-left span,
.team-right span {
    font-size: 12px;
}

.team-left .welcome-team-name {
    color: #CC0303;
    text-align: center;
}

.team-right .welcome-team-name {
    color: #000000;
    text-align: center;
}


.team-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

.red-circle {
    border-color: #CC0303;
}

.blue-circle {
    border-color: #000000;
}

.team-circle img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.match-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.live-badge {
    background-color: #CC0303;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.match-result {
    font-size: 32px;
    font-weight: 700;
    color: #000;
}

.match-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background-color: #F7F9FC;
    margin-bottom: 1px;
}

.info-row:first-child {
    border-radius: 5px 5px 0 0;
}

.info-row:last-child {
    border-radius: 0 0 5px 5px;
    margin-bottom: 0;
}

.info-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    color: #000;
    font-weight: 500;
}

.league-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.league-flag {
    width: 18px;
    object-fit: cover;
}

.league-name {
    font-size: 14px;
    color: #000;
    font-weight: 500;
}

.match-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.viewers-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #CC0303;
    padding: 0px 12px;
    height: 40px;
    line-height: 40px;
    border-radius: 5px;
    flex: 1;
}

.live-icon {
    width: 22px;
    height: 22px;
    position: relative;
    bottom: 1px;
}

.viewers-count span {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
}

.enter-live-btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.enter-live-btn:hover {
    background-color: #333;
    color: #fff;
}

.enter-live-btn:active {
    transform: translateY(1px);
    color: #fff;
}

/* 響應式調整 */
@media (max-width: 1200px) {
    .team-circle {
        width: 70px;
        height: 70px;
    }

    .team-circle img {
        width: 45px;
        height: 45px;
    }

    .match-result {
        font-size: 28px;
    }
}

@media (max-width: 992px) {
    .match-actions {
        flex-direction: column;
        gap: 10px;
    }

    .viewers-count {
        width: 100%;
        justify-content: center;
    }

    .enter-live-btn {
        width: 100%;
    }

}



/* 賽事積分榜樣式 */
.score-board {
    width: 100%;
    background-color: #fff;
    border-radius: 5px;
    /* overflow: hidden; */
    margin-bottom: 25px;
}

.score-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 15px 15px 0px;
    border-bottom: 1px solid #F0F0F0;
}

.score-board-title {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: #000;
    position: relative;
    padding-left: 15px;
}

.score-board-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 4px;
    height: 26px;
    border-radius: 0 10px 10px 0;
    background-color: #CC0303;
}

.score-board-tabs {
    display: flex;
    align-items: center;
    background-color: #000;
    border-radius: 20px;
    overflow: hidden;
}

.score-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.score-tab.active {
    background-color: #CC0303;
    color: #fff;
}

.score-tab:hover:not(.active) {
    background-color: #333;
}

.league-selector {
    padding: 15px;
    border-bottom: 1px solid #F0F0F0;
    position: relative;
}

/* 隱藏原生 select，僅用於表單值與 change 事件 */
.league-selector .league-dropdown {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    opacity: 0;
    pointer-events: none;
}

/* 自定義聯賽下拉框 - 與網站風格一致 */
.custom-league-dropdown {
    position: relative;
    width: 100%;
}

.custom-league-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #E5E5E5;
    border-radius: 5px;
    background-color: #F7F9FC;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    text-align: left;
}

.custom-league-trigger:hover {
    border-color: #d0d0d0;
    background-color: #fff;
}

.custom-league-trigger:focus,
.custom-league-dropdown.is-open .custom-league-trigger {
    border-color: #CC0303;
    background-color: #fff;
}

.custom-league-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-league-arrow {
    flex-shrink: 0;
    width: 0;
    height: 0;
    margin-left: 10px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.2s ease;
}

.custom-league-dropdown.is-open .custom-league-arrow {
    transform: rotate(180deg);
    border-top-color: #CC0303;
}

.custom-league-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: 100;
    display: none;
}

.custom-league-dropdown.is-open .custom-league-list {
    display: block;
}

.custom-league-list li {
    padding: 10px 15px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.custom-league-list li:hover {
    background-color: #FFF5F5;
    color: #CC0303;
}

.custom-league-list li[aria-selected="true"] {
    background-color: #F7F9FC;
    color: #CC0303;
    font-weight: 500;
}

.custom-league-list li[aria-selected="true"]:hover {
    background-color: #FFF5F5;
}

/* 保留原 .league-dropdown 類名以兼容未使用 custom 的頁面 */
.league-dropdown {
    width: 100%;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #E5E5E5;
    border-radius: 5px;
    background-color: #F7F9FC;
    font-size: 15px;
    color: #333;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

.league-dropdown:focus {
    border-color: #CC0303;
    background-color: #fff;
}

.score-table {
    padding: 15px 15px 15px 15px;
}

.table-header {
    display: flex;
    align-items: center;
    padding: 15px 6px;
    background-color: #F7F9FC;
    border-radius: 5px 5px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 1px;
}

.col-rank {
    width: 40px;
    text-align: center;
}

.col-team {
    flex: 1;
    padding-left: 10px;
    text-align: left;
}

.col-matches {
    width: 45px;
    text-align: center;
}

.col-goal-diff {
    width: 55px;
    text-align: center;
}

.col-points {
    width: 56px;
    text-align: center;
}

.score-content {
    position: relative;
}

.score-tab-content {
    display: none;
}

.score-tab-content.active {
    display: block;
}

.team-row {
    display: flex;
    align-items: center;
    padding: 12px 6px;
    background-color: #FAFAFA;
    margin-bottom: 1px;
    transition: all 0.3s ease;
}

.team-row:hover {
    background-color: #F0F0F0;
}

.team-row:last-child {
    border-radius: 0 0 5px 5px;
}

.team-row .col-rank {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.team-row .col-rank.top-four {
    color: #CC0303;
    font-weight: 700;
}

.team-row .col-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-row .col-team .team-name {
    text-align: left;
}

.team-row .col-team .team-name:hover {
    color: #cc0303;
}

.team-logo {
    width: 20px;
    object-fit: contain;
    border-radius: 2px;
}

.team-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.team-row .col-matches,
.team-row .col-goal-diff,
.team-row .col-points {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* 響應式調整 */
@media (min-width: 1450px) {
    .enter-live-btn {
        min-width: 140px;
        text-align: center;
    }

    .right-main {
        width: 26.5%;
    }

    .col-team {
        min-width: 110px;
    }

    .col-rank {
        width: 33px;
    }
}

@media (min-width: 1620px) {
    .right-main {
        width: 23%;
    }

    .col-team {
        min-width: 120px;
    }
}

@media (max-width: 1200px) {
    .score-board-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .score-board-tabs {
        align-self: stretch;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .score-board-title {
        font-size: 18px;
    }

    .score-tab {
        padding: 6px 12px;
        font-size: 13px;
    }

    .team-row {
        padding: 10px 5px;
    }

    .col-rank {
        width: 30px;
    }

    .col-matches,
    .col-goal-diff,
    .col-points {
        width: 45px;
    }

    .team-logo {
        width: 18px;
    }

    .team-name {
        font-size: 13px;
    }
}

@media screen and (min-width: 968px) and (max-width:1267px) {
    .team-logo {
        display: none;
    }

    .team-name {
        font-size: 12px;
    }

    .top-list ul li a span {
        font-size: 15px;
    }

    .tab-list ul li {
        padding: 10px 10px;
        font-size: 14px;
    }

    .viewers-count span {
        font-size: 12px;
    }

    .enter-live-btn {
        font-size: 12px;
    }

    .table-header {
        font-size: 14px;
    }

    .col-matches {
        width: 45px;
    }

    .col-goal-diff {
        width: 50px;
    }
}