/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 모바일 확대/축소 방지 */
html, body {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* 입력 필드에서만 텍스트 선택 허용 */
input, textarea {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Segoe UI', 'Roboto', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #f5f7fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Navigation */
.navbar {
    background: transparent; /* 전체 폭 배경 제거 - 컨테이너에만 적용 */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 100%; /* 전체 너비 사용 */
    margin: 8px 15px; /* 좌우 여백만 유지 */
    padding: 0 12px; /* 모바일 기준 패딩 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px; /* 더 작은 높이 */
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

/* 태블릿에서 nav-container 기본 스타일 오버라이드 */
@media (min-width: 769px) and (max-width: 2000px) {
    .nav-container {
        margin: 0 !important; /* 기본 margin 완전 제거 */
    }
}

.nav-logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1rem; /* 더 작게 축소 */
    font-weight: bold;
    flex-wrap: nowrap !important; /* 한 줄로 표시 - 강제 */
    gap: 4px; /* 요소 간 간격 */
    max-width: calc(100% - 80px); /* 햄버거 버튼 공간 확보 */
    min-width: 0; /* flex 축소 허용 */
    overflow: hidden; /* 넘치는 내용 숨김 */
    width: auto; /* 너비 자동 조정 */
}

.nav-logo i {
    margin-left: 6px; /* 텍스트 뒤에 배치 */
    margin-right: 0; /* 오른쪽 여백 제거 */
    font-size: 1.2rem; /* 더 작게 축소 */
}

.ci-logo {
    height: 40px; /* CI2 크기 더 증가 (32px -> 40px) */
    width: auto;
    object-fit: contain;
    flex-shrink: 0; /* 이미지 축소 방지 */
}

.ci-logo-1 {
    margin-right: 8px; /* 오른쪽 여백 */
}

.ci-logo-2 {
    margin-left: 8px; /* 왼쪽 여백 */
}

/* CI 배너 (예약 현황 카드 안) */
.ci-banner {
    width: 100%;
    background-color: transparent;
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    margin: 0 0 10px 0;
    margin-top: 70px !important; /* 네비게이션 바 아래에 표시되도록 여백 추가 */
    box-sizing: border-box;
    border-bottom: none; /* 하단 구분선 제거 */
    position: relative; /* 겹침 방지 */
    z-index: 100 !important; /* 다른 요소들 위에 표시되도록 높은 z-index */
    overflow: visible !important; /* 이미지가 잘리지 않도록 */
}

/* 컨테이너 안에 직접 있는 CI 배너 */
.reservations-container > .ci-banner,
.matches-container > .ci-banner,
.rankings-container > .ci-banner,
.stats-container > .ci-banner,
.records-container > .ci-banner {
    padding: 10px 15px;
    margin-bottom: 10px;
    margin-top: 70px !important; /* 네비게이션 바 아래에 표시되도록 여백 추가 */
    position: relative;
    z-index: 100 !important; /* 다른 요소들 위에 표시되도록 높은 z-index */
    overflow: visible !important; /* 이미지가 잘리지 않도록 */
}

.reservations-board .ci-banner,
.matches-container .ci-banner,
.rankings-container .ci-banner,
.stats-container .ci-banner,
.records-container .ci-banner {
    padding: 10px 15px;
    margin-bottom: 10px;
    position: relative;
    z-index: 100 !important; /* 다른 요소들 위에 표시되도록 높은 z-index */
    overflow: visible !important; /* 이미지가 잘리지 않도록 */
}

.ci-banner-img {
    max-width: 60%; /* 크기 축소 (70% -> 60%) */
    width: 60%;
    height: auto;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 100 !important; /* 다른 요소들 위에 표시되도록 높은 z-index */
}

/* PC (데스크톱) - 큰 화면 */
@media (min-width: 1201px) {
    .ci-banner,
    .reservations-container > .ci-banner,
    .matches-container > .ci-banner,
    .rankings-container > .ci-banner,
    .stats-container > .ci-banner,
    .records-container > .ci-banner,
    .reservations-board .ci-banner,
    .matches-container .ci-banner,
    .rankings-container .ci-banner,
    .stats-container .ci-banner,
    .records-container .ci-banner {
        display: flex !important; /* PC에서도 표시되도록 명시 */
        padding: 12px 30px;
        position: relative !important;
        z-index: 100 !important; /* PC에서 겹침 방지 - 높은 z-index */
        overflow: visible !important; /* 이미지가 잘리지 않도록 */
    }
    
    .ci-banner-img {
        display: block !important; /* PC에서 이미지가 보이도록 명시 */
        visibility: visible !important;
        opacity: 1 !important;
        max-width: 50%; /* PC에서 더 작게 (60% -> 50%) */
        width: 50%;
        height: auto;
        position: relative !important;
        z-index: 100 !important; /* 다른 요소들 위에 표시 */
    }
}

/* 태블릿 */
@media (min-width: 769px) and (max-width: 1200px) {
    .reservations-container > .ci-banner,
    .matches-container > .ci-banner,
    .rankings-container > .ci-banner,
    .stats-container > .ci-banner,
    .records-container > .ci-banner,
    .reservations-board .ci-banner,
    .matches-container .ci-banner,
    .rankings-container .ci-banner,
    .stats-container .ci-banner,
    .records-container .ci-banner {
        padding: 10px 20px;
        position: relative !important;
        z-index: 100 !important; /* 태블릿에서 겹침 방지 - 높은 z-index */
        overflow: visible !important; /* 이미지가 잘리지 않도록 */
    }
    
    .ci-banner-img {
        max-width: 55%; /* 태블릿에서 적절한 크기 (65% -> 55%) */
        width: 55%;
        height: auto;
        display: block !important;
        position: relative !important;
        z-index: 100 !important; /* 다른 요소들 위에 표시 */
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .reservations-container > .ci-banner,
    .matches-container > .ci-banner,
    .rankings-container > .ci-banner,
    .stats-container > .ci-banner,
    .records-container > .ci-banner {
        padding: 8px 12px !important;
        margin-top: 70px !important; /* 네비게이션 바 아래에 표시되도록 여백 추가 */
        margin-bottom: 10px !important;
        position: relative !important;
        z-index: 100 !important; /* 모바일에서 겹침 방지 - 높은 z-index */
        overflow: visible !important; /* 이미지가 잘리지 않도록 */
        display: flex !important; /* 표시되도록 강제 */
    }
    
    .reservations-board .ci-banner,
    .matches-container .ci-banner,
    .rankings-container .ci-banner,
    .stats-container .ci-banner,
    .records-container .ci-banner {
        padding: 8px 12px;
        position: relative !important;
        z-index: 100 !important; /* 모바일에서 겹침 방지 - 높은 z-index */
        overflow: visible !important; /* 이미지가 잘리지 않도록 */
    }
    
    .ci-banner-img {
        max-width: 60% !important; /* 모바일에서 적절한 크기 (70% -> 60%) */
        width: 60% !important;
        height: auto !important;
        display: block !important;
        position: relative !important;
        z-index: 100 !important; /* 다른 요소들 위에 표시 */
    }
}

/* 작은 모바일 */
@media (max-width: 480px) {
    .reservations-container > .ci-banner,
    .matches-container > .ci-banner,
    .rankings-container > .ci-banner,
    .stats-container > .ci-banner,
    .records-container > .ci-banner {
        padding: 6px 10px !important;
        margin-top: 70px !important; /* 네비게이션 바 아래에 표시되도록 여백 추가 */
        margin-bottom: 10px !important;
        position: relative !important;
        z-index: 100 !important; /* 작은 모바일에서 겹침 방지 - 높은 z-index */
        overflow: visible !important; /* 이미지가 잘리지 않도록 */
        display: flex !important; /* 표시되도록 강제 */
    }
    
    .reservations-board .ci-banner,
    .matches-container .ci-banner,
    .rankings-container .ci-banner,
    .stats-container .ci-banner,
    .records-container .ci-banner {
        padding: 6px 10px;
        position: relative !important;
        z-index: 100 !important; /* 작은 모바일에서 겹침 방지 - 높은 z-index */
        overflow: visible !important; /* 이미지가 잘리지 않도록 */
    }
    
    .ci-banner-img {
        max-width: 65% !important; /* 작은 모바일에서 조금 더 크게 (75% -> 65%) */
        width: 65% !important;
        height: auto !important;
        display: block !important;
        position: relative !important;
        z-index: 100 !important; /* 다른 요소들 위에 표시 */
    }
}

.version-badge {
    margin-left: 8px;
    font-size: 0.75rem;
    font-weight: normal;
    opacity: 0.85;
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    flex-shrink: 0; /* 버전 배지 축소 방지 */
    white-space: nowrap; /* 한 줄로 표시 */
}

.nav-user-info {
    display: none !important; /* 초기에는 숨김, JavaScript에서 표시할 때만 보임 */
    visibility: hidden !important; /* 추가로 숨김 보장 */
    color: white;
    white-space: nowrap !important; /* 강제 한 줄 */
    overflow: hidden; /* 넘치는 내용 숨김 */
    text-overflow: ellipsis; /* 넘치는 텍스트는 ... 표시 */
    flex-shrink: 1; /* 필요시 축소 허용 */
    margin-left: 16px; /* 버전 배지와 간격 늘리기 (8px -> 16px) */
    font-size: 0.85rem;
    opacity: 0.9;
    max-width: 150px; /* 최대 너비 제한으로 한 줄 유지 */
    width: 0 !important; /* 초기 너비 0으로 설정 */
    height: 0 !important; /* 초기 높이 0으로 설정 */
}

/* nav-user-info가 명시적으로 표시될 때만 보이도록 */
.nav-user-info[style*="display: block"],
.nav-user-info[style*="display:flex"],
.nav-user-info[style*="display: inline"] {
    display: flex !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
}

.nav-menu {
    display: none; /* 기본 숨김 - 햄버거로 열기 */
    align-items: center;
    gap: 15px; /* 모바일 기준으로 축소 */
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffd700;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.user-menu {
    display: flex;
    flex-direction: column; /* 모든 화면에서 세로 배치 */
    align-items: center;
    gap: 10px;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center; /* 중앙 정렬 */
    font-size: 0.8rem; /* 모바일 기준으로 축소 */
}

.user-name {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.8rem; /* 모바일 기준으로 축소 */
}

.user-dupr {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

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

.btn-small {
    padding: 4px 8px; /* 모바일 기준으로 축소 */
    font-size: 0.7rem; /* 모바일 기준으로 축소 */
    min-width: auto;
}

.hamburger {
    display: flex; /* 모든 화면에서 표시 */
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 20px; /* 더 작게 */
    height: 2px; /* 더 얇게 */
    background-color: white;
    margin: 2px 0; /* 간격 축소 */
    transition: 0.3s;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: #dc2626;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* Main Content */
.main-content {
    margin-top: 70px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 100px 0;
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-icon {
    font-size: 15rem;
    opacity: 0.3;
    color: white;
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #333;
}

/* Reservation Section */
.reservation-section {
    padding: 100px 0;
    background: #fff;
}

.reservation-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.reservation-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 로그인 폼 스타일 */
#login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#login-form .form-group:last-of-type {
    margin-bottom: 10px;
}

#login-form .btn {
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-control {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* My Reservations Section */
.my-reservations {
    padding: 100px 0;
    background: white;
}

.reservations-list {
    max-width: 800px;
    margin: 0 auto;
}

.reservation-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #dc2626;
}

.reservation-item.pending {
    border-left-color: #ffc107;
}

.reservation-item.confirmed {
    border-left-color: #28a745;
}

.reservation-item.cancelled {
    border-left-color: #dc3545;
    opacity: 0.7;
}

.reservation-info h4 {
    color: #333;
    margin-bottom: 5px;
}

.reservation-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 2px 0;
}

.reservation-status {
    font-weight: 500;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.reservation-status.pending {
    background: #fff3cd;
    color: #856404;
}

.reservation-status.confirmed {
    background: #d4edda;
    color: #155724;
}

.reservation-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.reservation-dupr {
    color: #dc2626;
    font-weight: 500;
}

.cancelled-text {
    color: #dc3545;
    font-style: italic;
}

/* 랭킹 섹션 스타일 */
.rankings-section {
    padding: 100px 0;
    background: #fff;
}

.rankings-container {
    max-width: 100%;
    margin: 0;
    padding: 0 4px 140px 4px; /* 예약, 대진표 탭 수준의 여백 */
    width: 100%;
    box-sizing: border-box;
}

.rankings-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.tab-btn:hover {
    color: #dc2626;
}

.tab-content {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.tab-content.active {
    display: block;
    width: 100%;
}

.rankings-list {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item.top-3 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    margin: -15px -30px 15px -30px;
    padding: 20px 30px;
    border-radius: 15px 15px 0 0;
    color: #333;
}

.ranking-item.top-3:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.ranking-item.top-3:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
}

.rank-number {
    font-size: 1.5rem;
    font-weight: bold;
    width: 50px;
    text-align: center;
    color: #dc2626;
}

.ranking-item.top-3 .rank-number {
    color: #333;
    font-size: 2rem;
}

.player-info {
    flex: 1;
    margin-left: 20px;
}

.player-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.player-stats {
    font-size: 0.9rem;
    color: #666;
}

.rating-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: #dc2626;
    text-align: right;
    min-width: 80px;
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #dc2626;
}

.my-stats {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #dc2626;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #dc2626;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.recent-games {
    margin-top: 30px;
}

.recent-games h3 {
    color: #333;
    margin-bottom: 20px;
}

.game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.game-item:last-child {
    border-bottom: none;
}

.game-info {
    flex: 1;
}

.game-date {
    font-weight: 500;
    color: #333;
}

.game-details {
    font-size: 0.9rem;
    color: #666;
}

.game-result {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.game-result.won {
    background: #d4edda;
    color: #155724;
}

.game-result.lost {
    background: #f8d7da;
    color: #721c24;
}

/* 팀 배정 UI 스타일 */
.team-assignments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #dc2626;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.team-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.2rem;
}

.team-stats {
    font-size: 0.9rem;
    color: #666;
}

.team-score {
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.team-players {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.player-card {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.player-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.player-scores {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8rem;
}

.player-scores .dupr {
    color: #dc2626;
    font-weight: 500;
}

.player-scores .internal {
    color: #666;
}

/* 팀 모드 선택 UI */
.team-mode-selector {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.team-mode-selector h3 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.mode-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.mode-option {
    cursor: pointer;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.mode-option input[type="radio"]:checked + .mode-card {
    border-color: #dc2626;
    background: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.2);
}

.mode-card i {
    font-size: 2rem;
    color: #dc2626;
    margin-bottom: 10px;
}

.mode-card h4 {
    color: #333;
    margin: 10px 0 5px 0;
    font-size: 1.1rem;
}

.mode-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* 관리자 섹션 스타일 */
.admin-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.admin-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.team-assignment-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.team-assignment-controls .form-group {
    margin-bottom: 0;
}

.team-assignment-controls .btn {
    margin-top: 20px;
    height: 40px;
}

.team-assignment-controls .btn:first-of-type {
    margin-right: 10px;
}

/* 관리자 관리 스타일 */
.admin-management {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: end;
}

.input-group .form-control {
    flex: 1;
}

.admin-list {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #dc2626;
}

.admin-info {
    flex: 1;
}

.admin-email {
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
}

.admin-meta {
    font-size: 0.8rem;
    color: #666;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-actions button {
    padding: 4px 8px;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-admin-btn {
    background: #dc3545;
    color: white;
}

.remove-admin-btn:hover {
    background: #c82333;
}

.admin-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.admin-status.active {
    background: #d4edda;
    color: #155724;
}

.admin-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* 회원가입 승인 요청 스타일 */
.signup-requests-section {
    margin-top: 10px;
}

.signup-requests-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 10px;
}

.signup-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #ff9800;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.signup-request-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.request-info {
    flex: 1;
}

.request-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 1rem;
}

.request-email {
    font-weight: 500;
    color: #dc2626;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.request-meta {
    font-size: 0.8rem;
    color: #666;
}

.request-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.request-actions .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.request-actions .btn-primary {
    background: #28a745;
    color: white;
    border: none;
}

.request-actions .btn-primary:hover {
    background: #218838;
}

.request-actions .btn-outline {
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.request-actions .btn-outline:hover {
    background: #dc3545;
    color: white;
}

/* 인원 관리 스타일 */
.member-management-section {
    margin-top: 10px;
}

.member-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
}

.member-table-header {
    display: flex;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.85rem;
}

.member-header-cell {
    padding: 0 4px;
    font-size: 0.85rem;
    color: #495057;
    white-space: nowrap;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    min-height: 40px;
}

.member-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.member-item:hover {
    background: #f8f9fa;
}

.member-cell {
    padding: 0 4px;
    font-size: 0.85rem;
    color: #333;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-cell:first-child {
    font-weight: 500;
}

.remove-member-btn {
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    white-space: nowrap;
}

.remove-member-btn:hover {
    background: #dc3545;
    color: white;
}

.remove-member-btn i {
    margin-right: 4px;
}

/* 모바일에서 이메일 컬럼 숨기기 및 매우 컴팩트 스타일 */
@media (max-width: 768px) {
    .member-email-cell {
        display: none !important;
    }
    
    .member-list {
        max-height: 400px !important;
        border-radius: 6px !important;
    }
    
    .member-table-header {
        padding: 6px 2px !important;
        font-size: 0.75rem !important;
        border-radius: 6px 6px 0 0 !important;
        gap: 2px !important;
    }
    
    .member-header-cell {
        padding: 0 !important;
        font-size: 0.75rem !important;
        margin: 0 !important;
    }
    
    .member-item {
        padding: 6px 2px !important;
        min-height: 36px !important;
        gap: 2px !important;
    }
    
    .member-cell {
        padding: 0 !important;
        font-size: 0.75rem !important;
        margin: 0 !important;
    }
    
    /* 강퇴 버튼 텍스트 숨기고 아이콘만 표시 */
    .remove-member-btn.mobile-remove-btn {
        min-width: 28px !important;
        width: 28px !important;
        padding: 3px !important;
        font-size: 0.7rem !important;
        border-radius: 3px !important;
        position: relative !important;
    }
    
    .remove-member-btn.mobile-remove-btn .remove-btn-text {
        display: none !important;
    }
    
    .remove-member-btn.mobile-remove-btn i {
        margin: 0 !important;
        font-size: 0.8rem !important;
    }
}

/* 알림 시스템 스타일 */
.notifications-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #fff;
}

.notification-item.unread {
    background-color: #e3f2fd;
    border-left: 4px solid #dc2626;
}

.notification-icon {
    margin-right: 15px;
    margin-top: 5px;
}

.notification-icon i {
    font-size: 1.2rem;
    color: #dc2626;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.notification-message {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.notification-time {
    color: #999;
    font-size: 0.8rem;
}

.notification-actions {
    margin-left: 15px;
}

.notification-actions button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
}

.notification-actions button:hover {
    background-color: #fff;
    color: #333;
}

/* 대시보드 스타일 */
.dashboard-section {
    padding: 100px 0;
    background: #fff;
}

.dashboard-container {
    max-width: 100%;
    margin: 0;
    padding: 0 4px 140px 4px; /* 예약, 대진표 탭 수준의 여백 */
    width: 100%;
    box-sizing: border-box;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-stats .stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    border-left: 4px solid #dc2626;
}

.stat-icon {
    margin-right: 20px;
}

.stat-icon i {
    font-size: 2.5rem;
    color: #dc2626;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

.dashboard-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dashboard-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.dashboard-tabs .tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.dashboard-tabs .tab-btn.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.dashboard-tabs .tab-btn:hover {
    color: #dc2626;
}

.reservations-dashboard,
.teams-dashboard {
    min-height: 300px;
}

.time-slot-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #28a745;
}

.time-slot-card.insufficient {
    border-left-color: #dc3545;
}

.time-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.time-slot-title {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.time-slot-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.time-slot-status.ready {
    background: #d4edda;
    color: #155724;
}

.time-slot-status.insufficient {
    background: #f8d7da;
    color: #721c24;
}

.time-slot-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.time-slot-stat {
    text-align: center;
}

.time-slot-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #dc2626;
    margin-bottom: 5px;
}

.time-slot-stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* 반응형 개선 */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats .stat-card {
        padding: 20px;
    }
    
    .stat-icon i {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .time-slot-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-icon {
        margin-right: 10px;
    }
}

/* 메인 대시보드 레이아웃 */
.main-dashboard {
    height: calc(100vh - 80px);
    padding: 20px 0;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.left-panel, .right-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.panel-header i {
    margin-right: 10px;
}

.panel-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 상태 탭 */
.status-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.status-tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.status-tab-btn.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.status-tab-btn:hover {
    color: #dc2626;
}

.status-tab-content {
    display: none;
    height: calc(100% - 60px);
    overflow-y: auto;
}

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

/* 오늘 현황 통계 */
.today-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #dc2626;
    border: 1px solid #e0e0e0;
}

.stat-item .stat-icon {
    margin-right: 15px;
}

.stat-item .stat-icon i {
    font-size: 1.5rem;
    color: #dc2626;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* 시간 슬롯 현황 */
.time-slots-status {
    max-height: 300px;
    overflow-y: auto;
}

.time-slot-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #28a745;
}

.time-slot-card.insufficient {
    border-left-color: #dc3545;
}

.time-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.time-slot-title {
    font-weight: 600;
    color: #333;
}

.time-slot-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.time-slot-status.ready {
    background: #d4edda;
    color: #155724;
}

.time-slot-status.insufficient {
    background: #f8d7da;
    color: #721c24;
}

.time-slot-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.time-slot-stat {
    text-align: center;
}

.time-slot-stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #dc2626;
    margin-bottom: 2px;
}

.time-slot-stat-label {
    color: #666;
    font-size: 0.8rem;
}

/* 관리자 대시보드 */
.admin-dashboard {
    height: 100%;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    border-left: 4px solid #dc2626;
}

.admin-stat-card .stat-icon {
    margin-right: 15px;
}

.admin-stat-card .stat-icon i {
    font-size: 1.5rem;
    color: #dc2626;
}

.admin-content {
    height: calc(100% - 100px);
}

.admin-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.admin-tabs .tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.admin-tabs .tab-btn.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.admin-tabs .tab-btn:hover {
    color: #dc2626;
}

/* 반응형 */
@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .left-panel, .right-panel {
        height: 50vh;
    }
}

@media (max-width: 768px) {
    .today-stats, .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .time-slot-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .status-tabs {
        flex-wrap: wrap;
    }
    
    .status-tab-btn {
        flex: 1 1 50%;
        font-size: 0.8rem;
        padding: 10px 8px;
    }
}

.reservation-actions {
    display: flex;
    gap: 10px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #c82333;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ccc;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    max-height: 95vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(95vh - 120px);
}

.modal-footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.team-mode-option {
    transition: all 0.3s ease;
}

.team-mode-option:hover {
    border-color: #dc2626 !important;
    background-color: #f8f9ff !important;
}

.team-mode-option input[type="radio"] {
    cursor: pointer;
}

.team-mode-option input[type="radio"]:checked {
    accent-color: #dc2626;
}

label.team-mode-option:has(input[type="radio"]:checked) {
    border-color: #dc2626 !important;
    background-color: #f8f9ff !important;
}

.modal-footer a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* 로그인/회원가입 정보 메시지 */
.login-info,
.signup-info {
    margin-top: 15px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.login-info p,
.signup-info p {
    margin: 0;
    color: #1976d2;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-info i,
.signup-info i {
    color: #2196f3;
}

/* 비밀번호 설정 모달 */
.password-info {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.password-info p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-info i {
    color: #ffc107;
}

/* DUPR 관련 스타일 */
.dupr-info {
    margin-top: 15px;
    padding: 12px;
    background: #e8f5e8;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.dupr-info p {
    margin: 0;
    color: #155724;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dupr-info i {
    color: #28a745;
}

/* 관리자 설정 모달 스타일 */
#admin-settings-modal .modal-content {
    max-height: 95vh;
    overflow: hidden;
    width: 95vw;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
}

#admin-settings-modal .modal-body {
    max-height: calc(95vh - 140px);
    overflow-y: auto;
    padding: 20px 30px;
    flex: 1;
}

#admin-settings-modal .modal-header {
    padding: 20px 30px 10px 30px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

#admin-settings-modal .modal-footer {
    padding: 10px 30px 20px 30px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.admin-info {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.admin-info p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-info i {
    color: #ffc107;
}

/* 시간 슬롯 설정 스타일 */
.time-slot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.time-slot-item:hover {
    background: #e9ecef;
    border-color: #dc2626;
}

.time-slot-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.time-slot-item .time-start,
.time-slot-item .time-end {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
}

.time-separator {
    font-weight: 600;
    color: #dc2626;
    font-size: 1.1rem;
}

.time-slot-item span {
    font-weight: 500;
    color: #666;
}

.remove-time-slot {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-time-slot:hover {
    background: #c82333;
    transform: scale(1.05);
}

.remove-time-slot i {
    font-size: 14px;
}

#add-time-slot {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#add-time-slot:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.form-text {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* 모든 화면에서 모바일 기준 사용자 메뉴 스타일 적용 */
.user-menu {
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.user-info {
    align-items: center;
}

.user-actions {
    flex-direction: column;
    gap: 8px;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 4000;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-left: 4px solid #28a745;
    animation: toastSlideIn 0.3s ease;
    max-width: 300px;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 모든 화면에서 모바일 스타일 적용 */
.nav-menu {
    position: fixed;
    top: 70px;
    flex-direction: column;
    background-color: rgba(220, 38, 38, 0.95);
    width: 100%;
    max-width: 480px; /* 모바일 기준 너비 제한 */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    transition: 0.3s;
    padding: 20px 0;
    backdrop-filter: blur(10px);
    z-index: 3000; /* 다른 레이어 위에 표시 */
    display: none; /* 기본 숨김 */
}

.nav-menu.active {
    left: 50%;
    transform: translateX(-50%);
    display: flex !important; /* 햄버거 클릭 시 확실히 표시 */
}

.nav-menu .nav-link {
    margin: 10px 0;
    font-size: 1.1rem;
}

.auth-buttons {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* 누락된 미디어 쿼리 시작: 모바일 레이아웃 보정 */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-icon {
        font-size: 8rem;
        margin-top: 40px;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .reservation-card {
        margin: 0 20px;
        padding: 30px 20px;
    }

    .reservation-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .reservation-actions {
        justify-content: center;
    }

    .modal-content {
        margin: 5% auto;
        width: 95%;
    }

    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    /* 관리자 설정 모달 모바일 최적화 */
    #admin-settings-modal .modal-content {
        width: 95vw;
        max-height: 95vh;
        margin: 2.5vh auto;
    }
    
    #admin-settings-modal .modal-body {
        max-height: calc(95vh - 120px);
        padding: 15px 20px;
    }
    
    #admin-settings-modal .modal-header {
        padding: 15px 20px 10px 20px;
    }
    
    #admin-settings-modal .modal-footer {
        padding: 10px 20px 15px 20px;
    }
    
    /* 수동 대진표 생성 모달 모바일 최적화 */
    #manual-match-create-modal .modal-content {
        width: 95vw;
        max-height: 95vh;
        margin: 2.5vh auto;
        padding: 0;
    }
    
    #manual-match-create-modal .modal-body {
        max-height: calc(95vh - 120px);
        padding: 15px;
        overflow-y: auto;
    }
    
    /* 플레이어 목록 컨테이너 모바일 최적화 */
    #player-list-container {
        max-height: 300px !important;
        padding: 8px !important;
    }
    
    /* 플레이어 아이템 모바일 최적화 */
    #player-list-container .player-item {
        padding: 6px !important;
        font-size: 0.9rem !important;
    }
    
    /* 팀 플레이어 컨테이너 모바일 최적화 */
    #team-a-players,
    #team-b-players {
        min-height: 200px !important;
        max-height: 300px !important;
        padding: 8px !important;
    }
}

