/*!
 * Copyright © 2024 Spotlite (https://spotlite.com)
 * This stylesheet is part of the Spotlite tournament system.
 * Unauthorized reproduction or redistribution is prohibited.
 */

@import url('https://fonts.googleapis.com/earlyaccess/jejumyeongjo.css');

/* 기본 컨테이너 스타일 */
.schedules-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 헤더 영역 */
.refresh-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.refresh-icon:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* 부문 선택 폼 */
.division-select-form select {
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    font-size: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232C3E50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.division-select-form select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 86, 178, 0.1);
}

/* 일정 섹션 */
.schedule-section {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.schedule-section > div:not(:last-child) {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

/* 일정 헤더 */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.schedule-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}

.division-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 8px;
}

.bracket-container {
    cursor: grab;
    font-size: smaller;
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 40px 24px;
    margin-top: 10px;  /* 헤더와의 간격 */
    border: 1px solid #eaeaea;
    overflow-x: auto; 
    scrollbar-width: thin; 
    scrollbar-color: #CBD5E1 #F1F5F9;
}

/* Webkit(Chrome, Safari, Edge) 스크롤바 디자인 */
.bracket-container::-webkit-scrollbar {
    height: 8px; /* 가로 스크롤바 높이 */
}

.bracket-container::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 4px;
}

.bracket-container::-webkit-scrollbar-thumb {
    background-color: #CBD5E1;
    border-radius: 4px;
    border: 2px solid #F1F5F9;
}

.bracket-container::-webkit-scrollbar-thumb:hover {
    background-color: #94A3B8;
}

.bracket-container:active {
    cursor: grabbing;
}

/* 리그 테이블 기본 스타일 */
.league-table.diagonal-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: auto;
}

/* 테이블 셀 공통 스타일 */
.league-table.diagonal-table th {
    border: 1px solid var(--border-color);
    padding: 12px;
    position: relative;
    min-width: 120px;
    max-width: 120px;
    background: white;
}

/* 선수명 셀 스타일 */
.league-table.diagonal-table th span {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
}

.league-table.diagonal-table th span p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 대각선 셀 스타일 */
.league-table.diagonal-table .diagonal {
    background: linear-gradient(
        to top right,
        white calc(50% - 1px),
        var(--border-color) calc(50% - 1px),
        var(--border-color) calc(50% + 1px),
        white calc(50% + 1px)
    );
    border: 1px solid var(--border-color);
}

/* 경기 순서 번호 스타일 */
.league-table.diagonal-table .match-info {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    white-space: normal;
}

/* 검색 결과 강조 */
.league-table.diagonal-table span.searched {
    background-color: rgb(255, 239, 213, 0.5);
}

