/* 球隊主頁樣式 */

.team-page {

    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);

    min-height: calc(100vh - 120px);

}



.team-container {

    max-width: 1400px;

    margin: 0 auto;

    padding: 20px;

}



/* 球隊頭部信息 */

.team-header {

    background: linear-gradient(135deg, #CC0303 0%, #a00202 100%);

    border-radius: 15px;

    padding: 30px;

    color: white;

    margin-bottom: 30px;

    box-shadow: 0 8px 25px rgba(204, 3, 3, 0.2);

    position: relative;

    overflow: hidden;

    display: flex;

    justify-content: space-between;

    align-items:center;

}





.team-header::before {

    content: '';

    position: absolute;

    top: 0;

    right: 0;

    width: 200px;

    height: 200px;

    background: rgba(255, 255, 255, 0.1);

    border-radius: 50%;

    transform: translate(50%, -50%);

}

/*background-color: rgb(255 255 255 / .2);*/

.team-base-tj{

    border: solid 1px #fff; border-radius: 5px; width: 310px; display: flex; flex-direction: column;

}



.team-base-tj .tj-header{

    background-color: rgb(255 255 255 / .2); color:white; text-align: center; font-size: 14px; line-height: 35px;

}

.team-base-tj .tj-content{

    display: flex; align-items: center;

}

.team-base-tj .tj-content .item-li{

    border-right: solid 1px rgb(255 255 255 / .2);   text-align: center; display: flex; flex-direction: column; justify-content: center;

    padding:7px 0;

}



.team-base-tj .tj-content .item-li:first-child{

    width: 80px;

}



.team-base-tj .tj-content .item-li:nth-child(2),.team-base-tj .tj-content .item-li:nth-child(3){

    width: 56px;

}



.team-base-tj .tj-content .item-li:last-child{

    border-right: none; flex: 1;

}



.team-base-tj .tj-content .item-li span{

    font-size: 13px;

}



.team-base-tj .tj-content .item-li font{

    font-size: 14px;

}







.team-basic-info {

    display: flex;

    align-items: center;

    gap: 30px;

    position: relative;

    z-index: 2;

}



.team-logo {

    width: 90px;

    height: 90px;

    border-radius: 50%;

    border: 4px solid rgba(255, 255, 255, 0.3);

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

    padding: 12px;

    background-color: white;

}



.team-info h1 {

    font-size: 2.5rem;

    font-weight: bold;

    margin: 0 0 10px 0;

    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);

}



.team-league {

    font-size: 1.1rem;

    opacity: 0.9;

    display: flex;

    align-items: center;

    gap: 10px;

}



.league-icon {

    width: 30px;

    height: 30px;

    border-radius: 50%;

    background-color: white;

    padding: 3px;

}



/* 統計卡片 */

.team-stats {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: 20px;

    margin-bottom: 30px;

}



.stat-card {

    background: white;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

    transition: all 0.3s ease;

    border-top: 4px solid #CC0303;

    text-align: center;

}



.stat-card:hover {

    transform: translateY(-5px);

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);

}



.stat-title {

    font-size: 16px;

    color: #6c757d;

    margin-bottom: 10px;

    font-weight: 500;

}



.stat-value {

    font-size: 2rem;

    font-weight: bold;

    color: #CC0303;

    margin-bottom: 5px;

}



.stat-change {

    font-size: 0.8rem;

    display: flex;

    align-items: center;

    gap: 5px;

}



.stat-change.positive {

    color: #28a745;

}



.stat-change.negative {

    color: #dc3545;

}



/* 主要內容區域 */

.team-main-content {

    display: grid;

    grid-template-columns: 2fr 1fr;

    gap: 30px;

}



.left-box{

    display: flex; flex-direction: column; gap: 25px;

}



/* 近期比賽 */

.recent-matches {

    background: white;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}



.section-title {

    font-size: 1.3rem;

    font-weight: bold;

    color: #333;

    margin-bottom: 20px;

    padding-bottom: 10px;

    border-bottom: 2px solid #CC0303;

    display: flex;

    align-items: center;

    gap: 10px;

}



.section-icon {

    width: 24px;

    height: 24px;

    background: #CC0303;

    border-radius: 4px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: white;

}



.match-list {

    display: flex;

    flex-direction: column;

    gap: 15px;

}

.match-list .macth-date-catname{
    width: 12%;
}



.match-item {

    display: flex;

    align-items: center;

    padding: 15px;

    border-radius: 8px;

    background: #f8f9fa;

    transition: all 0.3s ease;

    text-decoration: none;

    color: inherit;

}



.match-item:hover {

    background: #e9ecef;

    transform: translateX(5px);

}