/* 새로운 메인 컨테이너 - 모바일 기준 */
.main-container {
    min-height: 100vh;
    background: #fff;
    padding-top: 10px; /* 여백 10px */
    width: 100%;
    max-width: 100%; /* 전체 너비 사용 */
    margin: 0; /* 여백 제거 */
    padding-bottom: 16px; /* 여백 최소화 */
}

@media (max-width: 480px) {
    .main-container {
        padding-top: 10px !important; /* 여백 10px */
    }
    
    /* 네비게이션 바 높이 확인 및 여백 확보 */
    .navbar {
        margin-bottom: 0 !important;
    }
    
    .nav-container {
        margin: 8px auto !important;
        height: 60px !important;
    }
}

/* 모바일 네비게이션 탭 - 모든 화면에서 표시 */
.mobile-nav-tabs {
    display: flex; /* 모든 화면에서 표시 */
    position: fixed; /* 하단 고정 탭바 */
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: 100%;
    max-width: 400px;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 14px 0;
    min-height: 90px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06); /* 상단 방향 그림자 */
}

/* Spacer under fixed mobile tabs so content starts below tabs */
.mobile-nav-tabs-spacer { height: 0; display: none; }

.mobile-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-tab-btn.active {
    color: #dc2626;
}

.mobile-tab-btn i {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

/* 데스크톱 네비게이션 탭 - 숨김 */
.desktop-nav-tabs {
    display: none !important; /* 모바일 탭만 사용 */
}

.desktop-tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.desktop-tab-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.desktop-tab-btn.active {
    background: rgba(255,255,255,0.9);
    color: #dc2626;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 탭 컨텐츠 */
.tab-contents {
    padding: 40px 4px 140px 4px; /* 상단 여백 증가 (8px -> 40px) */
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
}

/* PC에서도 모바일처럼 가운데 고정 폭으로 보이도록 강제 제한 */
.tab-contents {
    max-width: 100%;
    margin: 0;
    padding: 40px 4px 140px 4px; /* 상단 여백 증가 (8px -> 40px) */
    width: 100%;
    box-sizing: border-box;
}

.reservations-container,
.records-container {
    max-width: 100%;
    margin: 0;
    padding: 0 4px 140px 4px; /* 예약, 대진표 탭 수준의 여백 */
    width: 100%;
    box-sizing: border-box;
}

.stats-container,
.rankings-container,
.matches-container {
    max-width: 100%;
    margin: 0;
    padding: 0 8px 140px 8px; /* 좌우 여백 증가로 잘림 방지 */
    width: 100%;
    box-sizing: border-box;
    overflow-x: visible !important; /* 가로 스크롤 방지 */
    overflow-y: visible !important; /* 세로 스크롤 허용 */
}

/* CI 배너 제거 후 상단 여백 추가 */
.reservations-container > .reservations-board:first-child,
.matches-container > .section-header:first-child,
.rankings-container > .medal-ceremony-section:first-child,
.stats-container > .game-stats-section:first-child,
.records-container > .stats-section-header:first-child,
.tournament-container > .tournament-reservation-section:first-child,
.tournament-container > .tournament-active-section:first-child {
    margin-top: 40px; /* 기본 여백 (PC용) */
}

/* 모바일에서 여백 추가 증가 */
@media (max-width: 768px) {
    /* 모바일에서 첫 번째 섹션의 margin-top 제거 (padding-top만 사용) */
    .reservations-container > .reservations-board:first-child,
    .matches-container > .section-header:first-child,
    .rankings-container > .medal-ceremony-section:first-child,
    .stats-container > .game-stats-section:first-child,
    .records-container > .stats-section-header:first-child,
    .tournament-container > .tournament-reservation-section:first-child,
    .tournament-container > .tournament-active-section:first-child {
        margin-top: 0 !important; /* padding-top만 사용하도록 margin 제거 */
    }
    
    /* 모바일에서 컨테이너 상단 여백만 사용 */
    .reservations-container,
    .records-container {
        padding: 25px 4px 140px 4px !important; /* 모바일 상단 여백 25px */
    }
    
    .stats-container,
    .rankings-container,
    .matches-container {
        padding: 25px 8px 140px 8px !important; /* 모바일 상단 여백 25px */
    }
}

/* 기간 선택 버튼 (기록탭 - 통계탭 스타일로 변경) */
.period-filter-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.period-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-btn:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.period-btn.active {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

/* 기록탭 기간 선택 버튼 - 통계탭 스타일 적용 */
.records-container .stats-period-filter-container {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.records-container .stats-period-filter-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.records-container .stats-period-btn {
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    text-align: center;
    box-sizing: border-box;
    min-width: 0;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.records-container .stats-period-btn:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.records-container .stats-period-btn.active {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* 커스텀 기간 선택 */
.custom-period-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.period-select-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.custom-period-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.date-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: #dc2626;
}

.date-separator {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* 기록 버튼 (초록색으로 변경하여 가시성 향상) */
#export-custom-period {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
    transition: all 0.3s ease !important;
}

#export-custom-period:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea881 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.5) !important;
}

#export-custom-period:active {
    transform: translateY(0) !important;
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.4) !important;
}

/* 내보내기 버튼 섹션 */
.export-all-section {
    margin-bottom: 20px;
}

/* 기록 카드 리스트 */
.records-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

/* 기록 카드 */
.record-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #333;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.record-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.record-date-time {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
}

.record-date {
    font-size: 14px !important;
    color: #666 !important;
    font-weight: 500 !important;
    width: 100% !important;
    display: block !important;
    line-height: 1.4 !important;
}

.record-time {
    font-size: 13px !important;
    color: #888 !important;
    font-weight: 400 !important;
    width: 100% !important;
    display: block !important;
    line-height: 1.4 !important;
    margin-top: 2px !important; /* 날짜와 시간 사이 간격 */
}

.record-delete-btn {
    background: transparent;
    border: none;
    color: #ff6b6b;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.record-delete-btn:hover {
    background: #ffe0e0;
}

/* 기록 팀 정보 */
.record-teams {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-team {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.team-a-icon {
    background: #4a90e2;
}

.team-b-icon {
    background: #9b59b6;
}

.team-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.team-score {
    font-size: 18px;
    font-weight: 700;
}

.score-a {
    color: #27ae60;
}

.score-b {
    color: #e74c3c;
}

/* 삭제 버튼 섹션 */
.delete-all-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.rankings-container {
    padding: 0 4px 140px 4px; /* 예약, 대진표 탭 수준의 여백 */
    max-width: 100%;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 올림픽 메달 시상식 섹션 */
.medal-ceremony-section {
    margin-bottom: 40px;
}

.medal-ceremony-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.medal-ceremony-header i {
    color: #ffd700;
    font-size: 1.2rem;
}

.medal-ceremony-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.medal-ceremony-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.podium-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 13px; /* 20px * 2/3 */
    padding: 20px 13px; /* 30px 20px * 2/3 */
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
    border-radius: 20px;
    min-height: 233px; /* 350px * 2/3 */
    position: relative;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.podium-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 13px; /* 24px 20px * 2/3 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px; /* 16px * 2/3 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.podium-card:hover {
    transform: translateY(-4px);
}

.podium-card.first-place {
    background: linear-gradient(180deg, #ffeb3b 0%, #ffc107 100%);
    width: 133px; /* 200px * 2/3 */
    min-width: 120px; /* 180px * 2/3 */
    height: 213px; /* 320px * 2/3 - PC 기본값, 모바일에서 덮어씀 */
    order: 2;
}

.podium-card.second-place {
    background: #e0e0e0;
    width: 120px; /* 180px * 2/3 */
    min-width: 107px; /* 160px * 2/3 */
    height: 187px; /* 280px * 2/3 - PC 기본값, 모바일에서 덮어씀 */
    order: 1;
}

.podium-card.third-place {
    background: linear-gradient(180deg, #d4a574 0%, #cd7f32 100%);
    width: 120px; /* 180px * 2/3 */
    min-width: 107px; /* 160px * 2/3 */
    height: 160px; /* 240px * 2/3 - PC 기본값, 모바일에서 덮어씀 */
    order: 3;
}

.medal-icon {
    position: relative;
    font-size: 2.33rem; /* 3.5rem * 2/3 */
    margin-bottom: 8px; /* 12px * 2/3 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.medal-icon i {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.medal-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.93rem; /* 1.4rem * 2/3 */
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.podium-name {
    font-size: 0.87rem; /* 1.3rem * 2/3 */
    font-weight: 700;
    color: #000;
    text-align: center;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    padding: 0 5px; /* 8px * 2/3 */
    box-sizing: border-box;
    display: block;
    word-break: keep-all;
    line-height: 1.3;
    margin-top: 5px; /* 8px * 2/3 */
}

.podium-card.first-place .podium-name {
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.podium-card.second-place .podium-name {
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.podium-card.third-place .podium-name {
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.podium-score {
    font-size: 0.67rem; /* 1rem * 2/3 */
    color: #000;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    padding: 0 5px; /* 8px * 2/3 */
    margin-top: 3px; /* 4px * 2/3 */
    line-height: 1.4;
}

.podium-card.first-place .podium-score {
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.podium-card.second-place .podium-score {
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.podium-card.third-place .podium-score {
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

/* 계급 시스템 섹션 */
.rank-system-section {
    margin-bottom: 40px;
}

.rank-system-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rank-system-header i {
    color: #dc2626;
    font-size: 1.2rem;
}

.rank-system-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.rank-system-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.rank-tiers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-tier-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.rank-tier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s ease;
}

.rank-tier-card:hover::before {
    left: 100%;
}

.rank-tier-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(220, 38, 38, 0.3);
}

.rank-tier-card.goat-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border: 2px solid #ffd700;
}

.rank-tier-card.legend-card {
    background: linear-gradient(135deg, #fffef0 0%, #fffce8 100%);
    border: 2px solid #ffd700;
}

.rank-tier-card.master-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px solid #c0c0c0;
}

.rank-tier-card.champion-card {
    background: linear-gradient(135deg, #fff8f0 0%, #ffe8d6 100%);
    border: 2px solid #cd7f32;
}

.rank-tier-card.pro-card {
    background: linear-gradient(135deg, #fffef0 0%, #fffce8 100%);
    border: 2px solid #ffd700;
}

.rank-tier-card.player-card {
    background: linear-gradient(135deg, #fff0f8 0%, #ffe0f0 100%);
    border: 2px solid #ff69b4;
}

.rank-tier-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.rank-tier-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.rank-tier-card:hover .rank-tier-icon::before {
    opacity: 1;
    animation: shine 1.5s ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.beginner-icon {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 2px solid #66bb6a;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
}

.beginner-icon i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.player-icon {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.player-icon i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.pro-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #333;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

.pro-icon i {
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.8));
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.8));
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 1));
    }
}

.champion-icon {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    box-shadow: 0 6px 25px rgba(205, 127, 50, 0.5), inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.champion-icon i {
    color: #ffd700;
    font-size: 2.2rem;
    filter: drop-shadow(0 3px 8px rgba(255, 215, 0, 0.6));
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.master-icon {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
    box-shadow: 0 6px 25px rgba(192, 192, 192, 0.5), inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.master-icon i {
    color: #ffffff;
    font-size: 2.2rem;
    filter: drop-shadow(0 3px 8px rgba(255, 255, 255, 0.6));
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.legend-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ff8c00 100%);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6), inset 0 2px 10px rgba(255, 255, 255, 0.4);
}

.legend-icon i {
    color: #fff;
    font-size: 2.4rem;
    filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.8));
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.8));
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
    to {
        filter: drop-shadow(0 6px 20px rgba(255, 215, 0, 1));
        text-shadow: 0 0 25px rgba(255, 255, 255, 1);
    }
}

.goat-icon {
    background: linear-gradient(135deg, #991b1b 0%, #ffd700 50%, #991b1b 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    box-shadow: 0 10px 40px rgba(153, 27, 27, 0.6), 0 0 30px rgba(255, 215, 0, 0.5), inset 0 2px 15px rgba(255, 255, 255, 0.4);
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.goat-icon i {
    color: #fff;
    font-size: 2.6rem;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 1));
    text-shadow: 0 0 20px rgba(255, 255, 255, 1);
    animation: goat-glow 2s ease-in-out infinite alternate, rotate-glow 4s linear infinite;
}

@keyframes goat-glow {
    from {
        filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 1));
        text-shadow: 0 0 20px rgba(255, 255, 255, 1);
    }
    to {
        filter: drop-shadow(0 8px 25px rgba(255, 215, 0, 1.2));
        text-shadow: 0 0 35px rgba(255, 255, 255, 1.2);
    }
}

@keyframes rotate-glow {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-2deg);
    }
    75% {
        transform: rotate(2deg);
    }
}