/* 매치 결과 링크 */
.match-winner {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.match-winner:hover {
    background-color: var(--bg-light);
}

/* 리그 결과 열 */
.league-result {
    min-width: 0 !important;
    background-color: #fff8ee !important;
    font-weight: 500;
    white-space: nowrap;
}

/* 편집 가능한 순위 */
.editable-rank {
    cursor: pointer;
    transition: all 0.2s ease;
}

.editable-rank:hover {
    background-color: var(--bg-heavy-light);
}

/* 탈락자 행 스타일 */
.retired-true {
    opacity: 0.5;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 16px;
    color: var(--text-color);
    font-size: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .schedules-container {
        padding: 0;
    }

    .schedule-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .schedule-section > div:not(:last-child) {
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .schedule-title {
        font-size: 16px;
    }

    .bracket-container {
        padding: 20px 16px;
        margin-top: 6px;
    }

    .league-table th {
        padding: 12px 8px;
        font-size: 13px;
    }

    .league-table span {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .league-table span {
        max-width: 100px;
    }
}

/* 순위 입력 셀 스타일 */
.editable-rank {
    position: relative;
    min-width: 50px; /* 최소 너비 설정 */
    padding: 8px;
}

.editable-rank input[type="number"] {
    width: 40px; /* 고정된 너비 */
    height: 28px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 14px;
    text-align: center;
    outline: none;
    background-color: white;
    color: var(--text-color);
}

/* number input의 화살표 버튼 제거 */
.editable-rank input[type="number"]::-webkit-inner-spin-button,
.editable-rank input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.editable-rank input[type="number"] {
    -moz-appearance: textfield;
}

/* 포커스 상태 */
.editable-rank input[type="number"]:focus {
    box-shadow: 0 0 0 2px rgba(34, 86, 178, 0.1);
}

/* 기존 CSS */
.bracket {
    display: flex;
    position: relative;
}

.round-container {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.round-container h4 {
    width: 90%;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    padding: 8px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.round {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-around;
}

.match {
    border: 1px solid #000;
    border-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    font-size: 14px;
}

.third_place_playoff {
    display: flex;
    align-items: center;
    gap: 10px;
}

.match {
    height: 40px;
    position: relative;
}

.outside-top {
    position: absolute;
    top: -17px; 
    left: 5px;
    width: calc(100% - 10px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.outside-bottom {
    position: absolute;
    left: 5px;
    color: black;
}

.top-left {
    position: absolute;
    top: 2px;
    left: 5px;
    color: black;
}

.bottom-left {
    position: absolute;
    bottom: 2px;
    left: 5px;
    width: calc(100% - 10px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bracket-container .round-container:first-child .top-left,
.bracket-container .round-container:first-child .outside-bottom {
    width: calc(100% - 10px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-score {
    position: absolute;
    left: 0;
    background-color: #fff;
    padding: 0 7px;
    font-size: 1rem;
}

.match-score.top {
    top: -9.5px;
}

.match-score.bottom {
    bottom: -9.5px;
}

.match-winner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: var(--text-color);
}

.tournament-winner {
    border-bottom: 1px solid #000;
    position: relative;
    font-size: 14px;
}

.winner-border-bottom {
    border-bottom: 3px solid #ff0000;
}

.winner-border-top {
    border-top: 3px solid #ff0000;
}

.match::before,
.match::after {
    content: '';
    position: absolute;
    right: -1.5px;
    width: 3px;
    height: calc(50% + 3px);
    background-color: #ff0000;
}

.match::before {
    top: -3px;
    display: none;
}

.match::after {
    bottom: -3px;
    display: none;
}

.match[data-border-position="top"]::before {
    display: block;
}

.match[data-border-position="bottom"]::after {
    display: block;
}

@media (max-width: 768px) {
    .match, .tournament-winner {
        font-size: 13px;
    }
}

.validation-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.validation-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: dialogSlide 0.3s ease;
}

.validation-dialog-icon {
    color: var(--danger-color);
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    padding: 12px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.validation-dialog-title {
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.validation-dialog-message {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 24px;
    padding: 16px;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.validation-dialog-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.validation-dialog-button:hover {
    background-color: var(--primary-hover-color);
}

@keyframes dialogSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .validation-dialog {
        padding: 20px;
    }
    
    .validation-dialog-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }
    
    .validation-dialog-title {
        font-size: 18px;
    }
    
    .validation-dialog-message {
        font-size: 14px;
        padding: 12px;
    }
    
    .validation-dialog-button {
        padding: 10px 24px;
        font-size: 15px;
    }
}

.match-scheduling-guide {
    margin-bottom: 16px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid var(--primary-color-10);
    border-left: 4px solid var(--primary-color);
    font-size: 14px;
    color: #475569;
    transition: all 0.3s ease;
    background-color: var(--primary-color-5);
}

.match-scheduling-guide .guide-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.match-scheduling-guide .guide-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.match-scheduling-guide .guide-icon {
    color: var(--primary-color);
}

.match-scheduling-guide .arrow-icon {
    transition: transform 0.3s ease;
}

.match-scheduling-guide.collapsed .arrow-icon {
    transform: rotate(-90deg);
}

.match-scheduling-guide .guide-content {
    padding: 0 16px 16px;
    max-height: 500px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.match-scheduling-guide.collapsed .guide-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.match-scheduling-guide .guide-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.match-scheduling-guide .guide-list li {
    position: relative;
    padding: 4px 0;
    line-height: 1.5;
}

.match-scheduling-guide .guide-list li::before {
    content: "•";
    position: absolute;
    left: -15px;
    color: var(--primary-hover-color);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .match-scheduling-guide {
        font-size: 13px;
        margin: 12px 0;
    }
    
    .match-scheduling-guide .guide-header {
        padding: 10px 14px;
    }
    
    .match-scheduling-guide .guide-content {
        padding: 0 14px 14px;
    }
}

.rankings-save-container {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.rankings-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background-color: white;
    color: #64748b;
}

.rankings-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.rankings-icon {
    width: 16px;
    height: 16px;
}

.rankings-check {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
    background: white;
    border-radius: 50%;
    padding: 2px;
    border: 1px solid currentColor;
}

.rankings-btn.saved {
    background-color: var(--primary-color-10);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.rankings-btn.saved:hover {
    background-color: #bbf7d0;
    border-color: #4ade80;
    color: #15803d;
}

/* 토너먼트 결과 스타일 */
.results-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 8px;
}

.trophy-icon {
    width: 24px;
    height: 24px;
    color: #f59e0b;
}

.results-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.ranking-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ranking-item {
    position: relative;
    display: flex;
    align-items: center;
    width: fit-content;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px 5px;
    background-color: #f4f4f491;
}

.ranking-item:hover {
    transform: translateX(2px);
}

.medal-emoji {
    font-size: 20px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-name {
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-color);
    font-weight: 500;
}

.third-place-separator {
    display: inline-block;
    margin: 0 4px;
    color: var(--text-muted);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .tournament-results {
        margin-bottom: 16px;
    }
    
    .results-header {
        margin-bottom: 16px;
    }
    
    .medal-emoji {
        font-size: 20px;
    }
    
    .rank-name {
        font-size: 14px;
    }
}

.rank-text {
    font-size: .9rem;
    margin-left: 4px;
    white-space: nowrap;
}

/* 시상 관련 액션 컨테이너 */
.award-actions-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* 알림톡 버튼 스타일 (테두리 없음) */
.alimtalk-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alimtalk-btn:not(.already-called) {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* 이미 호출된 경우 스타일 */
.alimtalk-btn.already-called {
    cursor: default;
}

.alimtalk-icon {
    width: 20px;
    height: 20px;
}

/* 툴팁 스타일 */
.alimtalk-tooltip {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
}

.alimtalk-tooltip:before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: #1e293b;
}

.alimtalk-btn:hover .alimtalk-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 시상 여부 토글 버튼 스타일 */
.award-toggle-container {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.award-toggle-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background-color: white;
    color: #64748b;
}

.award-toggle-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.award-toggle-btn.awarded {
    background-color: #f0f9ff;
    border-color: #93c5fd;
    color: #1e40af;
}

.award-icon {
    width: 16px;
    height: 16px;
}

.award-toggle-btn.awarded .award-icon {
    color: #f59e0b;
}

.toggle-switch {
    position: relative;
    width: 36px;
    height: 18px;
    border-radius: 10px;
    background-color: #e2e8f0;
    margin-left: 6px;
    transition: background-color 0.2s ease;
}

.award-toggle-btn.awarded .toggle-switch {
    background-color: #3b82f6;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: white;
    transition: transform 0.2s ease;
}

.award-toggle-btn.awarded .toggle-slider {
    transform: translateX(18px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .award-toggle-btn {
    padding: 6px 12px;
    font-size: 13px;
    }
    
    .toggle-switch {
    width: 32px;
    height: 16px;
    }
    
    .toggle-slider {
    width: 12px;
    height: 12px;
    }
    
    .award-toggle-btn.awarded .toggle-slider {
    transform: translateX(16px);
    }
}

/* 알림톡 툴팁 스타일 */
.ranking-item .alimtalk-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.ranking-item .alimtalk-tooltip:before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: #1e293b;
}

.ranking-item:hover .alimtalk-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 알림톡 전송 중 상태 표시 */
.ranking-item.sending:after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* 성공/실패 아이콘 */
.ranking-item.success:after,
.ranking-item.error:after {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.ranking-item.success:after {
    content: '✓';
    background-color: #22c55e;
    color: white;
}

.ranking-item.error:after {
    content: '✗';
    background-color: #ef4444;
    color: white;
}

/* 모달 스타일 */
.modal {
    display: none; /* 기본은 숨김 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.arrow-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    z-index: 10;  /* 화살표가 이미지 위에 나타나도록 */
}

.arrow-button.next-button {
    right: 10px;
}

.arrow-button.prev-button {
    left: 10px;
}

.image-container {
    position: relative;  /* 화살표가 이미지 안에서 절대 위치를 갖도록 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-rank-text {
    width: 260px;
    font-family: 'Jeju Myeongjo';
    position: absolute;
    top: 37.5%; /* 원하는 위치 조절 */
    left: 50%;
    transform: translate(-50%, -50%); /* 가운데 정렬 */
}

.rank-image {
    width: 100%;
    aspect-ratio: 1/1; /* 1:1 비율 유지 */
    object-fit: contain; /* 이미지가 잘리는 것 없이 전체 표시 */
}

.image-rank-text .competition-name {
    color: #c4b465;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-rank-text .sub-rank-text {
    font-size: 20px;
    color: #c4b465;
    margin-top: 63px;
}

.image-rank-text .sub-rank-name {
    font-size: 25px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-rank-name .rank-name-part {
    flex: 1;
    max-width: fit-content;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-rank-text .sub-division-title {
    margin-top: 145px;
    color: #c4b465;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 버튼 묶음 */
.button-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 1rem 0;
}

/* 버튼 스타일 */
.button-group button {
    padding: 12px 28px;
    background: linear-gradient(135deg, #4a4a4a, #2c2c2c); /* 그라데이션 배경 */
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid #555;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* 버튼 hover 효과 */
.button-group button:hover {
    background: linear-gradient(135deg, #5c5c5c, #3a3a3a);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 500px) {
    .button-group button {
        font-size: smaller;
        padding: 10px 20px;
    }
}

.score-col {
    display: none;
}

.toggle-all-btn {
    display: block;
    margin-left: auto;
    border: none;
    color: var(--primary-color);
    margin-bottom: 8px;
    background-color: transparent;
}

.end-match:hover {
    border: 1px solid #0066ff;
    cursor: pointer;
}

.bracket-table {
    width: 100%;
    white-space: nowrap;
}

.bracket-cell {
    min-width: 40px;
    text-align: center;
    vertical-align: middle;
    font-size: smaller;
    padding: 5px 8px;
}

.clickable {
    color: var(--primary-color);
    cursor: pointer;
}

.clickable:hover {
    background-color: var(--bg-light) !important;
}