.match-date {

    min-width: 80px;

    font-size: 14px;

    color: #6c757d;

}

.macth-date-catname .match-date{
    color: #000;
}
.macth-date-catname .catname{
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
}



.match-teams {

    flex: 1;

    display: flex;

    align-items: center;

    justify-content: center;

    margin: 0 20px;

    gap: 20px;

}



.team-name {

    font-weight: 500;

    display: flex;

    align-items: center;

    gap: 8px;

    /* min-width: 200px; */
    flex: 1;

    justify-content: flex-end;

}

.match-teams .team-name:last-child{
    justify-content: flex-start;
}



.team-flag {

    width: 20px;

    height: 20px;

    border-radius: 2px;

}



.match-score {

    font-weight: bold;

    color: #CC0303;

    min-width: 60px;

    text-align: center;

    font-size: 16px;
    background-color: #fff;
    border-radius: 4px;
    padding: 5px 10px 3px 10px;
    border: 1px solid #E5E5E5;

}



.match-score  span{

    display: block;

    color: #999;

    font-size: 12px;

    font-weight: normal;

}



.match-result {

    width: 30px;

    height: 30px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: bold;

    color: white;

    font-size: 12px;
    line-height: 30px;

    margin-left: 30px;

}



.result-win {

    background: #28a745;

}



.result-loss {

    background: #dc3545;

}



.result-draw {

    background: #ffc107;

}



/* 側邊欄 */

.team-sidebar {

    display: flex;

    flex-direction: column;

    gap: 20px;

}



/* 球隊資料板塊 */

.team-info-panel {

    background: white;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}



.team-info-list {

    display: flex;

    flex-direction: column;

    gap: 15px;

}



.info-item {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    padding: 12px 0;

    border-bottom: 1px solid #f1f3f4;

}



.info-item:last-child {

    border-bottom: none;

}



.info-label {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 14px;

    color: #6c757d;

    min-width: 100px;

}



.info-icon {

    font-size: 1.1rem;

}



.info-value {

    text-align: right;

    font-weight: 500;

    color: #333;

    /* max-width: 200px; */

}



.website-link {

    color: #CC0303;

    text-decoration: none;

    font-size: 1.4rem;

}



.website-link:hover {

    text-decoration: underline;

}



.coach-info {

    display: flex;

    align-items: center;

    gap: 8px;

}



.coach-avatar {

    width: 32px;

    height: 32px;

    border-radius: 50%;

    object-fit: cover;

}



.coach-details {

    display: flex;

    flex-direction: column;

    gap: 2px;

}



.coach-name {

    font-size: 0.9rem;

    font-weight: 600;

}



.coach-nationality {

    font-size: 0.85rem;

    color: #6c757d;

}



.stadium-info {

    display: flex;

    flex-direction: column;

    gap: 2px;

}



.stadium-name {

    font-size: 0.9rem;

    font-weight: 600;

}



.stadium-capacity {

    font-size: 1.2rem;

    color: #6c757d;

}



/* 下場比賽 */

.next-match {

    background: white;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}



.next-match-card {

    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);

    border-radius: 10px;

    padding: 20px;

    border-left: 4px solid #CC0303;

}



.match-competition {

    font-size: 0.85rem;

    color: #CC0303;

    font-weight: 600;

    margin-bottom: 8px;

    text-transform: uppercase;

}



.match-date-time {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;

}



.match-date-time .date {

    font-size: 0.9rem;

    color: #6c757d;

}



.match-date-time .time {

    font-size: 1.1rem;

    font-weight: bold;

    color: #333;

}



.match-teams-container {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 15px;

}



.match-teams-container .team-info {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 5px;

}



.team-logo-small {

    width: 40px;

    height: 40px;

    border-radius: 50%;

}



.match-teams-container .team-name {

    font-size: 0.85rem;

    font-weight: 600;

    text-align: center;

}



.vs-separator {

    font-size: 1.1rem;

    font-weight: bold;

    color: #CC0303;

}



.match-venue {

    display: flex;

    align-items: center;

    gap: 6px;

    font-size: 0.8rem;

    color: #6c757d;

    margin-bottom: 15px;

}



.venue-icon {

    font-size: 1rem;

}



.match-actions {

    display: flex;

    gap: 8px;

}



.btn-predict,

.btn-reminder {

    flex: 1;

    padding: 8px 12px;

    border: none;

    border-radius: 6px;

    font-size: 0.8rem;

    font-weight: 500;

    cursor: pointer;

    transition: all 0.3s ease;

}



.btn-predict {

    background: #CC0303;

    color: white;

}



.btn-predict:hover {

    background: #a00202;

}



.btn-reminder {

    background: #e9ecef;

    color: #6c757d;

}