.rank-tier-info {
    flex: 1;
}

.rank-tier-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
}

.rank-tier-range {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

/* 최고 성과자 섹션 */
.top-performers-section {
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding-right: 0;
    max-width: 100%;
}

.top-performers-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
}

.top-performers-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.performers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #333;
    padding: 12px;
    padding-right: 16px;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.performer-item {
    background: #fff;
    border: 1px solid #333 !important;
    border-radius: 8px;
    padding: 12px 16px;
    padding-right: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s ease;
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
    margin: 0;
    max-width: 100%;
}

.performer-item:hover {
    background: #f8f8f8;
}

.performer-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    width: 30px;
    flex-shrink: 0;
}

.performer-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-right: 12px; /* 아이콘과 이름 사이 간격 넓히기 */
}

.performer-name {
    flex: 0 0 auto;
    font-size: 1rem;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 60px;
    max-width: 120px;
    margin-right: 4px; /* 이름과 점수 사이 간격 좁히기 */
}

.performer-score {
    font-size: 0.95rem;
    color: #000;
    width: 65px;
    text-align: right;
    flex-shrink: 0;
    font-weight: 600;
    margin-left: 0; /* 이름과 점수 사이 간격 좁히기 */
}

.performer-winrate {
    font-size: 0.9rem;
    color: #000;
    width: 65px;
    text-align: right;
    flex-shrink: 0;
    font-weight: 600;
    overflow: visible;
    white-space: nowrap;
    margin-left: 4px;
}

.performer-record {
    font-size: 0.9rem;
    color: #000;
    width: 70px;
    text-align: right;
    flex-shrink: 0;
    font-weight: 600;
    overflow: visible;
    white-space: nowrap;
    margin-left: 4px;
}

.stats-container {
    max-width: 100%;
    margin: 0;
    padding: 0 4px 140px 4px; /* 예약, 대진표 탭 수준의 여백 */
    width: 100%;
    box-sizing: border-box;
}

/* 경기 통계 섹션 */
.game-stats-section {
    margin-bottom: 40px;
}

.stats-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stats-section-header i {
    color: #333;
    font-size: 1.2rem;
}

.stats-section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

/* 기간 선택 필터 컨테이너 */
.stats-period-filter-container {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.stats-period-filter-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.stats-period-btn {
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    text-align: center;
    box-sizing: border-box;
    min-width: 0;
    height: 38px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-period-btn:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.stats-period-btn.active {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* 개인 성장 분석 */
.personal-growth-section {
    margin-bottom: 40px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.growth-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.growth-section-header i {
    color: #dc2626;
    font-size: 1.1rem;
}

.growth-section-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.growth-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.growth-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    color: #333;
    cursor: pointer;
    flex: 1;
    max-width: 200px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.growth-select:focus {
    outline: none;
    border-color: #dc2626;
}

.win-rate-chart-container {
    margin-top: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chart-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}

.chart-title-wrapper i {
    color: #dc2626;
    font-size: 0.9rem;
}

.win-rate-chart-container h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.chart-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 16px;
    height: 3px;
    background: #dc2626;
    border-radius: 2px;
}

.legend-text {
    font-size: 0.9rem;
    color: #666;
}

#win-rate-chart {
    width: 100%;
    height: 220px;
    flex: 1;
    min-height: 200px;
}

/* 통계 카드 */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-radius: 16px;
    border: 1px solid #333;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.stat-icon {
    font-size: 2rem;
    color: #fff;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* 개인별 성과 섹션 */
.individual-performance-section {
    margin-bottom: 40px;
}

.performance-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.performance-header i {
    color: #ffd700;
    font-size: 1.2rem;
}

.performance-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.performance-charts {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.performance-chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 240px;
    max-height: 260px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex: 1;
    max-width: 50%;
}

.performance-chart-header {
    margin-bottom: 10px;
}

.performance-chart-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

#win-rate-donut-chart,
#participation-bar-chart {
    width: 100%;
    height: 200px;
    flex: 1;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 180px;
}

.performance-chart-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

#win-rate-donut-chart,
#participation-bar-chart {
    width: 100%;
    height: 300px;
    max-height: 400px;
}

/* 팀별 분석 섹션 */
.team-analysis-section {
    margin-bottom: 40px;
}

.team-analysis-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.team-analysis-header i {
    color: #dc2626;
    font-size: 1.2rem;
}

.team-analysis-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.team-charts {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

.team-chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
}

.team-chart-card canvas {
    max-width: 100%;
    box-sizing: border-box;
}

.team-chart-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.team-chart-header i {
    font-size: 1.1rem;
}

.team-chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

#strongest-teams-chart,
#weakest-teams-chart {
    width: 100%;
    height: 300px;
    max-height: 400px;
    flex: 1;
    max-width: 100%;
    box-sizing: border-box;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .game-stats-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-period-filter-container {
        padding: 6px;
    }
    
    .stats-period-filter-buttons {
        gap: 6px;
        flex-wrap: nowrap !important; /* 한 줄로 표시 */
    }
    
    .stats-period-btn {
        padding: 8px 10px !important; /* 패딩 줄여서 한 줄에 맞춤 */
        font-size: 0.8rem !important; /* 폰트 크기 약간 줄임 */
        font-weight: 500 !important;
        flex: 1 !important; /* 균등하게 분배 */
        min-width: 0 !important; /* 최소 너비 제한 제거 */
        white-space: nowrap !important; /* 텍스트 줄바꿈 방지 */
        text-align: center !important;
        box-sizing: border-box !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 기록탭 버튼도 통계탭과 동일하게 */
    .records-container .stats-period-btn {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
        flex: 1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
        box-sizing: border-box !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .performance-charts {
        flex-direction: column;
        gap: 15px;
    }
    
    .performance-chart-card {
        max-width: 100%;
        min-height: 250px;
    }
    
    .team-charts {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #win-rate-chart,
    #win-rate-donut-chart,
    #participation-bar-chart,
    #strongest-teams-chart,
    #weakest-teams-chart {
        height: 300px;
    }
    
    .team-chart-card {
        min-height: 350px;
        padding: 15px;
    }
    
    .team-charts {
        grid-template-columns: 1fr;
        padding-right: 0;
    }
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px; /* 여백 최소화 (25px -> 8px) */
    padding: 15px 20px; /* 패딩 축소 */
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1; /* CI1 배너보다 낮은 z-index */
}

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.section-header h2 i {
    color: #dc2626;
}

/* 예약 폼 섹션 - 제거됨 */

/* 예약 현황판 (기차표 스타일) - 모든 화면 모바일 기준 */
.reservations-board {
    background: rgba(255,255,255,0.75);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    border-radius: 14px; /* iOS 느낌의 둥근 모서리 */
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin: 0; /* 좌우 여백 제거 */
    width: 100%;
    overflow: visible;
}

/* 선택된 정보 카드 */
.selected-info {
    padding: 20px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    margin-bottom: 0;
}

.info-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.info-item i {
    font-size: 1.2rem;
    opacity: 0.9;
}

.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.date-navigation span {
    font-weight: 700; /* 더 굵게 */
    color: #000000 !important; /* 검은색으로 변경 */
    min-width: 100px;
    text-align: center;
    background: rgba(153, 27, 27, 0.1); /* 배경색 추가로 강조 */
    padding: 4px 12px; /* 패딩 추가 */
    border-radius: 8px; /* 둥근 모서리 */
    font-size: 0.95rem; /* 약간 더 크게 */
}

/* 날짜 표시 텍스트 강제 검은색 */
#current-date-display,
#matches-current-date-display,
#match-date-time,
.date-navigation #current-date-display,
.date-navigation #matches-current-date-display,
.date-navigation span#current-date-display,
.date-navigation span#matches-current-date-display,
span#current-date-display,
span#matches-current-date-display,
.match-info,
.match-info span {
    color: #000000 !important;
    color: black !important;
}

.today-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #c44569 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
}

.today-emoji {
    display: none; /* 이모티콘 제거됨 */
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 40px; /* Today 배지를 위한 공간 확보 */
    gap: 12px;
}

.section-header h2 {
    width: 100%;
    text-align: center;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-header > .today-badge {
    position: absolute;
    top: 8px;
    left: 12px;
    z-index: 10;
}

/* 모바일에서 Today와 제목을 같은 줄에 배치하기 위한 래퍼 */
@media (max-width: 480px) {
    .section-header > h2 {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        margin: 0 !important;
    }
}

.date-navigation button {
    background: #4a5568; /* 어두운 회색으로 변경하여 날짜 텍스트와 구분 */
    border: 2px solid #4a5568;
    color: white;
    min-width: 36px;
    height: 36px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 그림자 추가 */
}

/* 테스트 버튼 컨테이너 */
.test-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.test-time-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    padding: 8px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.test-time-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 2px;
}

.test-time-buttons {
    display: flex;
    gap: 4px;
}

.test-time-buttons .btn {
    font-size: 0.7rem;
    padding: 4px 8px;
    height: 28px;
    min-width: 60px;
}

.date-navigation button:hover {
    background: #2d3748; /* 호버 시 더 어둡게 */
    border-color: #2d3748;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); /* 호버 시 그림자 강화 */
}

.date-navigation button i { font-size: 16px; }

.reservations-timeline {
    padding: 20px;
    overflow: visible;
}

/* 랭킹 필터 */
.ranking-filters, .stats-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid #dc2626;
    border-radius: 20px;
    color: #dc2626;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: #dc2626;
    color: white;
}

/* 관리자 통계 그리드 */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: rgba(255,255,255,0.9);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-stat-card .stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.admin-stat-card .stat-content {
    flex: 1;
}

.admin-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.admin-stat-card .stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 모든 화면에서 모바일 스타일 적용 - 반응형 제거 */
    
    .reservations-board {
        margin: 0; /* 좌우 여백 완전 제거 */
        width: 100%;
    }
    
    .tab-contents {
        padding: 25px 4px 60px 4px !important; /* 모바일에서 여백 25px */
    }
    .reservations-container,
    .records-container {
        padding: 0 4px 140px 4px !important; /* 예약, 대진표 탭 수준의 여백 */
    }
    
