#schedule {
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    color: #333;
    overflow-x: auto;
}

.tournament-card {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.tournament-scroll {
    overflow-x: auto;
    width: 100%;
    scrollbar-gutter: stable;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    scrollbar-width: auto;
    scrollbar-color: #fb923c #f0f4f8;
    display: grid;
    place-items: center;
}

.tournament-scroll.zoomed-small {
    justify-content: center;
}

.tournament-scroll::-webkit-scrollbar {
    height: 16px;
    background: #f0f4f8;
    border-radius: 8px;
}

.tournament-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    border-radius: 8px;
    border: 2px solid #f0f4f8;
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.3);
}

.tournament-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 4px 8px rgba(251, 146, 60, 0.4);
}

.tournament-scroll::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 8px;
    margin: 2px;
}

.tournament-container {
    --zoom: 1;
    font-size: calc(1rem * var(--zoom));
    padding: calc(20px * var(--zoom));
    box-sizing: border-box;
    transition: font-size 0.2s ease-in-out;
    display: flex;
    justify-content: center;
}

.node-content {
    background-color: #ffffff;
    border: calc(2px * var(--zoom)) solid #fb923c;
    border-radius: calc(8px * var(--zoom));
    padding: calc(12px * var(--zoom));
    margin: 0 auto calc(10px * var(--zoom)) auto;
    box-shadow: 0 4px 6px -1px rgba(251, 146, 60, 0.15), 0 2px 4px -1px rgba(251, 146, 60, 0.1);
    min-width: calc(200px * var(--zoom));
    width: auto;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.node-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(251, 146, 60, 0.2), 0 4px 6px -2px rgba(251, 146, 60, 0.15);
}

.node-bye {
    padding: calc(12px * var(--zoom));
    min-height: calc(80px * var(--zoom));
}

.node-bye .team-name {
    font-weight: 600;
    color: #475569;
}

.node-bye .bye-label {
    font-size: calc(0.75rem * var(--zoom));
    color: #64748b;
    margin-top: calc(4px * var(--zoom));
}

.champion-info {
    font-size: calc(1.5rem * var(--zoom));
    font-weight: bold;
    margin-bottom: calc(20px * var(--zoom));
    padding: calc(12px * var(--zoom));
    background-color: #ffffff;
    border: calc(2px * var(--zoom)) solid #fb923c;
    border-radius: calc(8px * var(--zoom));
    display: inline-block;
    max-width: 90%;
    box-sizing: border-box;
    box-shadow: 0 4px 6px -1px rgba(251, 146, 60, 0.2);
}

.champion-info .score {
    color: #dc2626;
}

.champion-info .name {
    color: #065f46;
    margin: 0 calc(8px * var(--zoom));
}

.round-name {
    font-size: calc(0.875rem * var(--zoom));
    font-weight: 600;
    color: #065f46;
    margin-bottom: calc(8px * var(--zoom));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(8px * var(--zoom));
    text-align: center;
}

/* Match number circle positioned in top-left corner */
.match-number-circle {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    color: white;
    border-radius: 50%;
    width: calc(25px * var(--zoom));
    height: calc(25px * var(--zoom));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(0.6rem * var(--zoom));
    font-weight: 600;
    border: calc(2px * var(--zoom)) solid #ea580c;
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.3);
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: absolute;
    top: calc(8px * var(--zoom));
    left: calc(8px * var(--zoom));
    z-index: 10;
}

.match-number-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(251, 146, 60, 0.4);
}

/* Winner name text - centered without circle */
.round-name-text {
    flex: 1;
    text-align: center;
    font-size: calc(1rem * var(--zoom));
    font-weight: 600;
    color: #065f46;
    margin: 0;
}

/* Match time box */
.match-time-box {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    border: calc(2px * var(--zoom)) solid #ea580c;
    border-radius: calc(6px * var(--zoom));
    padding: calc(4px * var(--zoom)) calc(8px * var(--zoom));
    font-size: calc(0.75rem * var(--zoom));
    font-weight: 500;
    color: white;
    margin-top: calc(4px * var(--zoom));
    margin-bottom: calc(8px * var(--zoom));
    display: inline-block;
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.3);
    transition: all 0.3s ease;
}