.btn-reminder:hover {

    background: #dee2e6;

}



.team-main-content{

    margin-bottom: 55px;

}



/* 球隊排名 */

.team-ranking {

    background: white;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}



.team-tj {

    background: white;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}





.ranking-item {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 12px 0;

    border-bottom: 1px solid #e9ecef;

}



.ranking-item:last-child {

    border-bottom: none;

}



.ranking-label {

    color: #333;

    font-size: 14px;

}



.ranking-value {

    font-weight: bold;

    color:#6c757d;

}



.rank-lists .ranking-item.active .ranking-label,.rank-lists .ranking-item.active .ranking-value{

    color: #CC0303;

}

.ranking-item-left{
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-logo{
    width: 20px;
    height: 20px;
    object-fit: contain;
}


#chart-goals-over-2-5,#chart-half-goals-over-1-5,#chart-corners-over-9-5,#chart-half-corners-over-5{

    width: 100%; height: 250px;

}



/* 圖表容器樣式 */

#chart-scored,#chart-conceded{

    width: 100%; 

    height: 280px;

    position: relative;

    border-radius: 8px;

    background: #fafafa;

}



/* 圖表載入動畫 */

.chart-loading {

    display: flex;

    align-items: center;

    justify-content: center;

    height: 280px;

    color: #666;

    font-size: 14px;

}



.chart-loading::before {

    content: '';

    width: 20px;

    height: 20px;

    border: 2px solid #CC0303;

    border-top: 2px solid transparent;

    border-radius: 50%;

    margin-right: 8px;

    animation: spin 1s linear infinite;

}



/* 圖表無數據狀態 */

.chart-no-data {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    height: 300px;

    color: #999;

    font-size: 14px;

}



.chart-no-data-icon {

    font-size: 32px;

    color: #ddd;

    margin-bottom: 8px;

}



/* 圖表標題樣式優化 */

.team-tj .section-title {

    position: relative;

}



.team-tj .section-title::after {

    content: '';

    position: absolute;

    bottom: -2px;

    left: 34px;

    width: 30px;

    height: 2px;

    background: linear-gradient(90deg, #CC0303, rgba(204, 3, 3, 0.3));

}



/* 圖表信息區域 */

.chart-info {

    margin-top: 10px;

    position: relative;

}



.chart-info::before {

    content: '';

    position: absolute;

    top: -10px;

    left: 0;

    right: 0;

    height: 1px;

    background: linear-gradient(90deg, transparent, #e9ecef, transparent);

}





/* 球員信息 */

.team-players {

    background: white;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}



.player-list {

    display: flex;

    flex-direction: column;

    gap: 12px;

}



.player-item {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px;

    border-radius: 6px;

    background: #f8f9fa;

    cursor: pointer;

    transition: all 0.3s ease;

}



.player-item:hover {

    background: #e9ecef;

}



.player-avatar {

    width: 40px;

    height: 40px;

    border-radius: 50%;

    background: #fff;

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: bold;

}



.player-avatar  img{

    max-width: 90%; max-height: 80%;

}



.player-info {

    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;

}



.player-name {

    font-weight: 500;

    /* margin-bottom: 2px; */
    font-size: 15px;

    position: relative;

    padding-right: 15px;
}

.player-info .player-name::after{
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    width: 3px;
    height: 3px;
    background-color: #999;
    border-radius: 50%;
}



.player-position {

    font-size: 15px;

    color: #6c757d;

}



.player-number {

    color: #000;

}



/* 麵包屑導航 */

.breadcrumb-nav {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 5px;

}



.breadcrumb-nav a {

    color: #666;

    text-decoration: none;

    font-size: 14px;

    transition: color 0.3s;

}



.breadcrumb-nav a:hover {

    color: #CC0303;

}



.breadcrumb-nav .separator {

    color: #999;

    margin: 0 5px;

}



.breadcrumb-nav .current {

    color: #CC0303;

    font-size: 14px;

}



.center-boxs{

    margin-bottom: 25px;

}





.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;
}



/* 響應式設計 */

@media (max-width: 992px) {

    .team-main-content {

        display: flex;

        flex-direction: column;

    }

    

    .team-basic-info {

        flex-direction: column;

        text-align: center;

        gap: 20px;

    }

    

    .team-info h1 {

        font-size: 2rem;

    }

    

    /* 移動端圖表調整 */

    #chart-scored,#chart-conceded{

        height: 250px;

    }

}