/* 태블릿 사이즈 (768px ~ 2000px) - Lenovo P11 등 대형 태블릿 지원 */
@media (min-width: 769px) and (max-width: 2000px) {
    /* CI 배너 태블릿 스타일 */
    .reservations-container > .ci-banner,
    .matches-container > .ci-banner,
    .rankings-container > .ci-banner,
    .stats-container > .ci-banner,
    .records-container > .ci-banner,
    .reservations-board .ci-banner,
    .matches-container .ci-banner,
    .rankings-container .ci-banner,
    .stats-container .ci-banner,
    .records-container .ci-banner {
        padding: 10px 20px !important;
        max-width: 100% !important;
        position: relative !important;
        z-index: 100 !important; /* 태블릿에서 겹침 방지 - 높은 z-index */
        overflow: visible !important; /* 이미지가 잘리지 않도록 */
    }
    
    .ci-banner-img {
        max-width: 65% !important;
        width: 65% !important;
        height: auto !important;
        position: relative !important;
        z-index: 100 !important; /* 다른 요소들 위에 표시 */
    }
    
    /* 네비게이션 바 전체 스타일 */
    .navbar {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
    }
    
    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        max-width: 100vw !important; /* 뷰포트 전체 너비 사용 */
        width: 100vw !important; /* 뷰포트 전체 너비 */
        min-width: 100vw !important; /* 최소 너비도 뷰포트 전체 */
        margin: 0 !important; /* 모든 마진 완전 제거 */
        padding: 0 8px !important; /* 패딩 최소화 */
        height: 60px !important;
        border-radius: 0 !important; /* 모서리 둥글기 제거 */
        box-sizing: border-box !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .main-container {
        max-width: 1200px; /* 태블릿 사이즈에 맞게 조정 (Lenovo P11: 2000x1200) */
        width: 100%;
        margin: 0 auto;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 10px !important; /* 여백 10px */
        margin-top: 0 !important; /* 상단 마진 제거 */
        box-sizing: border-box;
    }
    
    /* 태블릿에서 데스크톱 탭이 있던 공간의 여백 제거 */
    .desktop-nav-tabs {
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }
    
    .tab-contents {
        padding: 40px 15px 120px 15px !important; /* 상단 여백 증가 (20px -> 40px) */
        max-width: 1200px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .reservations-container,
    .records-container,
    .stats-container,
    .rankings-container,
    .matches-container {
        max-width: 1200px !important; /* 태블릿 사이즈에 맞게 조정 */
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 15px 120px 15px !important; /* 하단 탭바를 위한 여백 확보 */
        box-sizing: border-box !important;
    }
    
    .reservations-board {
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
    }
    
    .section-header {
        padding: 15px 20px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .reservations-timeline {
        padding: 15px !important;
        box-sizing: border-box !important;
    }
    
    /* 태블릿에서 네비게이션 바 전체 너비 조정 */
    .navbar {
        width: 100% !important;
    }
    
    /* 태블릿에서 메뉴바를 화면 끝까지 완전히 확장 - 중복 제거됨 (위에서 이미 설정) */
    
    /* 태블릿에서 navbar의 패딩도 제거하여 완전히 끝까지 나오도록 */
    .navbar {
        padding: 0 !important;
        margin: 0 !important;
        width: 100vw !important; /* 뷰포트 전체 너비 */
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* 태블릿에서 햄버거 버튼 표시 */
    .hamburger,
    #hamburger,
    .navbar .hamburger {
        display: flex !important; /* 햄버거 버튼 표시 */
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        pointer-events: auto !important;
    }
    
    /* 태블릿에서 메뉴는 기본적으로 숨김, active일 때만 표시 - 팝업 스타일 제거 */
    .nav-menu,
    #nav-menu {
        display: none !important; /* 기본적으로 숨김 */
        position: fixed !important;
        top: 70px !important;
        flex-direction: column !important;
        background-color: rgba(220, 38, 38, 0.95) !important;
        width: 100% !important;
        max-width: 480px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        text-align: center !important;
        transition: 0.3s !important;
        padding: 20px 0 !important;
        backdrop-filter: blur(10px) !important;
        z-index: 3000 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        border-radius: 12px !important;
    }
    
    /* 태블릿에서 메뉴가 active일 때만 표시 */
    .nav-menu.active,
    #nav-menu.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 태블릿에서 로고 영역 - 원래 크기로 복원 */
    .nav-logo {
        max-width: calc(100% - 80px) !important; /* 원래대로 복원 */
        min-width: 0 !important; /* 원래대로 복원 */
        width: auto !important;
        flex: 0 1 auto !important; /* 원래대로 복원 */
        flex-shrink: 1 !important; /* 원래대로 복원 */
        flex-grow: 0 !important;
        overflow: hidden !important; /* 원래대로 복원 */
        font-size: 1rem !important; /* 원래 크기로 복원 */
        gap: 4px !important; /* 원래 간격으로 복원 */
        white-space: nowrap !important;
    }
    
    .nav-logo i {
        font-size: 1.2rem !important; /* 원래 크기로 복원 */
        margin-right: 6px !important; /* 원래 간격으로 복원 */
        flex-shrink: 0 !important;
    }
    
    .version-badge {
        font-size: 0.75rem !important; /* 원래 크기로 복원 */
        padding: 2px 6px !important; /* 원래 패딩으로 복원 */
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        margin-left: 8px !important; /* 원래 마진으로 복원 */
    }
    
    /* 태블릿에서 nav-container의 flex 속성 조정 */
    .nav-container {
        justify-content: space-between !important; /* 원래대로 복원 */
        gap: 15px !important; /* 원래 간격으로 복원 */
        align-items: center !important;
    }
    
    .user-menu {
        flex-direction: row !important; /* 태블릿에서는 가로 배치 */
        gap: 12px;
    }
    
    .user-info {
        font-size: 0.9rem;
    }
    
    .user-name {
        font-size: 0.9rem;
    }
    
    .user-actions {
        gap: 8px;
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* 태블릿에서 모바일 탭 표시 */
    .mobile-nav-tabs {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 2000 !important;
        width: 100% !important;
        max-width: 1200px !important; /* 본문과 같은 너비 */
        background: white !important;
        border-top: 1px solid #e9ecef !important;
        padding: 14px 0 !important;
        min-height: 90px !important;
        border-top-left-radius: 12px !important;
        border-top-right-radius: 12px !important;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06) !important;
        box-sizing: border-box !important;
    }
    
    .mobile-nav-tabs-spacer {
        display: block !important;
        height: 90px !important; /* 탭 높이만큼 여백 확보 */
    }
    
    /* 태블릿에서 데스크톱 탭 완전히 숨기기 - 모든 선택자 포함 */
    .main-container .desktop-nav-tabs,
    .main-container > .desktop-nav-tabs,
    .desktop-nav-tabs,
    .desktop-nav-tabs *,
    div.desktop-nav-tabs,
    .main-container div.desktop-nav-tabs {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        max-height: 0 !important;
        max-width: 0 !important;
        min-height: 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        z-index: -1 !important;
    }
    
    .desktop-tab-btn,
    button.desktop-tab-btn,
    .desktop-nav-tabs .desktop-tab-btn,
    .desktop-nav-tabs button {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .desktop-tab-btn:hover,
    .desktop-tab-btn.active,
    .desktop-tab-btn:focus,
    .desktop-tab-btn:active {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* 태블릿에서 메달 시상식 크기 조정 */
    .podium-wrapper {
        gap: 15px !important;
        padding: 20px 15px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .podium-card.first-place {
        width: 140px !important;
        min-width: 130px !important;
        height: 240px !important;
    }
    
    .podium-card.second-place {
        width: 130px !important;
        min-width: 120px !important;
        height: 210px !important;
    }
    
    .podium-card.third-place {
        width: 130px !important;
        min-width: 120px !important;
        height: 180px !important;
    }
    
    .podium-card {
        padding: 16px 12px !important;
        gap: 12px !important;
    }
    
    .medal-icon {
        font-size: 3rem !important;
    }
    
    .medal-number {
        font-size: 1.3rem !important;
    }
    
    .podium-name {
        font-size: 1.1rem !important;
    }
    
    .podium-score {
        font-size: 0.9rem !important;
    }
    
    /* 태블릿에서 통계탭과 기록탭 기간 선택 버튼 스타일 */
    .stats-period-filter-container {
        padding: 10px !important;
    }
    
    .stats-period-filter-buttons {
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }
    
    .stats-period-btn {
        padding: 12px 18px !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        flex: 1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
        box-sizing: border-box !important;
        height: 42px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .records-container .stats-period-filter-container {
        padding: 10px !important;
    }
    
    .records-container .stats-period-filter-buttons {
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }
    
    .records-container .stats-period-btn {
        padding: 12px 18px !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        flex: 1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
        box-sizing: border-box !important;
        height: 42px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 태블릿에서 섹션 헤더 크기 조정 */
    .section-header {
        padding: 20px 25px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    /* 태블릿에서 타임라인 아이템 크기 조정 */
    .timeline-item {
        padding: 14px 16px;
        margin-bottom: 10px;
    }
    
    .timeline-time {
        min-width: 100px;
        font-size: 1rem;
    }
    
    .player-item {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    /* 태블릿에서 버튼 크기 조정 */
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .timeline-reserve-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* 태블릿에서 예약 타임라인 크기 조정 */
    .reservations-timeline {
        padding: 25px;
    }
    
    /* 태블릿에서 대진표 스타일 조정 */
    .match-schedule-section {
        padding: 20px;
        margin-top: 20px;
    }
    
    .time-slot-matches {
        margin-bottom: 25px;
        border-radius: 16px;
    }
    
    .time-slot-header {
        padding: 14px 18px;
    }
    
    .time-slot-title {
        font-size: 1.1rem;
        gap: 10px;
    }
    
    .time-slot-content {
        padding: 20px;
    }
    
    /* 태블릿에서 플레이어 그리드 조정 */
    .timeline-players {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
    }
    
    .player-item {
        min-height: 42px !important;
        padding: 8px 12px !important;
    }
    
    /* 태블릿에서 랭킹 시스템 조정 */
    .rank-tier-card {
        padding: 20px;
    }
    
    .rank-tier-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .rank-tier-name {
        font-size: 1.1rem;
    }
    
    .rank-tier-range {
        font-size: 0.95rem;
    }
    
    /* 태블릿에서 통계 차트 크기 조정 */
    .win-rate-chart-container {
        padding: 20px;
    }
    
    .team-chart-card {
        padding: 20px;
    }
    
    /* 태블릿에서 모달 크기 조정 */
    .modal-content {
        max-width: 600px;
        margin: 5% auto;
    }
}

/* PC 사이즈 (1025px 이상) - 모바일 사이즈로 제한 */
@media (min-width: 1025px) {
    .main-container {
        max-width: 480px; /* 모바일 사이즈로 제한 */
        width: 100%;
        margin: 0 auto; /* 중앙 정렬 */
        padding-left: 0;
        padding-right: 0;
    }
    
    .tab-contents {
        padding: 40px 4px 140px 4px !important; /* 상단 여백 증가 (8px -> 40px) */
    }
    
    .reservations-container,
    .records-container,
    .stats-container,
    .rankings-container,
    .matches-container {
        max-width: 480px; /* 모바일 사이즈로 제한 */
        width: 100%;
        margin: 0 auto; /* 중앙 정렬 */
        padding: 0 2px 140px 2px; /* 모바일과 동일한 여백 */
        box-sizing: border-box;
    }
    
    .reservations-board {
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* PC에서 메뉴바를 본문 컨텐츠와 같은 너비로 제한 - 태블릿 스타일 오버라이드 */
    .nav-container {
        max-width: 480px !important; /* 본문과 같은 너비로 제한 */
        width: 100% !important; /* 태블릿의 100vw 오버라이드 */
        min-width: auto !important; /* 태블릿의 min-width: 100vw 오버라이드 */
        margin: 0 auto !important; /* 본문과 동일한 마진으로 정렬 */
        padding: 0 12px !important; /* 태블릿의 padding: 0 8px 오버라이드 */
        height: 60px !important; /* PC에서도 높이 고정 */
        border-radius: 12px !important; /* 태블릿의 border-radius: 0 오버라이드 */
        box-sizing: border-box !important;
        position: relative !important;
        left: auto !important; /* 태블릿의 left: 0 오버라이드 */
        right: auto !important; /* 태블릿의 right: 0 오버라이드 */
    }
    
    /* PC에서 navbar도 본문과 맞춤 */
    .navbar {
        width: 100% !important;
    }
    
    /* PC에서 메뉴바 상단 여백은 padding-top으로 처리 */
    .main-container {
        padding-top: 0px !important; /* PC에서 여백 제거 */
    }
    
    /* PC에서 CI 배너 상단 여백 줄이기 */
    .ci-banner,
    .reservations-container > .ci-banner,
    .matches-container > .ci-banner,
    .rankings-container > .ci-banner,
    .stats-container > .ci-banner,
    .records-container > .ci-banner {
        display: flex !important; /* PC에서도 표시되도록 명시 */
        margin-top: 0px !important; /* PC에서 70px -> 10px로 줄임 */
        padding: 10px 15px !important;
        position: relative !important;
        z-index: 100 !important;
        overflow: visible !important; /* 이미지가 잘리지 않도록 */
    }
    
    /* PC에서 CI 배너 이미지가 보이도록 설정 */
    .ci-banner-img {
        display: block !important; /* PC에서 이미지가 보이도록 명시 */
        visibility: visible !important;
        opacity: 1 !important;
        max-width: 50% !important;
        width: 50% !important;
        height: auto !important;
        position: relative !important;
        z-index: 100 !important;
    }
    
    /* PC에서 메달 시상식 크기 조정 (2/3 크기 유지하되 gap과 padding 줄임) */
    .podium-wrapper {
        gap: 8px !important; /* 13px에서 더 줄임 */
        padding: 15px 8px !important; /* 20px 13px에서 더 줄임 */
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .podium-card.first-place {
        width: 110px !important; /* 133px에서 더 줄임 */
        min-width: 100px !important; /* 120px에서 더 줄임 */
        height: 213px !important; /* PC에서는 기본 높이 유지 */
    }
    
    .podium-card.second-place {
        width: 100px !important; /* 120px에서 더 줄임 */
        min-width: 90px !important; /* 107px에서 더 줄임 */
        height: 187px !important; /* PC에서는 기본 높이 유지 */
    }
    
    .podium-card.third-place {
        width: 100px !important; /* 120px에서 더 줄임 */
        min-width: 90px !important; /* 107px에서 더 줄임 */
        height: 160px !important; /* PC에서는 기본 높이 유지 */
    }
    
    .podium-card {
        padding: 12px 8px !important; /* 16px 13px에서 더 줄임 */
        gap: 8px !important; /* 11px에서 더 줄임 */
    }
    
    /* PC에서 메달 시상식 글씨 크기 조금 더 키우기 */
    .medal-icon {
        font-size: 2.5rem !important; /* 2.33rem에서 증가 */
    }
    
    .medal-number {
        font-size: 1.1rem !important; /* 0.93rem에서 증가 */
    }
    
    .podium-name {
        font-size: 1rem !important; /* 0.87rem에서 증가 */
    }
    
    .podium-score {
        font-size: 0.8rem !important; /* 0.67rem에서 증가 */
    }
    
    /* PC에서 하단 탭 크기 조정 (컨테이너 너비에 맞춤) */
    .mobile-nav-tabs {
        max-width: 480px !important; /* 400px에서 480px로 증가 */
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* PC에서 통계탭과 기록탭 기간 선택 버튼 스타일 동일하게 */
    .stats-period-filter-container {
        padding: 6px !important;
    }
    
    .stats-period-filter-buttons {
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }
    
    .stats-period-btn {
        padding: 10px 16px !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        flex: 1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
        box-sizing: border-box !important;
        height: 38px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .records-container .stats-period-filter-container {
        padding: 6px !important;
    }
    
    .records-container .stats-period-filter-buttons {
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }
    
    .records-container .stats-period-btn {
        padding: 10px 16px !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        flex: 1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
        box-sizing: border-box !important;
        height: 38px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}
    
    /* 기록 탭 하단 여백 확보 (삭제 버튼이 탭바에 가려지지 않도록) */
    .records-container {
        padding-bottom: 100px !important; /* 하단 탭바 높이 + 여유 공간 */
    }
    
/* 모든 화면에서 모바일 컴팩트 UI 적용 */
.section-header {
    padding: 18px 22px; /* 헤더 패딩 */
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    border: 1.5px solid #e8ecf1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1.3rem; /* 제목 크기 */
    font-weight: 700;
    text-align: center;
    justify-content: center;
    width: 100%;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.date-navigation {
    gap: 10px; /* 날짜 네비게이션 간격 축소 */
}

.date-navigation button {
    padding: 6px 10px; /* 버튼 크기 축소 */
    font-size: 0.9rem;
}

.timeline-item {
    padding: 10px 12px; /* 더 작은 패딩 */
    margin-bottom: 6px; /* 더 작은 간격 */
}

    .timeline-time {
        min-width: 80px;
        font-size: 0.9rem;
    }

.status-badge {
    font-size: 0.7rem; /* 더 작은 상태 배지 */
    padding: 3px 6px; /* 더 작은 패딩 */
}

.player-item {
    padding: 3px 6px; /* 더 작은 플레이어 아이템 패딩 */
    font-size: 0.7rem; /* 더 작은 플레이어 텍스트 */
}

.player-dupr {
    display: none; /* 모든 화면에서 DUPR 숨김 */
}

.timeline-reserve-btn {
    padding: 6px 12px; /* 예약 버튼 크기 축소 */
    font-size: 0.8rem;
}

.reservation-actions {
    padding: 15px; /* 예약 액션 패딩 축소 */
    gap: 10px;
}

.reservation-actions .btn {
    padding: 10px 16px; /* 버튼 크기 축소 */
    font-size: 0.9rem;
}
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        margin: 0 0 20px 0;
    }
    
    .ranking-filters, .stats-filters {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-stat-card {
        padding: 20px;
    }
    
    .reservations-timeline {
        overflow: visible;
    }
    
    .timeline-reserve-btn {
        position: static;
        transform: none;
        opacity: 1; /* 모바일에서도 항상 표시 */
        margin-top: 10px;
        width: 100%;
    }
    
    .info-card {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .info-item {
        font-size: 0.9rem;
    }

@media (max-width: 480px) {
    .desktop-nav-tabs {
        margin: 0 10px 20px 10px;
        padding: 15px;
    }
    
    .desktop-tab-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* 480px 이하에서도 통계탭 기간 선택 버튼 한 줄로 */
    .stats-period-filter-buttons {
        flex-wrap: nowrap !important;
    }
    
    .stats-period-btn {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        flex: 1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
        box-sizing: border-box !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 480px 이하에서도 기록탭 기간 선택 버튼 한 줄로 (통계탭과 동일) */
    .records-container .stats-period-filter-buttons {
        flex-wrap: nowrap !important;
    }
    
    .records-container .stats-period-btn {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        flex: 1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
        box-sizing: border-box !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 메달 시상식 모바일 최적화 - 현재 크기의 2배로 조정 (480px 이하) */
    .medal-ceremony-section .podium-wrapper {
        gap: 8px !important;
        padding: 15px 8px !important;
        min-height: 216px !important; /* 1위 카드(186px) + 위아래 여백 */
        max-height: 230px !important; /* 1위 카드(186px) + 위아래 여백 */
        height: auto !important;
    }
    
    .medal-ceremony-section .podium-card {
        padding: 12px 8px !important;
        gap: 8px !important;
        min-height: 160px !important; /* 현재의 2배 */
        height: 160px !important; /* 현재의 2배 - 명시적 설정 */
        width: 100px !important; /* 너비는 유지 */
        max-width: 100px !important;
    }
    
    .medal-ceremony-section .podium-card.first-place {
        width: 110px !important; /* 너비는 유지 */
        min-width: 100px !important;
        max-width: 110px !important;
        min-height: 186px !important; /* 현재의 2배 */
        max-height: 200px !important; /* 현재의 2배 */
        height: 186px !important; /* 현재의 2배 - 명시적 설정 */
    }
    
    .medal-ceremony-section .podium-card.second-place {
        width: 100px !important; /* 너비는 유지 */
        min-width: 90px !important;
        max-width: 100px !important;
        min-height: 174px !important; /* 현재의 2배 */
        max-height: 186px !important; /* 현재의 2배 */
        height: 174px !important; /* 현재의 2배 - 명시적 설정 */
    }
    
    .medal-ceremony-section .podium-card.third-place {
        width: 100px !important; /* 너비는 유지 */
        min-width: 90px !important;
        max-width: 100px !important;
        min-height: 160px !important; /* 현재의 2배 */
        max-height: 174px !important; /* 현재의 2배 */
        height: 160px !important; /* 현재의 2배 - 명시적 설정 */
    }
    
    .medal-icon {
        font-size: 2rem !important; /* 모바일에서 더 크게 */
        margin-bottom: 8px !important;
    }
    
    .medal-number {
        font-size: 1rem !important; /* 모바일에서 더 크게 */
    }
    
    .podium-name {
        font-size: 0.9rem !important; /* 모바일에서 더 크게 */
        margin-top: 6px !important;
    }
    
    .podium-score {
        font-size: 0.8rem !important; /* 모바일에서 더 크게 */
        margin-top: 4px !important;
    }
    
    /* .section-header는 아래 더 구체적인 스타일로 덮어씀 */
    
    .admin-stat-card {
        padding: 15px;
    }
    
    .admin-stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .tab-contents {
        padding: 25px 10px 100px 10px; /* 모바일에서 여백 25px */
    }
    
    .timeline-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .timeline-time {
        min-width: 80px;
        margin-right: 15px;
        font-size: 0.9rem;
    }
    /* 모바일 컴팩트 사이징 */
    .nav-container { 
        height: 52px !important; 
        padding: 0 10px !important; /* 좌우 패딩 확보 */
        overflow: hidden !important; /* 내용 잘림 방지 */
    }
    .nav-logo { 
        font-size: 0.85rem !important; /* 작은 화면에서 더 작게 */
        max-width: calc(100% - 60px) !important; /* 햄버거 버튼 공간 확보 */
        flex-wrap: nowrap !important; /* 한 줄로 표시 */
        gap: 4px !important; /* 요소 간 간격 */
        min-width: 0 !important; /* flex 축소 허용 */
        overflow: hidden !important; /* 넘치는 내용 숨김 */
    }
    
    .nav-user-info {
        overflow: hidden !important; /* 넘치는 내용 숨김 */
        text-overflow: ellipsis !important; /* 넘치는 텍스트는 ... 표시 */
        flex-shrink: 1 !important; /* 필요시 축소 허용 */
        margin-left: 16px !important; /* 버전 배지와 간격 늘리기 (8px -> 16px) */
        white-space: nowrap !important; /* 한 줄로 표시 */
    }
    .nav-logo i { 
        font-size: 1rem !important; 
        flex-shrink: 0 !important; /* 아이콘 크기 고정 */
    }
    .mobile-nav-tabs { 
        padding: 8px 0 !important; /* 패딩 줄임 */
        min-height: 75px !important; /* 높이 줄임 */
    }
    .mobile-tab-btn { padding: 10px 5px; font-size: 0.85rem; font-weight: 500; }
    .mobile-tab-btn i { font-size: 1.6rem; margin-bottom: 5px; }
    .reservations-board { 
        margin: 0 !important;
        width: 100% !important;
    }
    
    .reservations-container,
    .records-container,
    .stats-container,
    .rankings-container {
        padding: 25px 6px 160px 6px !important; /* 작은 모바일 상단 여백 25px */
    }
    
    /* 대진표 컨테이너 모바일 여백 확보 */
    .matches-container {
        padding: 25px 6px 160px 6px !important; /* 작은 모바일 상단 여백 25px */
    }
    .reservations-timeline { 
        padding: 8px !important; /* 패딩 최소화 */
    }
    .section-header { 
        padding: 8px 12px !important; /* padding 충분히 확보 (글자 잘림 방지) */
        margin-bottom: 8px !important; /* margin 조정 */
        margin-top: 8px !important; /* 상단 여백 확보 */
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
        min-height: auto !important; /* 높이 자동 */
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Today 배지와 제목을 같은 줄에 배치 */
    .section-header > .today-badge {
        position: absolute !important; /* 절대 위치 */
        top: 8px !important;
        left: 12px !important;
        font-size: 0.55rem !important; /* 더 작게 */
        padding: 2px 5px !important; /* padding 최소화 */
        margin: 0 !important;
        z-index: 10 !important;
        flex-shrink: 0 !important; /* 크기 고정 */
    }
    
    .section-header > h2 {
        font-size: 1rem !important; /* 예약현황 글씨 더 크게 */
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 auto !important; /* 가운데 정렬 */
        padding: 0 !important;
        display: flex !important;
        position: relative !important; /* Today 배지와 독립적으로 중앙 정렬 */
        /* Today 배지가 있어도 제목이 완전히 중앙에 오도록 */
        left: 0 !important;
        transform: none !important;
        z-index: 1 !important; /* Today 배지 위에 표시되도록 */
        pointer-events: none !important; /* 클릭 이벤트는 Today 배지가 받도록 */
    }
    
    /* Today 배지가 있을 때도 제목이 중앙에 오도록 보장 */
    .section-header:has(.today-badge) > h2 {
        position: relative !important;
        left: 0 !important;
        transform: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .section-header > .date-navigation {
        width: 100% !important; /* 전체 너비 차지 */
        margin-top: 2px !important; /* 위쪽 여백 */
    }
    
    .date-navigation { 
        gap: 2px !important; /* gap 최소화 */
        margin-top: 0 !important; /* 위쪽 여백 제거 */
        width: 100%;
        justify-content: center !important;
    }
    .date-navigation button { 
        padding: 4px 8px !important; /* 예전처럼 조금 더 크게 */
        font-size: 0.75rem !important; /* 예전처럼 조금 더 크게 */
        min-width: 32px !important; /* 예전처럼 조금 더 크게 */
        height: 28px !important; /* 예전처럼 조금 더 크게 */
    }
    .date-navigation span {
        font-size: 0.75rem !important; /* 날짜 텍스트 크기 */
        min-width: auto !important;
        padding: 4px 10px !important; /* 패딩 추가 */
        color: #000000 !important; /* 검은색으로 변경 */
        color: black !important; /* 검은색으로 변경 */
        background: rgba(153, 27, 27, 0.1) !important; /* 배경색 유지 */
    }
    
    /* 날짜 표시 텍스트 강제 검은색 (모바일) */
    #current-date-display,
    #matches-current-date-display {
        color: #000000 !important;
        border-radius: 6px !important; /* 둥근 모서리 */
        font-weight: 700 !important; /* 굵게 */
    }
    
    .today-emoji {
        display: none !important; /* 이모티콘 제거됨 */
    }
    .timeline-item {
        padding: 6px 8px !important; /* padding 최소화 */
        margin-bottom: 4px !important; /* margin 더 줄임 */
        min-height: auto !important; /* 높이 자동 */
    }
    
    .timeline-header {
        margin-bottom: 4px !important; /* 더 줄임 */
    }
    
    .timeline-time {
        min-width: 65px !important; /* 더 줄임 */
        font-size: 0.8rem !important; /* 더 작게 */
        margin-right: 6px !important; /* 더 줄임 */
    }
    
    .timeline-status {
        font-size: 0.65rem !important; /* 더 작게 */
    }
    
    .timeline-players {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2px !important; /* gap 최소화 */
        width: 100% !important;
        margin-top: 2px !important; /* 더 줄임 */
        margin-bottom: 2px !important; /* 예약자와 버튼 사이 여백 최소화 */
    }
    
    .player-item { 
        font-size: 0.65rem !important; /* 예약현황 박스 글씨 더 크게 */
        padding: 2px 4px !important; /* padding 조정 */
        min-height: 18px !important; /* Height 더 줄이기 */
        height: 18px !important; /* Height 고정 */
        width: 100% !important;
        line-height: normal !important;
    }
    
    /* 작은 모바일에서 player-name 정렬 */
    .timeline-players .player-name {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        line-height: 1.2 !important;
        font-size: inherit !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 작은 모바일에서 메달 아이콘 크기 조정 - 이름 텍스트와 동일하게 */
    .timeline-players .player-name .medal-icon {
        font-size: 0.65rem !important; /* player-item의 font-size와 동일 (0.65rem) */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        height: auto !important;
        position: relative !important;
        top: 0 !important;
        margin: 0 !important;
        margin-right: 2px !important;
        line-height: 1.2 !important; /* player-name의 line-height와 동일 */
        vertical-align: middle !important;
    }
    
    .timeline-actions {
        margin-top: 2px !important; /* 예약자와 예약하기 버튼 사이 여백 최소화 */
        gap: 3px !important; /* gap 최소화 */
    }
    
    .timeline-actions .btn,
    .timeline-actions .timeline-reserve-btn,
    .timeline-actions .timeline-cancel-btn,
    .timeline-actions .force-generate-btn {
        padding: 4px 6px !important; /* padding 최소화 */
        font-size: 0.65rem !important; /* 더 작게 */
    }
    
    /* 대진표 작은 모바일 반응형 */
    .matches-container {
        padding: 0 2px 140px 2px; /* 예약, 대진표 탭 수준의 여백 */
    }
    
    .match-schedule-section {
        padding: 12px 8px;
        margin-top: 12px;
    }
    
    /* 모바일에서 한 줄 레이아웃 스타일 - 더 컴팩트하게 */
    .match-single-row {
        display: flex !important;
        align-items: center !important;
        gap: 1px !important; /* 간격 최소화 */
        padding: 2px 2px 2px 1px !important; /* 여백 최대한 줄임 */
        flex-wrap: nowrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
    
    .player-names-compact {
        font-size: 0.85rem !important; /* 모바일에서 글씨 크기 더 키움 */
        max-width: none !important; /* 말줄임표 제거 */
        overflow: visible !important; /* 말줄임표 제거 */
        text-overflow: clip !important; /* 말줄임표 제거 */
        white-space: nowrap !important; /* 한 줄로 */
    }
    
    .court-label-compact {
        font-size: 0.75rem !important; /* 모바일에서 폰트 약간 키움 */
        min-width: 18px !important; /* 너비 줄임 */
        max-width: 18px !important;
        flex-shrink: 0 !important;
    }
    
    /* 모바일에서 player-names-compact는 기본 스타일 상속 */
    
    .score-input-compact {
        padding: 1px 1px !important; /* 패딩 더 줄임 */
        font-size: 0.75rem !important; /* 모바일에서 폰트 약간 키움 */
        width: 28px !important; /* 너비 줄임 */
        min-width: 28px !important;
        max-width: 28px !important;
        flex-shrink: 0 !important;
    }
    
    .vs-separator-compact {
        font-size: 0.7rem !important; /* 모바일에서 폰트 약간 키움 */
        margin: 0 !important;
        padding: 0 1px !important; /* 좌우 패딩 최소화 */
        flex-shrink: 0 !important;
        min-width: 18px !important;
    }
    
    .save-score-btn-compact {
        padding: 2px 6px !important; /* 패딩 더 줄임 */
        font-size: 0.7rem !important; /* 모바일에서 폰트 약간 키움 */
        margin-left: 2px !important; /* 마진 줄임 */
        margin-right: 0 !important; /* 오른쪽 마진 제거 */
        flex-shrink: 0 !important; /* 버튼이 잘리지 않도록 */
        white-space: nowrap !important;
        box-sizing: border-box !important;
        display: inline-block !important; /* 모바일에서도 항상 표시 */
        visibility: visible !important; /* 모바일에서도 항상 표시 */
        opacity: 1 !important; /* 모바일에서도 항상 표시 */
        min-width: 35px !important; /* 최소 너비 줄임 */
        max-width: 35px !important;
    }
    
    .match-schedule {
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    .match-item {
        padding: 8px;
        gap: 6px;
    }
    
    .match-teams {
        gap: 6px;
        font-size: 0.75rem;
    }
    
    .team {
        font-size: 0.7rem;
        padding: 4px 6px;
        min-width: 70px;
        max-width: 100px;
    }
    
    .team.vs {
        padding: 4px 10px;
    }
    
    .match-score {
        gap: 4px;
        margin-top: 4px;
        flex-wrap: wrap;
    }
    
    .score-input {
        width: 35px;
        padding: 4px;
        font-size: 0.8rem;
    }
    
    .save-score-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .match-round {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .match-round h4 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
/* 대진표 시간대별 섹션 스타일 - 가시성 향상 */
#match-schedule .time-slot-matches,
.match-schedule .time-slot-matches,
.match-schedule-section .time-slot-matches,
.time-slot-matches {
    margin-bottom: 30px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.2) !important;
    overflow: visible !important; /* 모바일에서 내용이 잘리지 않도록 변경 */
    border: 3px solid #b8c5ff !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    display: block !important;
    width: 100% !important;
}

#match-schedule .time-slot-matches:hover,
.match-schedule .time-slot-matches:hover,
.match-schedule-section .time-slot-matches:hover,
.time-slot-matches:hover {
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.3) !important;
    transform: translateY(-3px) !important;
    border-color: #8fa3ff !important;
}

#match-schedule .time-slot-matches .time-slot-header,
.match-schedule .time-slot-matches .time-slot-header,
.match-schedule-section .time-slot-matches .time-slot-header,
.time-slot-matches .time-slot-header {
    background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%) !important;
    padding: 18px 24px !important;
    border-bottom: 4px solid rgba(255, 255, 255, 0.4) !important;
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    display: block !important;
    justify-content: normal !important;
    align-items: normal !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 12px rgba(76, 99, 210, 0.3) !important;
}

.time-slot-matches .time-slot-header::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    right: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%) !important;
    animation: shine 3s infinite !important;
}

@keyframes shine {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.time-slot-matches .time-slot-title {
    color: white !important;
    margin: 0 !important;
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    position: relative !important;
    z-index: 1 !important;
    letter-spacing: 0.5px !important;
}

.time-slot-matches .time-slot-title i {
    font-size: 1.3rem !important;
    color: white !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
}

#match-schedule .time-slot-matches .time-slot-content,
.match-schedule .time-slot-matches .time-slot-content,
.match-schedule-section .time-slot-matches .time-slot-content,
#matches-tab .time-slot-matches .time-slot-content,
.time-slot-matches .time-slot-content {
    padding: 28px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%) !important;
    min-height: 100px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#match-schedule .time-slot-matches .court-section,
.match-schedule .time-slot-matches .court-section,
.match-schedule-section .time-slot-matches .court-section,
#matches-tab .time-slot-matches .court-section,
.time-slot-matches .court-section {
    margin-bottom: 28px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%) !important;
    border-radius: 18px !important;
    padding: 20px !important;
    border: 2px solid #d4dcf5 !important;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.12), 0 3px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.time-slot-matches .court-section:hover {
    border-color: #a8b8f0 !important;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.2), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-3px) !important;
    background: linear-gradient(135deg, #ffffff 0%, #e8efff 100%) !important;
}

.time-slot-matches .court-section:last-child {
    margin-bottom: 0 !important;
}

#match-schedule .time-slot-matches .court-title,
.match-schedule .time-slot-matches .court-title,
.match-schedule-section .time-slot-matches .court-title,
#matches-tab .time-slot-matches .court-title,
.time-slot-matches .court-title {
    color: white !important;
    margin: 0 0 16px 0 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 12px 18px !important;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important; /* 1코트 기본 색상 */
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 1코트 색상 (파란색 계열 - 가시성 향상) */
.time-slot-matches .court-section:nth-child(1) .court-title,
.time-slot-matches .court-section:first-child .court-title {
    background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%) !important;
    box-shadow: 0 6px 16px rgba(76, 99, 210, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* 2코트 색상 (주황색 계열로 구분 - 가시성 향상) */
.time-slot-matches .court-section:nth-child(2) .court-title {
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%) !important;
    box-shadow: 0 6px 16px rgba(255, 82, 82, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* 3코트 이상 (초록색 계열 - 가시성 향상) */
.time-slot-matches .court-section:nth-child(n+3) .court-title {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%) !important;
    box-shadow: 0 6px 16px rgba(67, 160, 71, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.time-slot-matches .court-title::before {
    content: '🏟️' !important;
    font-size: 1.1rem !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
    z-index: 1 !important;
    position: relative !important;
}

.time-slot-matches .court-title::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
    transition: left 0.5s !important;
}

.time-slot-matches .court-title:hover::after {
    left: 100% !important;
}

.time-slot-matches .court-matches {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 8px 0 !important;
}

#match-schedule .time-slot-matches .match-item-small,
.match-schedule .time-slot-matches .match-item-small,
.match-schedule-section .time-slot-matches .match-item-small,
#matches-tab .time-slot-matches .match-item-small,
.time-slot-matches .match-item-small {
    display: flex !important;
    flex-direction: column !important;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    border: 2px solid #c8d4ff !important;
    gap: 12px !important;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.15) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.time-slot-matches .match-item-small::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 4px !important;
    height: 100% !important;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.time-slot-matches .match-item-small:hover::before {
    opacity: 1 !important;
}

.time-slot-matches .match-item-small:hover {
    transform: translateY(-3px) translateX(4px) !important;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.25) !important;
    border-color: #8fa3ff !important;
    background: linear-gradient(135deg, #ffffff 0%, #e8efff 100%) !important;
}

.time-slot-matches .match-header-small {
    display: flex !important;
    justify-content: flex-start !important;
    margin-bottom: 6px !important;
}

.time-slot-matches .match-round-label {
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    color: white !important;
    background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%) !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 3px 8px rgba(76, 99, 210, 0.4) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.time-slot-matches .match-round-label::before {
    content: '🏸' !important;
    font-size: 0.7rem !important;
}

.time-slot-matches .match-teams-small {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    padding: 8px 0 !important;
}

.time-slot-matches .team-small {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 8px 12px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important; /* 진한 검은색으로 가독성 향상 */
    font-size: 0.8rem !important;
    min-width: 85px !important;
    max-width: 130px !important;
    word-break: break-word !important;
    white-space: normal !important;
    text-align: center !important;
    border: 2px solid #d0d9f0 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease !important;
}

.time-slot-matches .team-small:hover {
    border-color: #8fa3ff !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25) !important;
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%) !important;
}

/* 승리 팀 시각적 효과 - 금색/황금색 강조 */
.time-slot-matches .team-small.team-won {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4), 0 0 20px rgba(255, 215, 0, 0.3) !important;
    color: #1a1a1a !important;
    font-weight: 800 !important;
    position: relative !important;
    animation: winnerGlow 2s ease-in-out infinite !important;
}

.time-slot-matches .team-small.team-won::before {
    content: '🏆' !important;
    margin-right: 4px !important;
    font-size: 0.9rem !important;
    animation: winnerBounce 1.5s ease-in-out infinite !important;
}

.time-slot-matches .team-small.team-won::after {
    content: '' !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    right: -2px !important;
    bottom: -2px !important;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.5), transparent) !important;
    border-radius: 12px !important;
    z-index: -1 !important;
    animation: winnerShine 3s linear infinite !important;
}

@keyframes winnerGlow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4), 0 0 20px rgba(255, 215, 0, 0.3) !important;
    }
    50% {
        box-shadow: 0 6px 24px rgba(255, 193, 7, 0.6), 0 0 30px rgba(255, 215, 0, 0.5) !important;
    }
}

@keyframes winnerBounce {
    0%, 100% {
        transform: translateY(0) !important;
    }
    50% {
        transform: translateY(-3px) !important;
    }
}

@keyframes winnerShine {
    0% {
        transform: translateX(-100%) translateY(-100%) !important;
    }
    100% {
        transform: translateX(100%) translateY(100%) !important;
    }
}

.time-slot-matches .team-small.team-won:hover {
    border-color: #ffc107 !important;
    box-shadow: 0 6px 24px rgba(255, 193, 7, 0.6), 0 0 30px rgba(255, 215, 0, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%) !important;
}

/* 패배 팀 시각적 효과 - 약한 스타일로 대비 */
.time-slot-matches .team-small.team-lost {
    opacity: 0.6 !important;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
    border: 2px solid #d0d0d0 !important;
    color: #666 !important;
    filter: grayscale(30%) !important;
}

.team.team-lost {
    opacity: 0.6 !important;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
    border: 1px solid #d0d0d0 !important;
    color: #666 !important;
    filter: grayscale(30%) !important;
}

.player-names .team-lost,
.player-names-compact.team-lost {
    opacity: 0.6 !important;
    color: #666 !important;
    filter: grayscale(30%) !important;
}

.score-input.team-lost,
.score-input-compact.team-lost,
.time-slot-matches .score-input-small.team-lost {
    opacity: 0.6 !important;
    background: #f5f5f5 !important;
    border: 2px solid #d0d0d0 !important;
    color: #666 !important;
    filter: grayscale(30%) !important;
}

.time-slot-matches .team-vs-small {
    background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%) !important;
    color: white !important;
    font-weight: 800 !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    font-size: 0.8rem !important;
    box-shadow: 0 4px 12px rgba(76, 99, 210, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.time-slot-matches .match-score-small {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    margin-top: 10px !important;
    padding: 14px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
    border-radius: 12px !important;
    border: 2px solid #d0d9f0 !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(220, 38, 38, 0.1) !important;
    position: relative !important;
}

.time-slot-matches .match-score-small::before {
    content: '📊' !important;
    position: absolute !important;
    top: 8px !important;
    left: 12px !important;
    font-size: 1.2rem !important;
    opacity: 0.3 !important;
}

.time-slot-matches .score-input-small {
    width: 50px !important;
    padding: 6px !important;
    border: 2px solid #c8d4ff !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: #1a1a1a !important;
    background: white !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.time-slot-matches .score-input-small:focus {
    outline: none !important;
    border-color: #8fa3ff !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2), 0 2px 8px rgba(220, 38, 38, 0.15) !important;
    transform: scale(1.05) !important;
    background: #ffffff !important;
}

.time-slot-matches .score-separator-small {
    font-weight: 800 !important;
    color: #ef4444 !important;
    font-size: 1.2rem !important;
    text-shadow: 0 1px 2px rgba(76, 99, 210, 0.2) !important;
}

.time-slot-matches .save-score-btn-small {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3) !important;
}

.time-slot-matches .save-score-btn-small:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1ea881 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4) !important;
}

.time-slot-matches .save-score-btn-small:active:not(:disabled) {
    transform: translateY(0) !important;
}

.time-slot-matches .save-score-btn-small:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.time-slot-matches .match-status-small {
    padding: 4px 10px !important;
    border-radius: 10px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    border: 2px solid !important;
}

.time-slot-matches .match-status-small.pending {
    background: #fff3cd !important;
    color: #856404 !important;
    border-color: #ffc107 !important;
}

.time-slot-matches .match-status-small.completed {
    background: #d4edda !important;
    color: #155724 !important;
    border-color: #28a745 !important;
}
    
    .timeline-reserve-btn, .timeline-cancel-btn { padding: 6px 10px; font-size: 0.65rem; border-radius: 12px; }
    .filter-btn { padding: 6px 10px; font-size: 0.8rem; border-radius: 16px; }
    
    .test-buttons-container {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .test-time-group {
        width: 100%;
        padding: 6px;
    }
    
    .test-time-buttons {
        justify-content: center;
    }
    
    .test-time-buttons .btn {
        font-size: 0.6rem;
        padding: 3px 6px;
        height: 26px;
        min-width: 50px;
    }
}

/* 타임라인 스타일 */
.timeline-item {
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    border: 1.5px solid #e8ecf1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
    transition: width 0.3s ease;
}

.timeline-item:hover { 
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08); 
    transform: translateY(-2px);
    border-color: #d0d9f0;
}

.timeline-item:hover::before {
    width: 5px;
}

.timeline-item.full {
    border-left-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f7 0%, #ffeef0 100%);
}

.timeline-item.full::before {
    background: linear-gradient(180deg, #ff6b6b 0%, #ee5a6f 100%);
}

.timeline-item.partial {
    border-left-color: #ffd93d;
    background: linear-gradient(135deg, #fffdf5 0%, #fffaf0 100%);
}

.timeline-item.partial::before {
    background: linear-gradient(180deg, #ffd93d 0%, #ffcc02 100%);
}

.timeline-item.empty {
    border-left-color: #51cf66;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f8ed 100%);
}

.timeline-item.empty::before {
    background: linear-gradient(180deg, #51cf66 0%, #40c057 100%);
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px; /* 여백 최소화 (12px -> 8px) */
    width: 100%;
}

.timeline-time {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.timeline-status {
    margin: 0;
}

.status-badge { 
    padding: 5px 12px; 
    border-radius: 14px; 
    font-size: 0.75rem; 
    font-weight: 600; 
    letter-spacing: -0.01em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-badge.full { 
    background: linear-gradient(135deg, #ffe5e7 0%, #ffd5d7 100%); 
    color: #c0392b; 
    border: 1px solid #ffc5c7;
}

.status-badge.partial { 
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%); 
    color: #7a5d00; 
    border: 1px solid #ffec8a;
}

.status-badge.empty { 
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); 
    color: #1e7e34; 
    border: 1px solid #a5d6a7;
}

.status-badge.closed { 
    background: linear-gradient(135deg, #eceff1 0%, #cfd8dc 100%); 
    color: #546e7a; 
    border: 1px solid #b0bec5;
}

.timeline-players {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: normal;
}

.player-item:hover { 
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f4ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.15);
    border-color: #cbd5e0;
}

.player-name {
    font-weight: 600;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: inherit; /* player-item의 font-size 상속 */
    line-height: 1.2;
    margin: 0;
    padding: 0;
    height: 100%;
}

/* 메달 아이콘 스타일 - 이름 텍스트와 동일한 크기 (이모지) */
/* 다른 곳의 큰 메달 스타일을 덮어쓰기 위해 .player-name 내부로 제한 */
.timeline-players .player-name .medal-icon {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 1em !important; /* 이름 텍스트와 정확히 같은 크기 */
    line-height: 1 !important;
    margin: 0 !important;
    margin-right: 3px !important;
    width: auto !important;
    height: auto !important;
    position: static !important;
    vertical-align: baseline !important;
}

.medal-gold {
    filter: drop-shadow(0 1px 2px rgba(255, 215, 0, 0.5));
}

.medal-silver {
    filter: drop-shadow(0 1px 2px rgba(192, 192, 192, 0.5));
}

.medal-bronze {
    filter: drop-shadow(0 1px 2px rgba(205, 127, 50, 0.5));
}

.player-dupr {
    color: #dc2626;
    font-size: 0.7rem;
}

/* 타임라인 내부 대진표 스타일 */
.timeline-match-schedule {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    border: 2px solid #e0e4ff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.timeline-match-schedule .match-round {
    margin-bottom: 16px;
    background: white;
    border-radius: 10px;
    padding: 12px;
    border-left: 3px solid #dc2626;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.timeline-match-schedule .match-round:last-child {
    margin-bottom: 0;
}

.timeline-match-schedule .match-round h3 {
    color: #dc2626;
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.timeline-match-schedule .match-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #fafbff;
    border-radius: 8px;
    border: 1px solid #e0e4ff;
}

.timeline-match-schedule .match-item:last-child {
    margin-bottom: 0;
}

.timeline-match-schedule .match-teams {
    gap: 10px;
    font-size: 0.85rem;
}

.timeline-match-schedule .team {
    font-size: 0.8rem;
    padding: 4px 8px;
}

.timeline-match-schedule .match-score {
    gap: 8px;
}

.timeline-match-schedule .score-input {
    width: 50px;
    padding: 6px;
    font-size: 0.85rem;
}

.timeline-match-schedule .save-score-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* 대진표 컨테이너 스타일 */
.matches-container {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    padding: 0 8px 160px 8px; /* 좌우 여백 증가로 잘림 방지 */
    min-height: calc(100vh - 200px);
    box-sizing: border-box;
    overflow-x: visible !important; /* 가로 스크롤 방지 */
    overflow-y: visible !important; /* 세로 스크롤 허용하여 내용이 잘리지 않도록 */
}

/* 대진표 섹션 스타일 */
.time-slot-section {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    margin-bottom: 20px !important;
}

.rounds-container {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

.round-section {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    margin-bottom: 5px !important; /* 여백 더 줄임 */
    padding: 3px 3px 3px 2px !important; /* PC에서도 여백 줄임 */
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%) !important;
    border-radius: 6px !important;
}

/* 모바일에서 round-section 패딩 줄이기 및 글씨 크기 조정 */
@media (max-width: 480px) {
    .round-section {
        padding: 3px 2px 3px 2px !important; /* 바깥쪽 여백 최대한 줄임 */
        margin-bottom: 4px !important; /* 여백 줄임 */
    }
    
    .matches-container {
        padding: 0 4px 140px 4px !important; /* 좌우 여백 줄임 */
    }
    
    .match-schedule-section {
        padding: 10px 6px !important; /* 여백 줄임 */
    }
    
    .round-header-compact {
        font-size: 1.05rem !important; /* 모바일에서 글씨 크기 더 키움 */
        padding: 3px 4px !important; /* 여백 더 줄임 */
        color: white !important; /* 모바일에서도 흰색 글씨 강제 */
        background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%) !important; /* 배경 강제 */
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important; /* 가독성 향상 */
    }
    
    .player-names-compact {
        font-size: 0.95rem !important; /* 모바일에서 글씨 크기 더 키움 */
        max-width: none !important; /* 말줄임표 제거 */
        overflow: visible !important; /* 말줄임표 제거 */
        text-overflow: clip !important; /* 말줄임표 제거 */
        white-space: nowrap !important; /* 한 줄로 강제 */
    }
    
    .match-single-row {
        padding: 2px 1px 2px 1px !important; /* 바깥쪽 여백 최대한 줄임 */
        gap: 1px !important;
    }
    
    .score-input-compact {
        width: 26px !important; /* 여백 확보를 위해 약간 줄임 */
        min-width: 26px !important;
        max-width: 26px !important;
        padding: 1px 1px !important;
        font-size: 0.75rem !important; /* 모바일에서 폰트 약간 키움 */
    }
    
    .save-score-btn-compact {
        padding: 2px 5px !important; /* 여백 더 줄임 */
        min-width: 32px !important; /* 여백 확보를 위해 약간 줄임 */
        max-width: 32px !important;
        font-size: 0.7rem !important; /* 모바일에서 폰트 약간 키움 */
    }
    
    .match-item-compact {
        padding: 0 2px 0 0 !important; /* 여백 줄임 */
        margin-bottom: 2px !important; /* 여백 줄임 */
    }
}

.round-header-compact {
    font-size: 1.1rem !important; /* PC에서 글씨 크기 더 키움 */
    font-weight: 700 !important;
    color: white !important; /* 흰색 글씨로 변경 */
    padding: 4px 5px !important; /* 여백 줄임 */
    margin-bottom: 2px !important; /* 여백 줄임 */
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    word-wrap: break-word !important;
    background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%) !important; /* 배경 유지 */
    border-radius: 4px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important; /* 가독성 향상 */
}

.match-item-compact {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 0 4px 0 0 !important; /* 오른쪽 패딩 추가 */
    margin-bottom: 3px !important;
}

/* 모바일에서도 버튼이 항상 표시되도록 - 더 컴팩트하게 */
@media (max-width: 480px) {
    .save-score-btn-compact {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 35px !important;
        max-width: 35px !important;
        padding: 2px 6px !important;
        font-size: 0.7rem !important; /* PC에서 폰트 약간 키움 */
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    .match-single-row {
        display: flex !important;
        align-items: center !important;
        gap: 1px !important;
        padding: 2px 3px 2px 1px !important; /* 패딩 조정 */
        flex-wrap: nowrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
    
    .match-item-compact {
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding: 0 3px 0 0 !important;
        margin-bottom: 2px !important;
    }
    
    .court-label-compact {
        font-size: 0.75rem !important; /* PC에서 폰트 약간 키움 */
        min-width: 18px !important;
        max-width: 18px !important;
    }
    
    /* 모바일에서 player-names-compact는 기본 스타일 상속 */
    .player-names-compact.team-won {
        padding: 1px 2px 1px 18px !important; /* 트로피 공간 확보 (왼쪽) */
    }
    
    .player-names-compact.team-won-left {
        padding: 1px 18px 1px 2px !important; /* 트로피 공간 확보 (오른쪽) */
    }
    
    .score-input-compact {
        width: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
        padding: 1px 1px !important;
        font-size: 0.75rem !important; /* PC에서 폰트 약간 키움 */
    }
    
    .vs-separator-compact {
        font-size: 0.7rem !important; /* PC에서 폰트 약간 키움 */
        padding: 0 1px !important;
        min-width: 18px !important;
    }
}

/* 참가자 목록 잘림 방지 */
.time-slot-section > div[style*="밸런스 모드"],
.time-slot-section > div[style*="랜덤 모드"],
.time-slot-section > div[style*="그룹 모드"] {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    padding: 4px 8px !important;
    margin-bottom: 4px !important;
    font-size: 0.85rem !important;
    color: #666 !important;
}

/* time-slot-header-compact 스타일 */
.time-slot-header-compact {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* 대진표 섹션 스타일 (하위 호환성) */
.match-schedule-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 20px;
    border: 1.5px solid #e8ecf1;
    margin-top: 20px;
    padding: 16px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: visible !important; /* 내용이 잘리지 않도록 */
    overflow-x: visible !important; /* 가로 스크롤 허용 */
    overflow-y: visible !important; /* 세로 스크롤 허용 */
    min-height: 200px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.match-info {
    color: #000000 !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 18px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8efff 100%);
    border-radius: 12px;
    border: 2px solid #b8c5ff;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(76, 99, 210, 0.15);
}

.match-schedule,
#match-schedule {
    margin-top: 20px !important;
    padding: 0 4px !important; /* 좌우 여백 추가 */
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    overflow-y: visible !important;
    overflow-x: visible !important; /* 가로 스크롤 허용하여 잘림 방지 */
    max-height: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.match-round {
    margin-bottom: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%);
    border-radius: 16px;
    padding: 18px 20px;
    border: 2px solid #d4dcf5;
    border-left: 5px solid #ef4444;
    box-shadow: 0 4px 12px rgba(76, 99, 210, 0.12);
    transition: all 0.3s ease;
}

.match-round:hover {
    box-shadow: 0 6px 20px rgba(76, 99, 210, 0.2);
    transform: translateY(-3px);
    border-color: #8fa3ff;
    background: linear-gradient(135deg, #ffffff 0%, #e8efff 100%);
}

.match-round h3 {
    color: #1a1a1a;
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.match-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1.5px solid #e8ecf1;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.match-item:hover {
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
    border-color: #d0d9f0;
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
    justify-content: center;
}

.team {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f4ff 100%);
    border-radius: 12px;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 0.85rem;
    min-width: 100px;
    max-width: 150px;
    word-break: break-word;
    white-space: normal;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.team:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8efff 100%);
    border-color: #cbd5e0;
}

/* 승리 팀 시각적 효과 - 일반 팀 스타일 */
.team.team-won {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4), 0 0 20px rgba(255, 215, 0, 0.3) !important;
    color: #1a1a1a !important;
    font-weight: 800 !important;
    position: relative !important;
    animation: winnerGlow 2s ease-in-out infinite !important;
}

.team.team-won::before {
    content: '🏆 ' !important;
    margin-right: 4px !important;
    font-size: 0.9rem !important;
    animation: winnerBounce 1.5s ease-in-out infinite !important;
}

.team.team-won:hover {
    border-color: #ffc107 !important;
    box-shadow: 0 6px 24px rgba(255, 193, 7, 0.6), 0 0 30px rgba(255, 215, 0, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%) !important;
}

.team.vs {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    font-weight: 700;
    min-width: auto;
    padding: 10px 18px;
    border: none;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    letter-spacing: 0.05em;
}

.match-score {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* 간단한 대진표 스타일 */
.match-court-simple {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f4ff 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.court-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: #dc2626;
    min-width: 70px;
    flex-shrink: 0;
}

.player-names {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
    text-align: center;
    word-break: break-word;
    line-height: 1.5;
}

/* 승리 팀 시각적 효과 - player-names */
.player-names .team-won {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    padding: 4px 12px !important;
    border-radius: 8px !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4), 0 0 20px rgba(255, 215, 0, 0.3) !important;
    color: #1a1a1a !important;
    font-weight: 800 !important;
    position: relative !important;
    display: inline-block !important;
    animation: winnerGlow 2s ease-in-out infinite !important;
}

.player-names .team-won::before {
    content: '🏆 ' !important;
    margin-right: 4px !important;
    font-size: 1rem !important;
    animation: winnerBounce 1.5s ease-in-out infinite !important;
}

.player-names .team-won:hover {
    box-shadow: 0 6px 24px rgba(255, 193, 7, 0.6), 0 0 30px rgba(255, 215, 0, 0.5) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* player-names-compact 기본 스타일 - 한 줄로 표시, 말줄임표 제거 */
.player-names-compact {
    font-size: 0.9rem !important; /* PC에서 글씨 크기 더 키움 */
    flex: 0 1 auto !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    max-width: none !important; /* 말줄임표 제거를 위해 제한 해제 */
    overflow: visible !important; /* 말줄임표 제거 */
    text-overflow: clip !important; /* 말줄임표 제거 */
    white-space: nowrap !important; /* 한 줄로 */
    line-height: 1.2 !important;
    padding: 1px 2px !important;
    display: inline-block !important;
    text-align: center !important;
    position: relative !important;
    vertical-align: middle !important;
}

/* player-names-compact 승리 효과 - 금색 배경 제거, 트로피만 표시 */
/* 오른쪽 팀이 이겼을 때 (트로피를 왼쪽에 표시) */
.player-names-compact.team-won {
    background: transparent !important; /* 배경 제거 */
    padding: 1px 2px 1px 18px !important; /* 왼쪽 패딩 증가 (트로피 공간 확보) */
    border: none !important; /* 테두리 제거 */
    box-shadow: none !important; /* 그림자 제거 */
    color: #1a1a1a !important;
    font-weight: 700 !important;
    animation: none !important; /* 애니메이션 제거 */
    overflow: hidden !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.player-names-compact.team-won::before {
    content: '🏆 ' !important; /* 트로피 아이콘과 공백 */
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    transform: translateY(-50%) !important; /* 수직 중앙 정렬 */
    font-size: 0.75rem !important;
    z-index: 1 !important;
    line-height: 1 !important;
    animation: none !important; /* 애니메이션 제거 */
}

/* 왼쪽 팀이 이겼을 때 (트로피를 오른쪽에 표시) */
.player-names-compact.team-won-left {
    background: transparent !important; /* 배경 제거 */
    padding: 1px 18px 1px 2px !important; /* 오른쪽 패딩 증가 (트로피 공간 확보) */
    border: none !important; /* 테두리 제거 */
    box-shadow: none !important; /* 그림자 제거 */
    color: #1a1a1a !important;
    font-weight: 700 !important;
    animation: none !important; /* 애니메이션 제거 */
    overflow: hidden !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.player-names-compact.team-won-left::after {
    content: ' 🏆' !important; /* 트로피 아이콘과 공백 */
    position: absolute !important;
    top: 50% !important;
    right: 0 !important;
    transform: translateY(-50%) !important; /* 수직 중앙 정렬 */
    font-size: 0.75rem !important;
    z-index: 1 !important;
    line-height: 1 !important;
    animation: none !important; /* 애니메이션 제거 */
}

.match-score-simple {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.score-input {
    width: 45px;
    padding: 6px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.score-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

/* 승리 팀 점수 입력 필드 시각적 효과 */
.score-input.team-won {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%) !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3), inset 0 1px 3px rgba(255, 215, 0, 0.2) !important;
    color: #1a1a1a !important;
    font-weight: 800 !important;
    position: relative !important;
}

.score-input.team-won:focus {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3), 0 4px 12px rgba(255, 193, 7, 0.4) !important;
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%) !important;
}

.score-input-compact.team-won {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%) !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3) !important;
    color: #1a1a1a !important;
    font-weight: 800 !important;
}

.time-slot-matches .score-input-small.team-won {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%) !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3), inset 0 1px 3px rgba(255, 215, 0, 0.2) !important;
    color: #1a1a1a !important;
    font-weight: 800 !important;
}

.time-slot-matches .score-input-small.team-won:focus {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3), 0 4px 12px rgba(255, 193, 7, 0.4) !important;
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%) !important;
}

.score-separator {
    font-weight: 600;
    color: #333;
    font-size: 1.2rem;
}

.save-score-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-score-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.save-score-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.match-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.match-status.pending {
    background: #fff3cd;
    color: #856404;
}

.match-status.completed {
    background: #d4edda;
    color: #155724;
}

/* 타임라인 예약 버튼 */
/* 타임라인 액션 버튼 영역 */
.timeline-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.timeline-reserve-btn {
    padding: 8px 12px;
    background: linear-gradient(180deg, #6f7aea 0%, #5b67d6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.timeline-reserve-btn:hover { box-shadow: 0 6px 14px rgba(220, 38, 38, 0.35); transform: translateY(-1px); }

.timeline-reserve-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 타임라인 취소 버튼 */
.timeline-cancel-btn {
    padding: 8px 12px;
    background: linear-gradient(180deg, #ff6b6b 0%, #e15252 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.timeline-cancel-btn:hover { box-shadow: 0 6px 14px rgba(220, 53, 69, 0.25); transform: translateY(-1px); }

/* 예약/취소 버튼 영역 - 완전 제거됨 (타임라인에 통합) */

/* 모바일 미디어 쿼리에서 reservation-actions 제거됨 */

.timeline-reserve-btn:hover {
    background: #5a6fd8;
    transform: translateY(-50%) scale(1.05);
}

.timeline-reserve-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

.timeline-reserve-btn:disabled:hover {
    transform: translateY(-50%);
    background: #6c757d;
}

/* 통계 차트 스타일 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stat-chart {
    background: rgba(255,255,255,0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-chart h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #fff;
    border-radius: 10px;
    color: #666;
}

.chart-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #dc2626;
}

/* 관리자 대시보드 그리드 */
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: rgba(255,255,255,0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dashboard-card h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.system-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

.status-label {
    font-weight: 500;
    color: #333;
}

.status-value {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-value.success {
    background: #d4edda;
    color: #155724;
}

/* 반응형 타임라인 */
@media (max-width: 768px) {
    .timeline-item {
        padding: 12px 14px;
        margin-bottom: 10px;
    }
    
    .timeline-header {
        margin-bottom: 10px;
    }
    
    .timeline-time {
        gap: 6px;
    }
    
    .time-start {
        font-size: 1rem;
    }
    
    .time-end {
        font-size: 0.85rem;
    }
    
    .timeline-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        align-items: center !important;
    }
    
    .timeline-actions .btn,
    .timeline-actions .timeline-reserve-btn,
    .timeline-actions .timeline-cancel-btn,
    .timeline-actions .force-generate-btn {
        flex: 0 0 auto !important;
        min-width: auto !important;
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
    }
    
    .timeline-players {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 5px !important;
        width: 100% !important;
    }
    
    .player-item {
        padding: 7px 3px !important;
        font-size: 0.68rem !important;
        min-height: 36px !important;
        width: 100% !important;
        line-height: normal !important;
    }
    
    /* 모바일에서 player-name 정렬 */
    .timeline-players .player-name {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        font-size: inherit !important;
        height: 100% !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 모바일에서 메달 아이콘 크기 조정 - 이름 텍스트와 동일하게 */
    .timeline-players .player-name .medal-icon {
        font-size: 0.68rem !important; /* player-item의 font-size와 동일 (0.68rem) */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        height: auto !important;
        position: relative !important;
        top: 0 !important;
        margin: 0 !important;
        margin-right: 3px !important;
        line-height: 1.2 !important;
        vertical-align: middle !important;
    }
    
    /* 대진표 반응형 */
    .matches-container {
        padding: 0 6px 160px 6px !important; /* 모바일 하단 탭바를 위한 여백 증가 */
    }
    
    /* 모바일에서 대진표 시간대별 섹션 overflow 수정 */
    .time-slot-matches {
        overflow: visible !important; /* 내용이 잘리지 않도록 */
    }
    
    .time-slot-content {
        overflow: visible !important; /* 내용이 잘리지 않도록 */
    }
    
    .match-schedule-section {
        padding: 15px;
        margin-top: 15px;
    }
    
    .match-schedule {
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    .match-item {
        padding: 10px;
        gap: 8px;
    }
    
    .match-teams {
        gap: 8px;
        font-size: 0.8rem;
    }
    
    .team {
        font-size: 0.75rem;
        padding: 5px 8px;
        min-width: 80px;
        max-width: 120px;
    }
    
    /* 기록 보기 반응형 */
    .records-container {
        padding: 15px 10px;
    }
    
    .period-filter-buttons {
        gap: 6px;
        margin-bottom: 16px;
    }
    
    .period-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* 통계탭과 기록탭 기간 선택 버튼 - 동일하게 적용 (한 줄로) */
    .stats-period-filter-container {
        padding: 6px !important;
    }
    
    .stats-period-filter-buttons {
        gap: 6px !important;
        flex-wrap: nowrap !important; /* 한 줄로 표시 */
    }
    
    .stats-period-btn {
        padding: 8px 10px !important; /* 패딩 줄여서 한 줄에 맞춤 */
        font-size: 0.8rem !important; /* 폰트 크기 약간 줄임 */
        font-weight: 500 !important;
        flex: 1 !important; /* 균등하게 분배 */
        min-width: 0 !important; /* 최소 너비 제한 제거 */
        white-space: nowrap !important; /* 텍스트 줄바꿈 방지 */
        text-align: center !important;
        box-sizing: border-box !important;
        height: 32px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .records-container .stats-period-filter-container {
        padding: 6px !important;
    }
    
    .records-container .stats-period-filter-buttons {
        gap: 6px !important;
        flex-wrap: nowrap !important; /* 한 줄로 표시 */
    }
    
    .records-container .stats-period-btn {
        padding: 8px 10px !important; /* 패딩 줄여서 한 줄에 맞춤 */
        font-size: 0.8rem !important; /* 폰트 크기 약간 줄임 */
        font-weight: 500 !important;
        flex: 1 !important; /* 균등하게 분배 */
        min-width: 0 !important; /* 최소 너비 제한 제거 */
        white-space: nowrap !important; /* 텍스트 줄바꿈 방지 */
        text-align: center !important;
        box-sizing: border-box !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .custom-period-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .records-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .record-date-time {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        width: 100% !important;
    }
    
    .record-date {
        display: block !important;
        width: 100% !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    .record-time {
        display: block !important;
        width: 100% !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-top: 2px !important; /* 날짜와 시간 사이 간격 */
    }
    
    .record-card {
        padding: 14px;
    }
    
    .team-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .team-names {
        font-size: 13px;
    }
    
    .team-score {
        font-size: 16px;
    }
    
    /* 랭킹 탭 반응형 - 모바일에서 메달 카드 세로 크기를 현재의 2배로 조정 */
    .medal-ceremony-section .podium-wrapper {
        flex-direction: row !important;
        align-items: flex-end !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 15px 8px !important;
        min-height: 216px !important; /* 1위 카드(186px) + 위아래 여백 */
        max-height: 230px !important; /* 1위 카드(186px) + 위아래 여백 */
        height: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .medal-ceremony-section .podium-card {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        width: 100px !important; /* 너비는 유지 */
        max-width: 100px !important;
        height: 160px !important; /* 현재의 2배 - 명시적 설정 */
        min-height: 160px !important; /* 현재의 2배 */
        padding: 12px 8px !important;
        gap: 8px !important;
    }
    
    .medal-ceremony-section .podium-card.first-place {
        width: 110px !important; /* 너비는 유지 */
        min-width: 100px !important;
        max-width: 110px !important;
        min-height: 186px !important; /* 현재의 2배 */
        max-height: 200px !important; /* 현재의 2배 */
        height: 186px !important; /* 현재의 2배 - 명시적 설정 */
        order: 2 !important;
    }
    
    .medal-ceremony-section .podium-card.second-place {
        width: 100px !important; /* 너비는 유지 */
        min-width: 90px !important;
        max-width: 100px !important;
        min-height: 174px !important; /* 현재의 2배 */
        max-height: 186px !important; /* 현재의 2배 */
        height: 174px !important; /* 현재의 2배 - 명시적 설정 */
        order: 1 !important;
    }
    
    .medal-ceremony-section .podium-card.third-place {
        width: 100px !important; /* 너비는 유지 */
        min-width: 90px !important;
        max-width: 100px !important;
        min-height: 160px !important; /* 현재의 2배 */
        max-height: 174px !important; /* 현재의 2배 */
        height: 160px !important; /* 현재의 2배 - 명시적 설정 */
        order: 3 !important;
    }
    
    .medal-icon {
        font-size: 2rem !important; /* 모바일에서 더 크게 */
        margin-bottom: 8px !important;
    }
    
    .medal-number {
        font-size: 1rem !important; /* 모바일에서 더 크게 */
    }
    
    .podium-name {
        font-size: 0.9rem !important; /* 모바일에서 더 크게 */
        margin-top: 6px !important;
    }
    
    .podium-score {
        font-size: 0.8rem !important; /* 모바일에서 더 크게 */
        margin-top: 4px !important;
    }
    
    .rank-tiers {
        gap: 10px;
    }
    
    .rank-tier-card {
        padding: 14px;
    }
    
    .rank-tier-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        overflow: hidden;
    }
    
    .rank-tier-icon::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transform: rotate(45deg);
        transition: all 0.5s ease;
        opacity: 0;
    }
    
    .rank-tier-card:hover .rank-tier-icon::before {
        opacity: 1;
        animation: shine 1.5s ease-in-out;
    }
    
    .beginner-icon {
        background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
        color: #2e7d32;
        border: 2px solid #66bb6a;
        box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
    }
    
    .beginner-icon i {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }
    
    .player-icon {
        background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
        box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
    }
    
    .player-icon i {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    
    .pro-icon {
        background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
        color: #333;
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    }
    
    .pro-icon i {
        filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.8));
        animation: sparkle 2s ease-in-out infinite;
    }
    
    .champion-icon {
        background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
        box-shadow: 0 6px 25px rgba(205, 127, 50, 0.5), inset 0 2px 10px rgba(255, 255, 255, 0.2);
    }
    
    .champion-icon i {
        color: #ffd700;
        font-size: 1.9rem;
        filter: drop-shadow(0 3px 8px rgba(255, 215, 0, 0.6));
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    
    .master-icon {
        background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
        box-shadow: 0 6px 25px rgba(192, 192, 192, 0.5), inset 0 2px 10px rgba(255, 255, 255, 0.3);
    }
    
    .master-icon i {
        color: #ffffff;
        font-size: 1.9rem;
        filter: drop-shadow(0 3px 8px rgba(255, 255, 255, 0.6));
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    
    .legend-icon {
        background: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ff8c00 100%);
        box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6), inset 0 2px 10px rgba(255, 255, 255, 0.4);
    }
    
    .legend-icon i {
        color: #fff;
        font-size: 2.1rem;
        filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.8));
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
        animation: glow 2s ease-in-out infinite alternate;
    }
    
    .goat-icon {
        background: linear-gradient(135deg, #991b1b 0%, #ffd700 50%, #991b1b 100%);
        background-size: 200% 200%;
        animation: gradient-shift 3s ease infinite;
        box-shadow: 0 10px 40px rgba(153, 27, 27, 0.6), 0 0 30px rgba(255, 215, 0, 0.5), inset 0 2px 15px rgba(255, 255, 255, 0.4);
    }
    
    .goat-icon i {
        color: #fff;
        font-size: 2.3rem;
        filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 1));
        text-shadow: 0 0 20px rgba(255, 255, 255, 1);
        animation: goat-glow 2s ease-in-out infinite alternate, rotate-glow 4s linear infinite;
    }
    
    .rank-tier-card.goat-card {
        background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
        border: 2px solid #ffd700;
    }
    
    .rank-tier-card.legend-card {
        background: linear-gradient(135deg, #fffef0 0%, #fffce8 100%);
        border: 2px solid #ffd700;
    }
    
    .rank-tier-card.master-card {
        background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
        border: 2px solid #c0c0c0;
    }
    
    .rank-tier-card.champion-card {
        background: linear-gradient(135deg, #fff8f0 0%, #ffe8d6 100%);
        border: 2px solid #cd7f32;
    }
    
    .rank-tier-card.pro-card {
        background: linear-gradient(135deg, #fffef0 0%, #fffce8 100%);
        border: 2px solid #ffd700;
    }
    
    .rank-tier-card.player-card {
        background: linear-gradient(135deg, #fff0f8 0%, #ffe0f0 100%);
        border: 2px solid #ff69b4;
    }
    
    .performer-item {
        padding: 10px 12px;
        padding-right: 20px;
        gap: 0 !important; /* gap 제거 - margin으로 개별 제어 */
        flex-wrap: nowrap;
    }
    
    .performer-rank {
        width: 25px;
        font-size: 1rem;
        flex-shrink: 0;
        margin-right: 6px !important; /* 순위와 아이콘 사이 간격 */
    }
    
    .performer-icon {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-right: 16px !important; /* 모바일: 계급/아이콘과 이름 사이 간격 넓히기 */
    }
    
    .performer-name {
        flex: 0 0 auto;
        font-size: 0.9rem;
        min-width: 60px;
        max-width: 100px;
        margin-right: 4px !important; /* 모바일: 이름과 점수 사이 간격 좁히기 (gap 대신 margin 사용) */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        order: 0;
    }
    
    .performer-score {
        font-size: 0.8rem;
        width: 55px;
        flex-shrink: 0;
        text-align: right;
        margin-left: 0 !important; /* 모바일: 이름과 점수 사이 간격 좁히기 */
        margin-right: 4px !important; /* 점수와 승률 사이 간격 */
    }
    
    .performer-winrate {
        font-size: 0.8rem;
        width: 50px;
        flex-shrink: 0;
        text-align: right;
        margin-left: 4px !important; /* 승률과 기록 사이 간격 */
        margin-right: 4px !important;
    }
    
    .performer-record {
        font-size: 0.8rem;
        width: 45px;
        flex-shrink: 0;
        text-align: right;
        margin-left: 0 !important;
    }
    
    .match-score {
        gap: 6px;
        margin-top: 6px;
    }
    
    .score-input {
        width: 40px;
        padding: 5px;
        font-size: 0.85rem;
    }
    
    .save-score-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .match-round {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .match-round h4 {
        font-size: 0.9rem;
    }
    
    /* 대진표 반응형 */
    .time-slot-matches {
        margin-bottom: 20px !important;
        border-radius: 16px !important;
        border-width: 2px !important;
    }
    
    .time-slot-matches .time-slot-header {
        padding: 12px 16px !important;
    }
    
    .time-slot-matches .time-slot-title {
        font-size: 0.95rem !important;
        gap: 8px !important;
    }
    
    .time-slot-matches .time-slot-title i {
        font-size: 1rem !important;
    }
    
    .time-slot-matches .time-slot-content {
        padding: 16px !important;
    }
    
    .time-slot-matches .court-section {
        margin-bottom: 15px !important;
    }
    
    .time-slot-matches .court-title {
        font-size: 0.85rem !important;
        padding: 6px 10px !important;
        margin-bottom: 8px !important;
    }
    
    .time-slot-matches .court-matches {
        gap: 6px !important;
    }
    
    .time-slot-matches .match-item-small {
        padding: 8px !important;
        gap: 6px !important;
    }
    
    .time-slot-matches .match-round-label {
        font-size: 0.7rem !important;
        padding: 2px 6px !important;
    }
    
    .time-slot-matches .match-teams-small {
        gap: 6px !important;
    }
    
    .time-slot-matches .team-small {
        font-size: 0.7rem !important;
        padding: 4px 6px !important;
        min-width: 70px !important;
        max-width: 110px !important;
    }
    
    .time-slot-matches .team-vs-small {
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
    }
    
    .time-slot-matches .match-score-small {
        gap: 4px !important;
        margin-top: 4px !important;
    }
    
    .time-slot-matches .score-input-small {
        width: 35px !important;
        padding: 3px !important;
        font-size: 0.75rem !important;
    }
    
    .time-slot-matches .save-score-btn-small {
        padding: 3px 8px !important;
        font-size: 0.7rem !important;
    }
    
    .time-slot-matches .match-status-small {
        padding: 2px 6px !important;
        font-size: 0.65rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-icon {
        font-size: 6rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .feature-card {
        padding: 30px 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    /* 대진표 작은 모바일 반응형 */
    .time-slot-matches {
        margin-bottom: 15px !important;
        border-radius: 10px !important;
        overflow: visible !important; /* 내용이 잘리지 않도록 */
    }
    
    .time-slot-header {
        padding: 10px 12px !important;
    }
    
    .time-slot-title {
        font-size: 0.85rem !important;
        gap: 6px !important;
    }
    
    .time-slot-title i {
        font-size: 0.9rem !important;
    }
    
    .time-slot-content {
        padding: 12px !important;
        overflow: visible !important; /* 내용이 잘리지 않도록 */
    }
    
    /* 대진표 컨테이너 모바일 여백 확보 */
    .matches-container {
        padding: 0 6px 160px 6px !important; /* 모바일 하단 탭바를 위한 여백 증가 */
    }
    
    /* 대진표 섹션 모바일 여백 확보 */
    .match-schedule-section {
        margin-bottom: 20px !important; /* 하단 여백 확보 */
    }
}

/* PC 스타일 - 화면이 넓을 때 네비게이션 바 조정 */
@media (min-width: 481px) {
    .nav-container {
        max-width: 480px !important; /* PC에서도 모바일 사이즈로 제한 */
        width: 100% !important;
        margin: 8px auto !important; /* 중앙 정렬 */
        padding: 0 12px !important;
        height: 60px !important; /* PC에서도 높이 고정 */
    }
    
    .nav-logo {
        font-size: 0.95rem; /* PC에서는 약간 더 작게 */
        flex-wrap: nowrap !important; /* 강제 한 줄 */
        gap: 6px; /* 간격 약간 증가 */
    }
    
    .nav-logo i {
        font-size: 1.1rem; /* PC에서는 약간 더 작게 */
        margin-right: 4px;
    }
    
    .version-badge {
        font-size: 0.7rem; /* PC에서는 더 작게 */
        padding: 2px 5px;
        margin-left: 6px;
    }
    
    .nav-user-info {
        font-size: 0.8rem; /* PC에서는 약간 더 작게 */
        margin-left: 16px; /* 버전 배지와 간격 늘리기 (6px -> 16px) */
        max-width: 180px; /* PC에서는 더 넓게 표시 가능 */
    }
}

/* Tablet Styles - Lenovo P11 등 대형 태블릿 지원 */
@media (min-width: 769px) and (max-width: 2000px) {
    .hero {
        padding: 80px 0;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-icon {
        font-size: 12rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reservation-card {
        max-width: 500px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 플레이어 전적 (Head-to-Head) 스타일 ==================== */

.h2h-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.h2h-title h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.h2h-title h3 i {
    color: #dc2626;
}

.h2h-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.h2h-stat-card {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.h2h-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.h2h-stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.h2h-stat-value.win {
    color: #4ade80;
}

.h2h-stat-value.loss {
    color: #f87171;
}

.h2h-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.h2h-matches-section {
    margin-top: 30px;
}

.h2h-matches-section h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.h2h-matches-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.h2h-match-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #e0e0e0;
}

.h2h-match-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateX(5px);
}

.h2h-match-item.match-won {
    border-left-color: #4ade80;
    background: linear-gradient(to right, rgba(74, 222, 128, 0.05), white);
}

.h2h-match-item.match-lost {
    border-left-color: #f87171;
    background: linear-gradient(to right, rgba(248, 113, 113, 0.05), white);
}

.h2h-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.h2h-match-date {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.h2h-match-result {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.h2h-match-result.match-won {
    background: #4ade80;
    color: white;
}

.h2h-match-result.match-lost {
    background: #f87171;
    color: white;
}

.h2h-match-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.h2h-team {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #f5f7fa;
}

.h2h-team.current-team {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(153, 27, 27, 0.1));
    border: 2px solid #dc2626;
    font-weight: 600;
}

.h2h-team-label {
    font-weight: 600;
    color: #dc2626;
    min-width: 50px;
}

.h2h-team-players {
    flex: 1;
    color: #333;
}

.h2h-team-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #dc2626;
    min-width: 30px;
    text-align: right;
}

.h2h-match-info {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
}

.h2h-court-info,
.h2h-round-info {
    padding: 5px 10px;
    background: #e0e0e0;
    border-radius: 15px;
    font-weight: 500;
}

/* 플레이어 이름 클릭 가능 스타일 */
.player-name-clickable {
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.player-name-clickable:hover {
    background-color: rgba(220, 38, 38, 0.1);
    text-decoration: none;
    transform: scale(1.05);
}

/* 통계 탭 전적 섹션 스타일 */
.player-h2h-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.h2h-selector-container {
    margin: 20px 0;
}

.h2h-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.h2h-label {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.h2h-label i {
    color: #dc2626;
}

.h2h-player-select {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.h2h-player-select:focus {
    outline: none;
    border-color: #dc2626;
}

.h2h-stats-display {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .h2h-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .h2h-stat-value {
        font-size: 1.5rem;
    }
    
    .h2h-match-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .h2h-team {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .h2h-team-score {
        text-align: left;
    }
    
    .h2h-selector-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .h2h-player-select {
        width: 100%;
    }
}

/* ==================== 토너먼트 관련 스타일 ==================== */

.tournament-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tournament-reservation-section,
.tournament-active-section,
.tournament-history-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tournament-reservation-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tournaments-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tournament-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.tournament-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2196F3 0%, #21CBF3 50%, #2196F3 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tournament-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #2196F3;
}

.tournament-card:hover::before {
    opacity: 1;
}

.tournament-card.active {
    border-color: #2196F3;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
}

.tournament-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.tournament-card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.tournament-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.tournament-status.pending {
    background: #fff3cd;
    color: #856404;
}

.tournament-status.in_progress {
    background: #d1ecf1;
    color: #0c5460;
}

.tournament-status.completed {
    background: #d4edda;
    color: #155724;
}

.tournament-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tournament-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #666;
    font-size: 0.95em;
}

.tournament-info > div {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.5;
}

.tournament-info i {
    color: #2196F3;
    width: 20px;
}

.tournament-winner-info {
    color: #333 !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    padding: 6px 10px !important;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 50%, #fff9e6 100%) !important;
    border-radius: 6px !important;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.2) !important;
    min-width: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    height: auto !important;
}

.tournament-winner-info::before {
    display: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.tournament-winner-info .trophy-emoji {
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    line-height: 1.2rem !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}

.tournament-winner-info .winner-team-name {
    font-weight: 700;
    color: #212529;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    line-height: 1.2rem;
    display: flex;
    align-items: center;
}

.tournament-winner-info .winner-players {
    color: #212529 !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    margin-left: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    line-height: 1.2rem !important;
    display: inline-block !important;
    text-align: left !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.tournament-runnerup-info {
    color: #333 !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    padding: 6px 10px !important;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f5f5f5 100%) !important;
    border-radius: 6px !important;
    border: 2px solid #c0c0c0 !important;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.2) !important;
    min-width: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    height: auto !important;
}

.tournament-runnerup-info .medal-emoji {
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    line-height: 1.2rem !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}

.tournament-runnerup-info .runnerup-team-name {
    font-weight: 700 !important;
    color: #212529 !important;
    font-size: 0.85rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    line-height: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tournament-runnerup-info .runnerup-players {
    color: #212529 !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    margin-left: 3px !important;
    white-space: normal !important;
    word-break: break-word !important;
    flex: 1 !important;
    min-width: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    line-height: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.tournament-registered-badge {
    color: #4caf50;
    font-weight: 600;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tournament-registered-badge i {
    color: #4caf50;
}

.tournament-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
    align-items: center;
}

.tournament-card .btn-outline {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    color: white;
    border: 2px solid #2196F3;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
}

.tournament-card .btn-outline:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1BA8D4 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* 토너먼트 대진표 모달 */
.tournament-modal-content {
    max-width: 95vw;
    max-height: 95vh;
    width: 100%;
}

.tournament-modal-body {
    overflow-y: auto;
    max-height: calc(95vh - 120px);
    padding: 20px;
}

.tournament-bracket-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px;
}

/* 양쪽 분산형 대진표 */
.tournament-bracket-split {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow-x: auto;
    max-width: 100%;
    min-height: 400px;
}

.bracket-side {
    display: flex;
    flex-direction: row;
    gap: 60px;
    flex: 0 0 auto;
    min-width: 140px;
    justify-content: center;
    align-items: center;
    position: relative;
}

.bracket-center {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    flex-grow: 0;
    min-width: 200px;
    width: 200px;
    max-width: 200px;
    margin: 0;
    justify-content: center;
    align-self: center;
}

/* 가로형 대진표 (기존 호환성 유지) */
.tournament-bracket-horizontal {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
    min-width: fit-content;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow-x: auto;
}

.bracket-round-split {
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    flex-shrink: 0;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

/* MLB 월드시리즈 스타일: 세로 연결선 제거 (각 매치가 직접 연결) */

.bracket-round-split.round-final {
    align-items: center;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

/* 라운드가 진행될수록 가운데로 수렴 */
.bracket-left .bracket-round-split:last-child {
    align-items: flex-end;
}

.bracket-right .bracket-round-split:last-child {
    align-items: flex-start;
}

.bracket-round-horizontal {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 220px;
    position: relative;
    flex-shrink: 0;
}

/* 라운드 간 연결선 - 세로선 */
.bracket-round-horizontal:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #2196F3 0%, #1976D2 100%);
    z-index: 1;
}

/* 매치에서 다음 라운드로 가는 연결선 - 가로선 */
.bracket-match-horizontal {
    position: relative;
}

.bracket-round-horizontal:not(:last-child) .bracket-match-horizontal::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #2196F3 0%, #1976D2 100%);
    transform: translateY(-50%);
    z-index: 2;
}

.round-header-split {
    text-align: center;
    margin-bottom: 2px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: transparent;
    padding: 1px 0;
    width: 100%;
    min-width: 160px;
    max-width: 160px;
}

.round-header-split h3 {
    margin: 0;
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    padding: 3px 8px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-radius: 4px;
    border: none;
    box-shadow: 0 1px 4px rgba(33, 150, 243, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.2px;
    width: 100%;
    box-sizing: border-box;
    display: inline-block;
}

.round-header-horizontal {
    text-align: center;
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: transparent;
    padding: 5px 0;
}

.round-header-horizontal h3 {
    margin: 0;
    color: #fff;
    font-size: 1.3em;
    font-weight: 700;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.round-matches-split {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    position: relative;
}

.round-matches-horizontal {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 20px 0;
}

.bracket-match-split {
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 4px;
    padding: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    min-width: 160px;
    max-width: 160px;
    position: relative;
    z-index: 2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 연결선 기능 제거됨 */

.bracket-match-split.bye {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

/* 우승팀 경로 강조 스타일 - 팀 박스만 강조 */
.match-team-split.champion-path {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    border: 2px solid #ff9800 !important;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.5) !important;
    transform: scale(1.03);
    font-weight: 700;
}

.match-team-split.champion-path .team-name-split {
    color: #856404;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(133, 100, 4, 0.2);
}

.match-team-split.champion-path .team-score-split {
    color: #ff6f00;
    font-weight: 900;
}

.bracket-match-horizontal {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    min-width: 200px;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bracket-match-horizontal:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    border-color: #2196F3;
}

.bracket-match-horizontal.completed {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.bracket-match-horizontal.bye {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.match-team-split {
    display: flex;
    flex-direction: column;
    padding: 2px 3px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 3px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
    min-height: 30px;
    justify-content: center;
    align-items: center;
    border: 1px solid #e9ecef;
    position: relative;
}

.match-team-split:last-child {
    margin-bottom: 0;
}

.match-team-split.empty {
    background: #f0f0f0;
    border-color: #d0d0d0;
    opacity: 0.6;
    min-height: 32px;
}

.match-team-split .team-name-split.empty-team {
    color: #999;
    font-style: italic;
    font-size: 0.7em;
    text-align: center;
    padding: 0;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-team-split.winner {
    background: linear-gradient(135deg, #fff9c4 0%, #fffde7 100%);
    border: 2px solid #ffd700;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
    transform: scale(1.02);
}

.match-team-split.winner::before {
    display: none; /* 트로피를 HTML로 직접 추가하므로 제거 */
}

.match-team-split.winner .team-name-split {
    padding-right: 0; /* 트로피가 점수 앞에 있으므로 제거 */
}

.match-team-split.loser {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 1px solid #d0d0d0;
    opacity: 0.7;
}

.match-team-split.loser .team-name-split {
    color: #666;
    font-weight: 500;
}

.match-team-split.loser .team-score-split {
    color: #888;
}

.match-team-split .team-name-split {
    font-weight: 600;
    color: #212529;
    font-size: 0.72em;
    margin-bottom: 0;
    letter-spacing: 0.05px;
    line-height: 1.3;
    word-break: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    text-align: center;
    width: 100%;
    display: block;
    align-self: center;
}

.match-team-split .team-name-split.empty-team {
    color: #999;
    font-style: italic;
    font-size: 0.7em;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-team-split .team-players-split {
    font-size: 0.65em;
    color: #6c757d;
    margin-bottom: 2px;
    line-height: 1.2;
}

.team-score-wrapper-split {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
    width: 100%;
    flex-shrink: 0;
}

.trophy-icon-split {
    font-size: 0.9em;
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.match-team-split .team-score-split {
    font-size: 1em;
    font-weight: 800;
    color: #2196F3;
    text-align: center;
    text-shadow: 0 1px 2px rgba(33, 150, 243, 0.2);
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-vs-split {
    text-align: center;
    font-weight: 700;
    color: #6c757d;
    padding: 1px 0;
    font-size: 0.65em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.7;
}

.match-bye-split {
    text-align: center;
    font-weight: 700;
    color: #ff9800;
    padding: 2px 4px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 4px;
    font-size: 0.6em;
    border: 1px solid #ffb74d;
}

.match-actions-split {
    margin-top: 3px;
    text-align: center;
}

.match-actions-split .btn {
    padding: 4px 8px;
    font-size: 0.75em;
}

.match-team-horizontal {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    min-height: 70px;
    justify-content: center;
    border: 1px solid #e9ecef;
    position: relative;
}

.match-team-horizontal:last-child {
    margin-bottom: 0;
}

.match-team-horizontal.winner {
    background: linear-gradient(135deg, #fff9c4 0%, #fffde7 100%);
    border: 2px solid #ffd700;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    transform: scale(1.02);
}

.match-team-horizontal.winner::before {
    content: '🏆';
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 1.2em;
}

.match-team-horizontal .team-name-horizontal {
    font-weight: 700;
    color: #212529;
    font-size: 1.1em;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.match-team-horizontal .team-players-horizontal {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 6px;
    line-height: 1.4;
}

.match-team-horizontal .team-score-horizontal {
    font-size: 1.5em;
    font-weight: 800;
    color: #2196F3;
    text-align: center;
    margin-top: 6px;
    text-shadow: 0 1px 2px rgba(33, 150, 243, 0.2);
}

.match-vs-horizontal {
    text-align: center;
    font-weight: 700;
    color: #6c757d;
    padding: 8px 0;
    font-size: 0.95em;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

.match-bye-horizontal {
    text-align: center;
    font-weight: 700;
    color: #ff9800;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 8px;
    font-size: 0.9em;
    border: 1px solid #ffb74d;
}

.match-actions-horizontal {
    margin-top: 8px;
    text-align: center;
}

.final-winner-split,
.final-runnerup-split {
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    min-width: 200px;
    max-width: 200px;
}

.final-winner-split {
    border: 3px solid #ff9800;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #fff9c4 100%);
    box-shadow: 0 5px 20px rgba(255, 152, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.3);
    transform: scale(1.05);
    position: relative;
    overflow: visible;
    animation: championGlow 2s ease-in-out infinite alternate;
}

@keyframes championGlow {
    0% {
        box-shadow: 0 5px 20px rgba(255, 152, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.3);
    }
    100% {
        box-shadow: 0 5px 25px rgba(255, 152, 0, 0.7), 0 0 40px rgba(255, 215, 0, 0.5);
    }
}

/* 우승컵 연결선 제거 (MLB 스타일) */

.final-winner-split::before {
    content: '👑';
    display: block;
    font-size: 1.2em;
    margin-bottom: 4px;
}

/* 우승컵 연결선 제거 (MLB 스타일) */

.final-runnerup-split {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.final-runnerup-split::before {
    content: '🥈';
    display: block;
    font-size: 1.2em;
    margin-bottom: 4px;
}

.final-label-split {
    font-weight: 700;
    color: #495057;
    font-size: 0.7em;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.final-winner-split .final-label-split {
    color: #856404;
}

.final-team-split {
    font-size: 0.8em;
    font-weight: 800;
    color: #212529;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.5;
    word-break: break-word;
}

.final-winner-split .final-team-split {
    color: #856404;
    text-shadow: 0 1px 2px rgba(133, 100, 4, 0.2);
}

/* 우승/준우승 영역 (기존 호환성 유지) */
.bracket-final-horizontal {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 220px;
    margin-left: 30px;
    flex-shrink: 0;
}

.final-winner,
.final-runnerup {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.final-winner {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fff9c4 0%, #fffde7 100%);
    box-shadow: 0 6px 24px rgba(255, 215, 0, 0.3);
    transform: scale(1.05);
}

.final-winner::before {
    content: '👑';
    display: block;
    font-size: 2em;
    margin-bottom: 10px;
}

.final-runnerup {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.final-runnerup::before {
    content: '🥈';
    display: block;
    font-size: 2em;
    margin-bottom: 10px;
}

.final-label {
    font-weight: 700;
    color: #495057;
    font-size: 1em;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.final-winner .final-label {
    color: #856404;
}

.final-team {
    font-size: 1.2em;
    font-weight: 800;
    color: #212529;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.final-winner .final-team {
    color: #856404;
    text-shadow: 0 2px 4px rgba(133, 100, 4, 0.2);
}

/* 기존 세로형 대진표 (호환성 유지) */
.tournament-bracket {
    display: flex;
    gap: 40px;
    padding: 20px;
    min-width: fit-content;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 280px;
}

.round-header {
    text-align: center;
    margin-bottom: 10px;
}

.round-header h3 {
    margin: 0;
    color: #2196F3;
    font-size: 1.3em;
    font-weight: 600;
    padding: 10px;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border-radius: 8px;
}

.round-matches {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.bracket-match {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    min-width: 260px;
}

.bracket-match:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bracket-match.completed {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
}

.bracket-match.bye {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.match-team.winner {
    background: linear-gradient(135deg, #fff9c4 0%, #ffffff 100%);
    border: 2px solid #ffd700;
    font-weight: 600;
}

.match-team .team-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.match-team .team-players {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}

.match-team .team-score {
    font-size: 1.5em;
    font-weight: 700;
    color: #2196F3;
    min-width: 40px;
    text-align: center;
}

.match-vs {
    text-align: center;
    font-weight: 600;
    color: #999;
    padding: 8px 0;
}

.match-bye {
    text-align: center;
    font-weight: 600;
    color: #ff9800;
    padding: 8px 0;
    background: #fff3e0;
    border-radius: 8px;
}

.match-actions {
    margin-top: 12px;
    text-align: center;
}

/* 우승자 모달 */
.tournament-winner-modal-content {
    max-width: 600px;
}

.tournament-winner-body {
    text-align: center;
    padding: 40px 20px;
}

.winner-celebration {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.winner-trophy {
    font-size: 80px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.winner-team-name {
    font-size: 2em;
    font-weight: 700;
    color: #ff9800;
    margin: 0;
}

.winner-message {
    font-size: 1.2em;
    color: #666;
    margin: 0;
}

.winner-details {
    margin-top: 20px;
}

.winner-players {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.winner-player {
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.winner-player i {
    color: #2196F3;
}

/* 태블릿 (768px ~ 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .tournament-bracket-horizontal {
        gap: 30px;
        padding: 20px;
    }
    
    .bracket-round-horizontal {
        min-width: 180px;
    }
    
    .bracket-match-horizontal {
        min-width: 160px;
        padding: 12px;
    }
    
    .bracket-final-horizontal {
        min-width: 180px;
        margin-left: 20px;
    }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
    .tournament-bracket-container {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding: 5px;
        width: 100%;
    }
    
    .tournament-bracket-split {
        flex-direction: row;
        gap: 12px;
        padding: 12px;
        min-width: max-content;
        width: max-content;
    }
    
    .bracket-side {
        width: auto;
        min-width: 140px;
        flex-shrink: 0;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .bracket-center {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
        margin: 0 auto;
        flex-shrink: 0;
    }
    
    .bracket-round-split {
        width: 145px;
        min-width: 145px;
        max-width: 145px;
    }
    
    .bracket-match-split {
        min-width: 145px;
        max-width: 145px;
        padding: 3px;
    }
    
    .round-header-split {
        width: 100%;
        min-width: 145px;
        max-width: 145px;
    }
    
    .round-header-split h3 {
        font-size: 0.85em;
        padding: 6px 10px;
        width: 100%;
        box-sizing: border-box;
        display: inline-block;
    }
    
    .match-team-split {
        min-height: 55px;
        padding: 8px;
    }
    
    .match-team-split .team-name-split {
        font-size: 0.8em;
    }
    
    .match-team-split .team-players-split {
        font-size: 0.7em;
    }
    
    .bracket-final-split {
        min-width: 130px;
    }
    
    .final-winner-split,
    .final-runnerup-split {
        padding: 12px;
        min-width: 180px;
        max-width: 180px;
    }
    
    .final-team-split {
        font-size: 0.9em;
        white-space: normal;
        word-break: break-word;
    }
    
    .tournament-bracket-horizontal {
        flex-direction: column;
        gap: 30px;
        padding: 15px;
        background: linear-gradient(180deg, #f5f7fa 0%, #e8ecf1 100%);
    }
    
    .bracket-round-horizontal {
        min-width: 100%;
        width: 100%;
    }
    
    .bracket-round-horizontal:not(:last-child)::after {
        display: none;
    }
    
    .bracket-round-horizontal:not(:last-child) .bracket-match-horizontal::after {
        display: none;
    }
    
    .round-header-horizontal h3 {
        font-size: 1.1em;
        padding: 10px 16px;
    }
    
    .bracket-match-horizontal {
        min-width: 100%;
        padding: 14px;
    }
    
    .match-team-horizontal {
        padding: 12px;
        min-height: 65px;
    }
    
    .bracket-final-horizontal {
        margin-left: 0;
        margin-top: 20px;
        min-width: 100%;
        width: 100%;
    }
    
    .final-winner,
    .final-runnerup {
        padding: 18px;
    }
    
    .final-team {
        font-size: 1.2em;
    }
    
    .tournament-bracket {
        flex-direction: column;
        gap: 30px;
    }
    
    .bracket-round {
        min-width: 100%;
    }
    
    .tournament-reservation-form {
        grid-template-columns: 1fr;
    }
    
    .tournaments-list {
        grid-template-columns: 1fr;
    }
    
    .tournament-card-actions {
        flex-direction: column;
    }
    
    .tournament-card-actions .btn {
        width: 100%;
    }
}