.match-time-box:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    border-color: #c2410c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(251, 146, 60, 0.4);
}

.match-box {
    border: calc(1px * var(--zoom)) solid #fed7aa;
    border-radius: calc(6px * var(--zoom));
    padding: calc(8px * var(--zoom));
    background-color: #ffffff;
}

.team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(8px * var(--zoom)) calc(6px * var(--zoom));
    font-size: calc(0.875rem * var(--zoom));
}

.team + .team {
    border-top: none;
}

.team .name {
    margin-right: calc(8px * var(--zoom));
    text-align: left;
    flex-grow: 1;
    white-space: normal;
    overflow: visible;
    word-wrap: break-word;
    line-height: 1.3;
}

/* 新增的決賽比分樣式 */
.team .score-blue {
    background: transparent;
    border: calc(2px * var(--zoom)) solid #3b82f6;
    color: #3b82f6;
    width: calc(32px * var(--zoom));
    height: calc(32px * var(--zoom));
    border-radius: 50%;
    font-size: calc(0.75rem * var(--zoom));
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.team .score-red {
    background: transparent;
    border: calc(2px * var(--zoom)) solid #dc2626;
    color: #dc2626;
    width: calc(32px * var(--zoom));
    height: calc(32px * var(--zoom));
    border-radius: 50%;
    font-size: calc(0.75rem * var(--zoom));
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* 決賽獲勝隊伍的特殊樣式 */
.team.team-blue.winning-team .score-blue {
    background: #3b82f6;
    color: white;
    border: calc(2px * var(--zoom)) solid #3b82f6;
    box-shadow: 0 0 0 calc(2px * var(--zoom)) rgba(59, 130, 246, 0.3);
}

.team.team-red.winning-team .score-red {
    background: #dc2626;
    color: white;
    border: calc(2px * var(--zoom)) solid #dc2626;
    box-shadow: 0 0 0 calc(2px * var(--zoom)) rgba(220, 38, 38, 0.3);
}

.tree {
    width: fit-content;
    min-width: fit-content;
}

.tree ul {
    padding-top: calc(20px * var(--zoom));
    position: relative;
    display: flex;
    justify-content: center;
}

.tree li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: calc(20px * var(--zoom)) calc(10px * var(--zoom)) 0 calc(10px * var(--zoom));
    flex-basis: auto;
    min-width: fit-content;
}

/* Tree connection lines */
.tree li > .node-content::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left-style: solid;
    border-left-color: #fb923c;
    border-left-width: calc(2px * var(--zoom));
    height: calc(20px * var(--zoom));
}

.tree > ul > li > .node-content::before {
    display: none;
}

.tree li::before, .tree li::after {
    content: '';
    position: absolute;
    top: 0;
    height: 0;
    border-top-style: solid;
    border-top-color: #fb923c;
    border-top-width: calc(2px * var(--zoom));
}

.tree li::before {
    left: 50%;
    width: 50%;
}

.tree li::after {
    right: 50%;
    width: 50%;
}

/* Tree line display rules */
.tree li:first-child::after {
    display: none;
}

.tree li:last-child::before {
    display: none;
}

.tree li:only-child::before,
.tree li:only-child::after {
    display: none;
}

/* Hide top connection lines for root level tournament node */
.tree > ul > li::before,
.tree > ul > li::after {
    display: none;
}

.tree li:first-child:not(:only-child)::before {
    border-top-left-radius: 6px;
}

.tree li:last-child:not(:only-child)::after {
    border-top-right-radius: 6px;
}

.round-robin-section {
    width: 100%;
    margin-bottom: 40px;
    text-align: left;
}

.round-robin-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2b6cb0;
    margin-bottom: 20px;
    text-align: center;
}

/* Round Robin Groups Container */
.round-robin-groups-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.round-robin-group-wrapper {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    transition: all 0.3s ease;
}