@media (max-width: 768px) {




    .match-list .macth-date-catname{
        width: 17%;
        flex-direction: column;
        text-align: center;
    }






    .player-item{

        padding-left: 0; padding-right: 0;

    }



    .team-container {

        padding: 15px;

    }

    

    .team-header {

        padding: 20px;

    }

    

    .team-logo {

        width: 80px;

        height: 80px;

    }

    

    .team-info h1 {

        font-size: 1.8rem;

    }

    

    .team-stats {

        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

        gap: 15px;

    }

    

    .stat-card {

        padding: 20px;

    }

    

    .recent-matches,

    .team-info-panel,

    .next-match,

    .team-ranking,

    .team-players,

    .team-tj {

        padding: 20px 8px;

    }

    

    .match-teams {

        margin: 0 10px;

    }





    .info-item {

        align-items: flex-start;

        gap: 8px;

    }

    

    .info-value {

        text-align: left;

        max-width: 100%;

    }

    

    /* 移動端圖表進一步調整 */

    #chart-scored,#chart-conceded{

        height: 220px;

    }



    .team-name{

         font-size: 13px;

    }


    .macth-date-catname{
        display: flex;
        align-items: center;
        position: relative;
        width: 100%;
    }

    .macth-date-catname .catname{
        margin-top: 0px;
        /* position: absolute;
        left: 50%;
        transform: translateX(-50%); */
    }



}



@media (max-width: 576px) {

    .match-list .macth-date-catname{
        width: 100%;
        flex-direction: row;
    }

    .macth-date-catname .catname{
        margin-top: 0px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .team-base-tj{

        display: none;

    }



    .team-basic-info{

        align-items: center; justify-content: center;

    }



    .team-header{

        justify-content: center;

    }



    .player-name span{

        display: none;

    }



    .stat-value {

        font-size: 15px;

    }



    .stat-title{

        font-size: 14px;

    }



    .match-result{

        /* display: none; */

        position: absolute;
        top: 11px;
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 10px;
        left: 70px;

    }

    .right-box{
        flex-direction: row;
        gap: 0px;
        right: 15px;
        position: absolute;
        align-items: flex-end;
    }

    .right-box .first-half{
        display: none;
    }



    .team-stats {

        grid-template-columns: 1fr;

    }

    

    .match-item {

        flex-direction: column;

        gap: 10px;

        padding: 12px;

        align-items: flex-start;
        position: relative;

    }

    

    .match-teams {

        width: 100%;

        margin: 0;

        gap: 10px;

    }


/* 
    .match-teams .team-name:last-child{

        justify-content: flex-end;

    } */

    

    .team-basic-info {

        gap: 15px;

    }

    

    .team-info h1 {

        font-size: 1.5rem;

    }

    

    .match-teams-container {

        flex-direction: column;

        gap: 15px;

    }

    

    .vs-separator {

        transform: rotate(90deg);

    }

    

    .match-actions {

        flex-direction: column;

    }

    

    /* 小屏幕圖表調整 */

    #chart-scored,#chart-conceded{

        height: 200px;

    }



    .match-date{

        text-align: center;

    }



    .breadcrumb-nav,.center-boxs{

        display: none;

    }

}



/* 加載動畫 */

@keyframes fadeInUp {

    from {

        opacity: 0;

        transform: translateY(30px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



.team-header,

.stat-card,

.recent-matches,

.team-info-panel,

.next-match,

.team-ranking,

.team-players,

.team-tj {

    animation: fadeInUp 0.6s ease-out forwards;

}



.stat-card:nth-child(2) {

    animation-delay: 0.1s;

}



.stat-card:nth-child(3) {

    animation-delay: 0.2s;

}



.stat-card:nth-child(4) {

    animation-delay: 0.3s;

}



/* 工具提示 */

.tooltip {

    position: relative;

}



.tooltip:hover::after {

    content: attr(data-tooltip);

    position: absolute;

    top: -35px;

    left: 50%;

    transform: translateX(-50%);

    background: #333;

    color: white;

    padding: 5px 10px;

    border-radius: 4px;

    font-size: 0.8rem;

    white-space: nowrap;

    z-index: 1000;

}



.tooltip:hover::before {

    content: '';

    position: absolute;

    top: -5px;

    left: 50%;

    transform: translateX(-50%);

    border: 5px solid transparent;

    border-top-color: #333;

    z-index: 1000;

}



/* 刷新動畫 */

.refreshing {

    opacity: 0.7;

    position: relative;

}



.refreshing::after {

    content: '';

    position: absolute;

    top: 50%;

    left: 50%;

    width: 20px;

    height: 20px;

    border: 2px solid #CC0303;

    border-top: 2px solid transparent;

    border-radius: 50%;

    transform: translate(-50%, -50%);

    animation: spin 1s linear infinite;

}



@keyframes spin {

    0% { transform: translate(-50%, -50%) rotate(0deg); }

    100% { transform: translate(-50%, -50%) rotate(360deg); }

}