.round-robin-group-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.round-robin-group-wrapper h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #7c2d12;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #fb923c 0%, #f97316 100%) 1;
    padding-bottom: 0.75rem;
    width: 100%;
    text-align: center;
}

.round-robin-triangle-wrapper {
    position: relative;
    width: 90%;
    padding-bottom: 77.94%;
    margin-top: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    flex-grow: 0;
    flex-shrink: 0;
}

/* Connection lines */
.connection-line {
    position: absolute;
    background-color: #fb923c;
    height: 3px;
    transform-origin: 0 0;
    z-index: 6;
    box-shadow: 0 1px 2px rgba(251, 146, 60, 0.3);
}

.connection-line.top-left {
    top: 9.24%;
    left: 50%;
    width: 85%;
    transform: rotate(120deg);
}

.connection-line.top-right {
    top: 9.24%;
    left: 50%;
    width: 85%;
    transform: rotate(60deg);
}

.connection-line.bottom {
    top: 90.76%;
    width: 85%;
    transform: rotate(0deg);
}

/* Triangle nodes base styles */
.triangle-node {
    background-color: #dbeafe;
    border: 1px solid #60a5fa;
    border-radius: 8px;
    padding: calc(6px * var(--zoom)) calc(10px * var(--zoom));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: absolute;
    font-size: calc(0.9rem * var(--zoom));
    font-weight: 500;
    color: #1e40af;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Team nodes */
.triangle-node.team-node {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    color: #065f46;
    font-weight: 600;
    width: 38%;
    min-height: 35px;
    min-width: 100px;
    border-radius: 8px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 6px;
    font-size: min(0.9rem, 8vw);
    max-width: 100%;
    box-sizing: border-box;
    border-width: 2px;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    height: auto;
}

.triangle-node.team-node:hover {
    background: linear-gradient(135deg, #a7f3d0 0%, #10b981 100%);
    color: white;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 12px -1px rgba(16, 185, 129, 0.3);
}

/* Team node positions */
.triangle-node.team-node.vertex-top {
    top: 9.24%;
    left: 50%;
}

.triangle-node.team-node.vertex-bottom-left {
    top: 90.76%;
    left: 12.67%;
}

.triangle-node.team-node.vertex-bottom-right {
    top: 90.76%;
    left: 87.33%;
}

/* Alternative team positions */
.triangle-node.team-node.top-left {
    top: 15.01%;
    left: 15%;
}

.triangle-node.team-node.top-right {
    top: 15.01%;
    left: 85%;
}

.triangle-node.team-node.bottom-center {
    top: 85.09%;
    left: 50%;
}

/* Score nodes */
.triangle-node.score-node {
    background: linear-gradient(135deg, #fed7aa 0%, #fb923c 100%);
    border-color: #ea580c;
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    width: 20%;
    height: 13%;
    min-width: 55px;
    min-height: 28px;
    font-size: 1.3rem;
    box-shadow: 0 4px 6px -1px rgba(251, 146, 60, 0.2);
    z-index: 12;
    border-width: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.triangle-node.score-node:hover {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 15px -1px rgba(251, 146, 60, 0.3);
}

/* Score node positions */
.triangle-node.score-node.score-top-left-side {
    top: 43%;
    left: 20%;
    transform: rotate(300deg);
}

.triangle-node.score-node.score-top-right-side {
    top: 43%;
    left: 60%;
    transform: rotate(60deg);
}

.triangle-node.score-node.score-bottom-side {
    top: 90.76%;
    left: 50%;
}

/* Ranking container and boxes */
.ranking-container {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    max-width: 90vw;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ranking-box {
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 0;
    flex: 1;
    transition: all 0.3s ease;
    white-space: normal;
    font-weight: 600;
    font-size: 0.6rem;
    text-align: center;
    line-height: 1.1;
    min-height: 28px;
}

.ranking-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.ranking-box.gold-box {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.ranking-box.silver-box {
    border-color: #9ca3af;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
}

.ranking-box.bronze-box {
    border-color: #a16207;
    background: linear-gradient(135deg, #fef3c7 0%, #f59e0b 100%);
    color: #92400e;
}

.rank-icon {
    font-size: 1.1rem;
    display: inline-block;
}

.rank-icon.gold {
    filter: drop-shadow(0 0 3px #fbbf24);
}

.rank-icon.silver {
    filter: drop-shadow(0 0 3px #9ca3af);
}

.rank-icon.bronze {
    filter: drop-shadow(0 0 3px #a16207);
}

.rank-text {
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    min-width: 0;
    word-break: break-word;
    line-height: 1.3;
    text-align: center;
    flex: 1;
    font-size: 0.9rem;
    text-align: left;
}

.team-separator {
    height: 1px;
    background: linear-gradient(90deg, #fb923c 0%, #ea580c 100%);
    margin: 6px 0;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(251, 146, 60, 0.2);
}

/* 獲勝隊伍背景色樣式 */
.team.winning-team {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 6px;
    padding: 8px 6px;
    margin: -2px 0;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.team.winning-team.opponent-winning {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

/* 確保獲勝隊伍的文字顏色保持清晰 */
.team.winning-team .name {
    color: #1e40af;
    font-weight: 600;
}

.team.winning-team.opponent-winning .name {
    color: #991b1b;
    font-weight: 600;
}

/* 冠軍戰基礎配色 - 藍紅底色 */
.team.team-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 6px;
    padding: 8px 6px;
    margin: -2px 0;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.1);
    transition: all 0.3s ease;
}

.team.team-red {
    background: linear-gradient(135deg, #fef2f2 0%, #fde8e8 100%);
    border-radius: 6px;
    padding: 8px 6px;
    margin: -2px 0;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
    transition: all 0.3s ease;
}

.team.team-blue .name {
    color: #3b82f6;
    font-weight: 600;
    font-size: calc(1rem * var(--zoom));
}

.team.team-red .name {
    color: #ef4444;
    font-weight: 600;
    font-size: calc(1rem * var(--zoom));
}

/* 獲勝時的深色效果 */
.team.team-blue.winning-team {
    background: #2563eb;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.team.team-red.winning-team {
    background: #dc2626;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.team.team-blue.winning-team .name {
    color: white;
    font-weight: 700;
}

.team.team-red.winning-team .name {
    color: white;
    font-weight: 700;
}

.team.team-blue.winning-team .score {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.team.team-red.winning-team .score {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@media (min-width: 768px) {
    .round-robin-groups-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    #schedule {
        padding: 10px;
    }

    .tournament-container {
        padding: 10px;
    }

    .node-content {
        min-width: 180px;
        padding: 8px;
    }

    .champion-info {
        font-size: 1.25rem;
        padding: 8px;
    }

    .team {
        font-size: 0.8rem;
    }

    .team .score {
        padding: 1px 6px;
        font-size: 0.7rem;
    }

    .round-robin-triangle-wrapper {
        margin-bottom: 15px;
    }

    .round-robin-group-wrapper {
        min-width: 0;
        min-height: 0;
        padding: 1rem;
    }

    .triangle-node.team-node {
        font-size: 0.8rem;
        min-width: 110px;
        min-height: 38px;
        padding: 6px 8px;
        line-height: 1.0;
        width: 39%;
    }

    .triangle-node.score-node {
        min-width: 28px;
        min-height: 20px;
        font-size: 0.8rem;
        padding: 2px 4px;
    }

    .ranking-container {
        flex-direction: column;
        gap: 0.3rem;
        max-width: 90vw;
    }

    .ranking-box {
        font-size: 0.55rem;
        padding: 0.3rem 0.5rem;
        gap: 0.25rem;
        white-space: normal;
        line-height: 1.1;
        justify-content: flex-start;
        border-radius: 6px;
    }

    .rank-icon {
        font-size: 0.75rem;
    }

    .zoom-controls {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.375rem;
    }
    
    .zoom-btn {
        width: 36px;
        height: 36px;
    }
    
    .zoom-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    #schedule {
        padding: 10px;
    }

    .tournament-container {
        padding: 10px;
    }

    .node-content {
        min-width: 180px;
        padding: 8px;
    }

    .champion-info {
        font-size: 1.25rem;
        padding: 8px;
    }

    .team {
        font-size: 0.8rem;
    }

    .team .score {
        padding: 1px 6px;
        font-size: 0.7rem;
    }

    .round-robin-triangle-wrapper {
        margin-bottom: 15px;
    }

    .round-robin-group-wrapper {
        min-width: 0;
        min-height: 0;
        padding: 1rem;
    }

    .triangle-node.team-node {
        font-size: 0.8rem;
        min-width: 110px;
        min-height: 38px;
        padding: 6px 8px;
        line-height: 1.0;
        width: 39%;
    }

    .triangle-node.score-node {
        min-width: 28px;
        min-height: 20px;
        font-size: 0.8rem;
        padding: 2px 4px;
    }

    .ranking-container {
        flex-direction: row;
        gap: 0.3rem;
        max-width: 90vw;
    }

    .ranking-box {
        font-size: 0.55rem;
        padding: 0.3rem 0.5rem;
        gap: 0.25rem;
        white-space: normal;
        line-height: 1.1;
        justify-content: flex-start;
        border-radius: 6px;
        flex: 1;
    }

    .rank-icon {
        font-size: 0.75rem;
    }
    .rank-text {
        font-size: 0.8rem;
    }
    
}

@media (max-width: 480px) {
    .node-content {
        min-width: calc(150px * var(--zoom));
    }

    .team .name {
        font-size: calc(0.75rem * var(--zoom));
    }

    .round-robin-group-wrapper {
        min-width: 0;
        min-height: 0;
        padding: 0.5rem;
    }

    .triangle-node.team-node {
        font-size: 0.7rem;
        min-width: 55px;
        min-height: 26px;
        padding: 2px 4px;
        line-height: 1.0;
        letter-spacing: -0.3px;
    }

    .triangle-node.score-node {
        min-width: 25px;
        min-height: 18px;
        font-size: 0.6rem;
        padding: 1px 3px;
    }

    .ranking-container {
        flex-direction: column;
        gap: 0.4rem;
        max-width: 80vw;
        padding: 5px 10px;
    }

    .ranking-box {
        font-size: 0.6rem;
        padding: 0.4rem 0.6rem;
        gap: 0.3rem;
        border-radius: 6px;
        white-space: normal;
        line-height: 1.2;
        justify-content: flex-start;
        min-height: 32px;
    }

    .rank-text {
        text-align: left;
        font-size: 0.8rem;
    }

    .rank-icon {
        font-size: 0.75rem;
    }
}

/* 放大縮小功能樣式 */
.zoom-controls {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.3);
    transition: all 0.3s ease;
    font-size: 0;
}

.zoom-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(251, 146, 60, 0.4);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 1024px) {
    .zoom-controls {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.375rem;
    }
    
    .zoom-btn {
        width: 36px;
        height: 36px;
    }
    
    .zoom-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .zoom-controls {
        top: 0.5rem;
        right: 0.5rem;
        gap: 0.25rem;
    }
    
    .zoom-btn {
        width: 32px;
        height: 32px;
    }
    
    .zoom-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .zoom-controls {
        top: 0.375rem;
        right: 0.375rem;
        gap: 0.25rem;
    }
    
    .zoom-btn {
        width: 28px;
        height: 28px;
    }
    
    .zoom-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* 縮放容器樣式 */
.tournament-scroll {
    overflow-x: scroll;
    width: 100%;
    scrollbar-gutter: stable;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    scrollbar-width: auto;
    scrollbar-color: #fb923c #f0f4f8;
    transform-origin: top left;
    transition: transform 0.3s ease;
}



/* 縮放時的滾動條調整 */
.tournament-scroll.zoomed {
    overflow: auto;
}

.tournament-scroll.zoomed::-webkit-scrollbar {
    height: 20px;
    width: 20px;
}

.tournament-scroll.zoomed::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    border-radius: 10px;
    border: 2px solid #f0f4f8;
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.3);
}

.tournament-scroll.zoomed::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 10px;
    margin: 2px;
}

