/* ===========================================
   UNIFIED KBO 매직넘버 계산기 - CSS 스타일
   =========================================== */

/* 전체 문서에 Noto Sans KR 폰트 적용 */
html {
    font-family: 'Noto Sans KR', sans-serif;
    overflow-x: hidden; /* 전체 페이지 가로 스크롤 방지 */
}

body {
    overflow-x: hidden; /* body 가로 스크롤 방지 */
    max-width: 100vw;   /* 뷰포트 너비 초과 방지 */
    margin: 0;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ===========================================
       PRIMARY COLOR SYSTEM
       =========================================== */
    --primary-color: #1a237e;
    --primary-hover: #303f9f;
    --secondary-color: #3949ab;
    --accent-color: #ff6b6b;
    /* STATUS COLORS */
    --success-color: #16a34a;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --info-color: #0ea5e9;
    /* BACKGROUND COLORS */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    /* TEXT COLORS */
    --text-primary: #666;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    /* BORDER COLORS */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-strong: #cbd5e1;
    /* SHADOWS */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 32px rgba(0,0,0,0.15);
    /* 통일된 폰트 시스템 - Noto Sans KR */
    --font-family-unified: 'Noto Sans KR', sans-serif;
    /* 폰트 크기 시스템 */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.85rem;    /* 13.6px */
    --text-base: 0.9rem;   /* 14.4px - 기본 */
    --text-lg: 1.1rem;     /* 17.6px */
    --text-xl: 1.3rem;     /* 20.8px */
    --text-2xl: 1.8rem;    /* 28.8px - 키움 */
    --text-3xl: 2rem;      /* 32px */
    /* 폰트 굵기 시스템 */
    --weight-normal: 400;
    --weight-medium: 500; 
    --weight-bold: 700;
    /* ===========================================
       SPACING SYSTEM
       =========================================== */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    /* ===========================================
       COMPONENT SIZES
       =========================================== */
    --container-max-width: 1400px;
    --card-border-radius: 12px;
    --button-border-radius: 6px;
    --input-border-radius: 6px;
    
    /* 데이터 그라데이션 색상 */
    --data-gradient-green: #16a34a;
    --data-gradient-red: #dc2626;
    --data-gradient-neutral: #6b7280;
    /* 분석 테이블 공통 변수 (루트 index와 동일) */
    --positive-bg-light: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(22, 163, 74, 0.08) 100%);
    --positive-bg-medium: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.15) 100%);
    --positive-bg-strong: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.25) 100%);
    --positive-color: #059669;
    --negative-bg-light: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.08) 100%);
    --negative-bg-medium: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.15) 100%);
    --negative-bg-strong: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.25) 100%);
    --negative-color: #dc2626;
    --neutral-bg-light: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(245, 158, 11, 0.12) 100%);
    --neutral-bg-medium: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(245, 158, 11, 0.25) 100%);
    --neutral-bg-strong: linear-gradient(135deg, rgba(255, 193, 7, 0.3) 0%, rgba(245, 158, 11, 0.35) 100%);
    --neutral-color: #f59e0b;
    --default-bg: #f8f9fa;
    --default-color: #666;
    /* KBO 특화 색상 */
    --kbo-blue: #1a237e;
    --kbo-light-blue: #3949ab;
}

/* ===========================================
   BASE STYLES
   =========================================== */

body {
    background: #f5f7fa;
    color: #666;
    min-height: 100vh;
    font-size: 0.85rem;          /* 상대전적 메인 크기 */
    font-weight: 500;            /* 기본 굵기 (볼드 아님) */
    line-height: 1.3;            /* 상대전적 줄간격 */
}

/* ===========================================
   LAYOUT COMPONENTS
   =========================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--space-5);
    width: 100%;
}

/* ===========================================
   HEADER COMPONENT
   =========================================== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-inverse);
    padding: var(--space-5) 0 var(--space-4) 0;
    margin: 0;
    box-shadow: var(--shadow-md);
}

.header h1 {
    text-align: center;
    color: var(--text-inverse);
    margin: 0 0 var(--space-3) 0;
    font-size: var(--text-3xl) !important;
    font-weight: var(--weight-bold);
    line-height: 1.25;
}

.header .subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-xl);
    line-height: 1.75;
    margin: 0;
}
/* ===========================================
   NAVIGATION COMPONENT - 스티키 헤더 통합 설정
   =========================================== */
.navigation {
    position: relative;
    background: rgba(245, 247, 250, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    margin-bottom: var(--space-4);
    width: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    transition: all 0.3s ease;
}

.navigation.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 모바일 네비게이션 */
@media (max-width: 768px) {
    .navigation {
        margin-bottom: var(--space-2);
        padding: 6px 0;
    }
}

.nav-menu {
    display: flex;
    gap: var(--space-5);
    list-style: none;
    margin: 0 auto;
    padding: var(--space-2) 0;
    background: transparent;
    border: none;
    flex-wrap: nowrap;
    overflow: visible;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 1200px;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: var(--weight-medium);
    font-size: var(--text-base);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--button-border-radius);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.nav-menu a:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-menu a.active {
    color: var(--primary-color);
    font-weight: var(--weight-medium);
    background: rgba(59, 130, 246, 0.1);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.nav-menu a.active:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

/* 메인 대시보드 링크 특별 스타일 */
.nav-menu a.main-dashboard {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: var(--text-inverse) !important;
    border-radius: var(--button-border-radius);
    font-weight: var(--weight-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-sm);
}

.nav-menu a.main-dashboard:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: var(--text-inverse) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* ===========================================
   DASHBOARD COMPONENTS
   =========================================== */
/* 대시보드 그리드 시스템 */
.summary-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    width: 100%;
}

/* 태블릿에서 대시보드 최적화 */
@media (max-width: 1024px) and (min-width: 769px) {
    .summary-dashboard {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: var(--space-3) !important;
    }
    
    .summary-card {
        min-height: 120px !important;
        padding: var(--space-5) var(--space-4) !important;
    }
    
    .summary-card h3 {
        font-size: var(--text-xl) !important;
    }
    
    .summary-card .dashboard-value {
        font-size: var(--text-3xl) !important;
        font-weight: var(--weight-bold) !important;
    }
    
    .summary-card .dashboard-sub-value {
        font-size: var(--text-lg) !important;
    }
}

.summary-card {
    background: var(--bg-secondary);
    border-radius: var(--card-border-radius);
    padding: var(--space-5) var(--space-4);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.8;
}

.summary-card h3 {
    margin-bottom: var(--space-2);
    text-align: center;
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    line-height: 1.25;
}

.summary-card .dashboard-value {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    line-height: 1.25;
    margin: var(--space-2) 0;
    color: var(--text-primary);
}

.summary-card .dashboard-sub-value {
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    margin-top: var(--space-2);
    text-align: center;
    line-height: 1.5;
}

/* 대시보드 카드 내 팀명 텍스트 통일 */
.summary-card .dashboard-value span {
    font-size: var(--text-xl) !important;
    font-weight: var(--weight-medium) !important;
    color: inherit;
}

/* ===========================================
   MOBILE DEVICE NOTICE 
   =========================================== */
/* 모바일 전용 스타일 */
.mobile-notice {
    display: none; /* 기본적으로 숨김 */
    margin-top: 12px;
    text-align: center;
    color: rgba(255,255,255,0.9);
}

/* ===========================================
   MOBILE NAVIGATION
   =========================================== */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: var(--text-xl);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--button-border-radius);
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ===========================================
   CARD COMPONENTS
   =========================================== */

.card h2 {
    color: var(--text-primary);
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-5);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.card h3 {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
    margin-bottom: var(--space-4);
    line-height: 1.25;
}

/* ===========================================
   TABLE COMPONENTS
   =========================================== */
.table-container {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--card-border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    max-width: 100%;
    position: relative;
    margin: 0;
}

table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    font-size: var(--text-base);
    line-height: 1.5;
}

th {
    background: var(--primary-color);
    color: var(--text-inverse);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    vertical-align: middle;
    padding: var(--space-3) var(--space-2);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

th:last-child {
    border-right: none;
}

td {
    padding: var(--space-3) var(--space-2);
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}

/* 숫자 데이터 전용 스타일 - 범용 데이터 폰트 규칙으로 대체됨 */

/* 승률은 기본 폰트 스타일 사용 (삭제됨) */

tr:hover {
    background: var(--bg-tertiary);
}

tr:last-child td {
    border-bottom: none;
}

/* 데이터 폰트 클래스는 기본 스타일 사용 (삭제됨) */

/* 테이블 내 모든 숫자 데이터 - 범용 데이터 폰트 규칙으로 대체됨 */

/* 승률은 기본 폰트 스타일 사용 (삭제됨) */

    .header .subtitle {
        font-size: var(--text-lg);
    }
}

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

.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 24px;
}

/* 통합 카드 스타일 */
.card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
    overflow: visible;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 100px;
    animation: fadeInUp 0.6s ease-out;
}
.magic-table-wrapper {
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

.magic-table-wrapper > div {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.magic-table-wrapper table {
    margin: 0 auto !important;
    display: table !important;
}

.chart-footer {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    margin-top: 10px;
}

.legend-container {
    margin-bottom: 15px;
}

.legend-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.legend-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

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

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-color.magic {
    background-color: #7dd87d;
}

.legend-color.competitive {
    background-color: #ffff7d;
}

.legend-color.tragic {
    background-color: #ff7d7d;
}

.update-info {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

.team-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* 기본 team-logo 스타일은 위에서 정의됨 */

.team-name {
    font-weight: 600;
}

/* 로고 스타일 - 가로 기준 통일, 세로는 비율에 따라 자동 조정 */
.team-logo {
    width: 24px !important;
    height: auto !important;
    max-width: none !important;
    min-width: auto !important;
    object-fit: contain !important;
    vertical-align: middle !important;
    margin-right: 4px;
    display: inline-block !important;
}

/* 팀별 실제 PNG 사이즈 비율 적용 - 가로 기준 통일 */
img[src*="doosan.png"], img[alt*="두산"] { 
    aspect-ratio: 1/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1:1 */

img[src*="hanwha.png"], img[alt*="한화"] { 
    aspect-ratio: 1.175/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.175:1 */

img[src*="kt.png"], img[alt*="KT"] { 
    aspect-ratio: 1.105/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.105:1 */

img[src*="lg.png"], img[alt*="LG"] { 
    aspect-ratio: 1.255/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.255:1 */

img[src*="samsung.png"], img[alt*="삼성"] { 
    aspect-ratio: 1.33/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.33:1 */

img[src*="lotte.png"], img[alt*="롯데"] { 
    aspect-ratio: 1.335/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.335:1 */

img[src*="kia.png"], img[alt*="KIA"] { 
    aspect-ratio: 1.345/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.345:1 */

img[src*="kiwoom.png"], img[alt*="키움"] { 
    aspect-ratio: 1.365/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.365:1 */

img[src*="nc.png"], img[alt*="NC"] { 
    aspect-ratio: 1.485/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.485:1 */

img[src*="ssg.png"], img[alt*="SSG"] { 
    aspect-ratio: 1.7/1 !important; 
    width: 24px !important;
    height: auto !important;
} /* 1.7:1 */

/* 모든 테이블 로고 통일 */
.standings-table .team-logo,
.vs-grid .team-logo,
#standings-table .team-logo,
#playoff-table .team-logo,
#chase-table .team-logo {
    width: 26px !important;
    height: auto !important;
    object-fit: contain !important;
    flex-shrink: 0;
}
/* 테이블 셀 기본 중앙 정렬 */
table td,
table th {
    text-align: center !important;
}

/* 모든 테이블의 팀명 셀 통합 정렬 */
#standings-table tbody tr td:nth-child(2),
#playoff-table tbody tr td:nth-child(2),
#chase-table tbody tr td:nth-child(2),
.team-name {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 6px 4px !important; /* 패딩 축소 */
}

/* 상대전적 테이블만 flex 유지 */
.vs-team {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 10px 8px !important;
}

/* 팀명 셀 내부의 모든 요소들 정렬 */
#standings-table .team-name *,
#playoff-table tbody tr td:nth-child(2) *,
#chase-table tbody tr td:nth-child(2) *,
.team-name * {
    vertical-align: middle !important;
    display: inline !important;
}

/* 팀 로고 마진 */
#standings-table .team-name img,
#playoff-table tbody tr td:nth-child(2) img,
#chase-table tbody tr td:nth-child(2) img {
    margin-right: 6px !important;
}
/* 팀명 컬럼은 위에서 flex로 통합 처리됨 */

/* 통계 섹션 로고 */
.stat-item .team-logo,
.playoff-condition .team-logo,
.championship-condition .team-logo {
    width: 24px !important;
    height: auto !important;
    object-fit: contain !important;
    vertical-align: middle !important;
}

/* 첫 번째 위치 메인 로고 */
#first-place-logo img {
    width: 48px !important;
    height: auto !important;
    object-fit: contain !important;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.4rem;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* 범례 스타일 통일 */
.legend-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: left;
}

/* 챔피언십 섹션 폰트 크기 강제 적용 - PC 전역 */
#first-place-team-name {
    font-size: var(--text-xl) !important;
    font-weight: 700 !important;
}

#remaining-games-top-display, #min-wins-top-display {
    font-size: var(--text-lg) !important;
    font-weight: 700 !important;
}

#championship-magic {
    font-size: var(--text-2xl) !important;
    font-weight: 800 !important;
}

#clinch-date {
    font-size: var(--text-xl) !important;
    font-weight: 700 !important;
}

.h2h-legend {
    text-align: left;
}

#chase-analysis, #playoff-condition {
    position: relative;
}

#chase-table, #playoff-table {
    position: relative;
}


th, td {
    padding: 12px 10px;
    text-align: center;
    position: relative;
    line-height: 1.4;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-height: 44px;
    vertical-align: middle;
    transition: all 0.3s ease;
}


/* 테이블 행 구분선 강화 */
tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}


/* ===========================================
   테이블 헤더 및 데이터 정렬 최적화
   =========================================== */

/* ═══════════════════════════════════════════════════════════════════════
   💻 PC 테이블 통합 관리 시스템 (769px 이상)
   ═══════════════════════════════════════════════════════════════════════ */

/* 🎨 PC용 통합 테이블 기본 스타일 */
@media (min-width: 769px) {
    /* 모든 테이블 기본 설정 */
    table th, table td {
        text-align: center;
        font-size: 0.85rem;
        line-height: 1.3;
    }
    /* 순위 컬럼 통합 (1번째) */
    table th:nth-child(1), table td:nth-child(1) { 
        width: 5%; 
        font-weight: 600;
    }

    /* 팀명 컬럼 통합 (2번째) */
    #standings-table th:nth-child(2), #standings-table td:nth-child(2) { 
        width: 10%; /* 팀명 컬럼 너비 축소 12% → 10% */
        font-weight: 500;
    }

    /* 일반 데이터 컬럼들 (3-8번째, 11-12번째) */
    table th:nth-child(n+3):nth-child(-n+8), 
    table td:nth-child(n+3):nth-child(-n+8),
    table th:nth-child(n+11):nth-child(-n+12), 
    table td:nth-child(n+11):nth-child(-n+12) { 
        width: 6%; 
    }
    /* 홈/방문 컬럼 너비 증가 */
    table th:nth-child(9), table td:nth-child(9), /* 홈 */
    table th:nth-child(10), table td:nth-child(10) { /* 방문 */
        width: 7%; /* 홈/방문 컬럼 너비 증가 6% → 7% */
    }
    /* 중요 컬럼들 강조 */
    table th:nth-child(8), table td:nth-child(8) { /* 승률 */
        font-weight: 600;
    }
    table th:nth-child(15), table td:nth-child(15) { /* 매직넘버 */
        width: 9%; 
        font-weight: 600;
    }
    /* 특수 컬럼 처리 - 폰트 크기 통일 */
    #standings-table th:nth-child(13), 
    #standings-table td:nth-child(13) { /* 최근10경기 */
        width: 9%; /* 최근10경기 컨럼 크기 축소 12% → 9% */
        font-size: inherit;  /* 다른 셀과 동일한 폰트 크기 사용 */
        white-space: nowrap; /* 텍스트 줄바뀜 방지 */
    }
    /* 플레이오프와 1위 탈환 테이블 완전 재설정 */
    #playoff-table,
    #chase-table {
        table-layout: auto !important;
    }
    #playoff-table th:nth-child(2),
    #playoff-table td:nth-child(2),
    #chase-table th:nth-child(2),
    #chase-table td:nth-child(2) {
        width: 12% !important;
        min-width: 80px !important;
        max-width: 120px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
    min-height: 48px;
    height: auto;
    text-align: center !important;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
    padding: 8px 6px;
    vertical-align: middle;
}

th:first-child {
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}
tbody tr:last-child {
    border-bottom: none;
}

/* 테이블 행 hover 효과 - 통합 */
tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.08) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

tbody tr:hover td {
    background-color: inherit;
}

/* 테이블 행 짝/홀수 배경 - 통합 */
tbody tr:nth-child(even) {
    background-color: rgba(248, 250, 252, 0.8);
}

tbody tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.9);
}

td {
    font-weight: 400;
}

td:first-child {
    font-weight: 700;
    color: var(--primary-color);
}

.rank-1 { 
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 235, 59, 0.08)) !important;
    border-left: 4px solid #ffd700;
    font-weight: 700;
}
.rank-2 { 
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(224, 224, 224, 0.08)) !important;
    border-left: 4px solid #c0c0c0;
}
.rank-3 { 
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(255, 152, 0, 0.08)) !important;
    border-left: 4px solid #cd7f32;
}
.playoff { 
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.12), rgba(57, 73, 171, 0.06)) !important;
    border-left: 4px solid var(--primary-color);
}

/* 대시보드용 매직넘버 (큰 사이즈) */
.magic-number-display {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #ff8787);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    background-color: rgba(255, 107, 107, 0.1);
    position: relative;
}

/* 테이블용 매직넘버 (기본 사이즈) - 그라데이션에서 처리 */
.magic-number {
    /* 기본 테이블 스타일 상속 */
}

.magic-number-display::after {
    content: attr(data-label);
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
}

.status-indicator {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clinched { 
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.3));
    color: #2e7d32;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.contending { 
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.3));
    color: #f57c00;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

/* 이 선택자는 위의 .team-logo로 통합됨 */

/* 상대전적 테이블 스타일 - 로고 중심 최적화 */
#head-to-head, #remaining-games {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 0 5px;
}

/* 데스크톱에서 정상적인 테이블 표시 - 스티키 제거 */
@media (min-width: 1025px) {
    #head-to-head, #remaining-games {
        overflow-x: auto;
        padding: 0;
    }
    
    .vs-grid {
        display: grid !important;
        grid-template-columns: 50px repeat(10, 105px) !important;
        width: fit-content !important;
        max-width: calc(100% - 20px) !important;
        margin: 0 auto !important;
        justify-content: center !important;
        gap: 1px !important;
    }
    
    .vs-grid > div {
        min-height: 35px !important;
        padding: 4px 0px !important;
        font-size: 0.8rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        background: white !important;
    }
    
    /* PC에서 팀간 상대전적에만 윗쪽 헤더 스티키 */
    #head-to-head .vs-grid > div:nth-child(-n+11) {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        background: #f8f9fa !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        font-weight: 600 !important;
    }
    
    /* 잔여경기는 스티키 헤더 제거 */
    #remaining-games .vs-grid > div:nth-child(-n+11) {
        position: static !important;
        background: rgba(0, 0, 0, 0.05) !important;
        box-shadow: none !important;
        z-index: auto !important;
        font-weight: 600 !important;
    }
    
    .vs-grid > div:nth-child(11n+1) {
        position: static !important;
        background: #f1f3f4 !important;
        box-shadow: none !important;
        z-index: auto !important;
        font-weight: 600 !important;
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        min-height: 35px !important;
        padding: 4px 0px !important;
        font-size: 0.7rem !important;
    }
    
    /* 좌상단 교차점도 일반 셀로 */
    .vs-grid > div:nth-child(1) {
        z-index: auto !important;
        background: rgba(0, 0, 0, 0.08) !important;
    }
    
    /* PC에서 JavaScript inline style 덮어쓰기 (자기팀 셀 제외) */
    #head-to-head .vs-grid > div.vs-record:not([style*="white"]),
    #remaining-games .vs-grid > div.vs-record:not([style*="white"]) {
        background: rgba(76, 175, 80, 0.1) !important;
        color: #2e7d32 !important;
        font-weight: 600 !important;
    }
    
    /* 자기팀 셀은 회색으로 표시 */
    #head-to-head .vs-grid > div.vs-record[style*="white"],
    #remaining-games .vs-grid > div.vs-record[style*="white"] {
        background: #f5f5f5 !important;
        color: #9ca3af !important;
        font-weight: 600 !important;
    }
    
    /* 패배/낮은 승률인 경우는 빨간색 */
    #head-to-head .vs-grid > div.vs-record[style*="rgba(220"],
    #head-to-head .vs-grid > div.vs-record[style*="rgba(244"],
    #remaining-games .vs-grid > div.vs-record[style*="rgba(249, 115, 22"] {
        background: rgba(244, 67, 54, 0.1) !important;
        color: #d32f2f !important;
        font-weight: 600 !important;
    }
    
    /* 중간/노란색인 경우 */
    #head-to-head .vs-grid > div.vs-record[style*="rgba(255, 193, 7"],
    #remaining-games .vs-grid > div.vs-record[style*="rgba(234, 179, 8"] {
        background: rgba(255, 193, 7, 0.1) !important;
        color: #f57c00 !important;
        font-weight: 600 !important;
    }
    
    /* 회색 (경기 종료) */
    #remaining-games .vs-grid > div.vs-record[style*="rgba(156, 163, 175"] {
        background: rgba(156, 163, 175, 0.1) !important;
        color: #666 !important;
        font-weight: 600 !important;
    }
}


.vs-grid {
    display: grid;
    grid-template-columns: 120px repeat(10, 120px);
    gap: 3px;
    position: relative;
    min-width: fit-content;
    justify-content: center;
    width: 100%;
}

.vs-grid > div {
    text-align: center;
    vertical-align: middle;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 65px;
    padding: 12px 8px;
    border-radius: 8px;
    line-height: 1.4;
    font-size: 0.9rem;
    position: relative;
}

/* 스티키 헤더 - 첫 번째 행 (팀명 헤더) */
.vs-grid > div:nth-child(-n+11) {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 스티키 컬럼 - 첫 번째 열 (로고) */
.vs-grid > div:nth-child(11n+1) {
    position: sticky;
    left: 0;
    z-index: 15;
    background: #f8f9fa !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

/* 좌상단 교차점 - 가장 높은 z-index */
.vs-grid > div:nth-child(1) {
    z-index: 20;
}
.vs-header {
    background: rgba(0, 0, 0, 0.05) !important;
    font-weight: 600 !important;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}
.vs-team {
    background: rgba(0, 0, 0, 0.03) !important;
    font-weight: 600 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: 4px;
    cursor: pointer;
    line-height: 16px;
    transition: all 0.2s ease;
}

/* 에러 알림 스타일 */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.15);
    max-width: 350px;
    font-size: 0.9rem;
    animation: slideInRight 0.3s ease;
}

.error-notification.success {
    background: #f0f9ff;
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.error-notification .close-btn {
    float: right;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
    color: #666;
}

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

.help-icon:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.tooltip {
    position: relative;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: #1a237e;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -150px;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 오른쪽 끝에 있는 툴팁을 위한 클래스 */
.tooltip .tooltiptext.tooltip-left {
    left: auto;
    right: 0;
    margin-left: 0;
    margin-right: 0;
}

.tooltip .tooltiptext.tooltip-left::after {
    left: auto;
    right: 20px;
    margin-left: 0;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #1a237e transparent;
}

.tooltip:hover .tooltiptext,
.tooltip.active .tooltiptext {
    visibility: visible;
    opacity: 1;
}
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(20px);
}

.scroll-to-top:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.scroll-to-top.show:hover {
    transform: translateY(-2px);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 쿠팡 광고 반응형 스타일 */
.coupang-ad-wrapper {
    box-sizing: border-box;
}

.coupang-ad-wrapper > div,
.coupang-ad-wrapper iframe {
    max-width: 100% !important;
    width: 100% !important;
}

/* PC에서 쿠팡 광고 크기 조정 - 카드 크기에 맞춤 */
@media (min-width: 1025px) {
    .coupang-ad-wrapper {
        padding: 40px 60px !important;
    }
    .coupang-ad-wrapper > div:not([style*="font-size"]),
    .coupang-ad-wrapper iframe {
        transform: scale(0.95);
        transform-origin: center;
        margin: 0;
    }
}

/* 태블릿에서 쿠팡 광고 크기 조정 */

/* 모바일에서 쿠팡 광고 크기 조정 */
/* PC 버전 보기 버튼은 모바일에서만 표시 */
@media (min-width: 769px) {
    #mobile-controls {
        display: none !important;
    }
}

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

.vs-record {
    background: white;
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #ddd;
}

.vs-record.win { 
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    font-weight: 600;
}

.vs-record.loss { 
    background-color: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
    font-weight: 600;
}

.team-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.team-basic-info, .magic-info {
    background: rgba(26, 35, 126, 0.02);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.stat-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.stat-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.stat-card {
    text-align: center;
    padding: 12px;
    background: rgba(26, 35, 126, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(26, 35, 126, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card .stat-label {
    text-align: center;
    width: 100%;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    text-align: center;
    width: 100%;
}
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

/* 챔피언십 섹션 특별 효과 */
@keyframes logoGlow {
    0% { 
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); 
        transform: scale(1);
    }
    100% { 
        filter: drop-shadow(0 4px 8px rgba(26, 35, 126, 0.2)) drop-shadow(0 0 12px rgba(26, 35, 126, 0.1)); 
        transform: scale(1.02);
    }
}

/* 매직넘버 강조 애니메이션 */
@keyframes magicPulse {
    0% { 
        transform: scale(1);
        text-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 4px 16px rgba(255, 107, 53, 0.6);
    }
    100% { 
        transform: scale(1);
        text-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    }
}

.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

.loading {
    position: relative;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 데이터 그라데이션 클래스들 */
/* 간단한 데이터 그라데이션 - 상대전적 폰트 굵기 적용 */
.data-excellent {
    color: #059669 !important;
    font-weight: 600 !important;
}
.data-good {
    color: #16a34a !important;
    font-weight: 600 !important;
}

.data-warning {
    color: #d97706 !important;
    font-weight: 600 !important;
}

.data-bad {
    color: #dc2626 !important;
    font-weight: 600 !important;
}

/* 정렬 가능한 테이블 헤더 스타일 */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
    padding-right: 20px !important;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
    min-height: 48px;
    display: table-cell;
    vertical-align: middle;
}

.sortable-header:hover {
    background: rgba(57, 73, 171, 0.8);
    color: rgba(255, 255, 255, 0.95);
}

.sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.sortable-header:hover .sort-arrow {
    opacity: 1;
}

.sortable-header.sort-asc .sort-arrow {
    opacity: 1;
    color: var(--accent-color);
}

.sortable-header.sort-desc .sort-arrow {
    opacity: 1;
    color: var(--accent-color);
}

/* 테이블 행 정렬 애니메이션 */
tbody tr {
    transition: all 0.3s ease;
}

.sorting tbody tr {
    opacity: 0.7;
}

/* 숫자 셀은 기본 폰트 스타일 사용 (삭제됨) */

/* 매직넘버 데이터 그라데이션 - 간단한 방법 */

/* strong 태그는 기본 볼드 사용 (삭제됨) */

/* 플레이오프 진출 조건 카드 - 일반 카드 스타일 유지 */

/* 플레이오프 테이블 행 상태별 그라데이션 - 강화된 색상 */
#playoff-table tbody tr.playoff-safe {
    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.25) 0%,
        rgba(76, 175, 80, 0.12) 50%,
        rgba(76, 175, 80, 0.05) 100%) !important;
    border-left: 5px solid #4CAF50 !important;
    position: relative;
}

#playoff-table tbody tr.playoff-danger {
    background: linear-gradient(135deg, 
        rgba(244, 67, 54, 0.25) 0%,
        rgba(244, 67, 54, 0.12) 50%,
        rgba(244, 67, 54, 0.05) 100%) !important;
    border-left: 5px solid #F44336 !important;
}

#playoff-table tbody tr.playoff-borderline {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.25) 0%,
        rgba(255, 152, 0, 0.15) 50%,
        rgba(255, 193, 7, 0.05) 100%) !important;
    border-left: 5px solid #FFC107 !important;
}

#playoff-table tbody tr.playoff-eliminated {
    background: linear-gradient(135deg, 
        rgba(158, 158, 158, 0.20) 0%,
        rgba(158, 158, 158, 0.10) 50%,
        rgba(158, 158, 158, 0.05) 100%) !important;
    border-left: 5px solid #9E9E9E !important;
    opacity: 0.8;
}

/* 플레이오프 테이블 호버 효과 */
#playoff-table tbody tr:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 플레이오프 테이블은 기본 폰트 스타일 사용 (삭제됨) */

/* ═══════════════════════════════════════════════════════════════════════
   🗑️ PC 개별 테이블 스타일 제거됨 - 통합 시스템으로 대체
   ═══════════════════════════════════════════════════════════════════════ */

/* 1위 탈환 조건 테이블 1위팀 특별 스타일 */
.first-place-row {
    position: relative;
}

.first-place-row td {
    font-weight: 600 !important;
    background-color: rgba(255, 215, 0, 0.1) !important;
}

.first-place-row td:first-child::before {
    content: '👑 ';
    color: #ffd700;
    font-size: 1.1em;
}
/* ===========================================
   테이블 모바일 반응형 최적화
   =========================================== */

@media screen and (max-width: 768px) {
    .table-container {
        margin: 0 !important;     /* 모든 테이블 컨테이너 좌우 정렬 통일 */
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    /* 모바일에서 팀명 텍스트 숨기고 로고만 표시 */
    .team-name span,
    #standings-table .team-name span,
    #playoff-table tbody tr td:nth-child(2) span,
    #chase-table tbody tr td:nth-child(2) span {
        display: none !important;
    }
    /* 모바일에서 팀 로고 크기 조정 */
    .team-logo,
    .team-name img,
    #standings-table .team-name img,
    #playoff-table tbody tr td:nth-child(2) img,
    #chase-table tbody tr td:nth-child(2) img {
        margin-right: 0 !important;
        width: 24px !important;
        height: auto !important;
    }
    table {
        min-width: 100%;
        font-size: 0.8rem;
    }
    th, td {
        padding: 8px 4px;
        min-height: 36px;
        font-size: 0.85rem;    /* 데이터 셀 텍스트 크기 증가 */
    }
    th {
        height: 40px;
        font-size: 0.8rem;
    }
    /* ═══════════════════════════════════════════════════════════════════════
       🗑️ 개별 테이블 스타일 무효화 - 통합 시스템 우선
       ═══════════════════════════════════════════════════════════════════════ */
    /* 모든 개별 테이블 ID 스타일 무효화 */
    #standings-table th, #standings-table td,
    #playoff-table th:not(:nth-child(2)), #playoff-table td:not(:nth-child(2)),
    #chase-table th:not(:nth-child(2)), #chase-table td:not(:nth-child(2)) {
        width: auto !important; /* 통합 시스템이 제어 */
        font-size: inherit !important; /* 통합 폰트 시스템 사용 */
        padding: inherit !important; /* 통합 패딩 시스템 사용 */
        text-align: center !important; /* 모든 데이터 셀 중앙 정렬 강제 적용 */
    }
    /* 특수 컬럼 예외 처리 - 폰트 크기 통일 */
    #standings-table th:nth-child(13), 
    #standings-table td:nth-child(13) { 
        font-size: inherit !important; /* 다른 셀과 동일한 폰트 크기로 통일 */
        min-width: 80px !important;    /* 최근10경기 컨럼 최소 크기 증가 */
        max-width: 100px !important;   /* 최근10경기 컨럼 최대 크기 증가 */
    }
}

@media screen and (max-width: 480px) {
    th, td {
        padding: 6px 2px;
        font-size: 0.85rem !important;   /* 초소형 화면 텍스트 크기 더 증가 */
    }
    th {
        font-size: 0.9rem !important;    /* 헤더 크기도 더 증가 */
    }
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* 모바일에서 팀 순위표 특정 컬럼 여백 추가 */
    #standings-table th:nth-child(8),   /* 승률 */
    #standings-table td:nth-child(8),
    #standings-table th:nth-child(9),   /* 홈 */
    #standings-table td:nth-child(9),
    #standings-table th:nth-child(10),  /* 방문 */
    #standings-table td:nth-child(10),
    #standings-table th:nth-child(13),  /* 최근10경기 */
    #standings-table td:nth-child(13) {
        padding: 8px 6px !important;
        white-space: nowrap !important; /* 홈/방문/최근10경기 모든 컬럼 줄바뀜 방지 */
    }
    /* 모바일에서 팀명 텍스트 숨기고 로고만 표시 */
    .team-name span,
    #standings-table .team-name span,
    #playoff-table tbody tr td:nth-child(2) span,
    #chase-table tbody tr td:nth-child(2) span {
        display: none !important;
    }
    /* 모바일에서 팀 로고 크기 조정 */
    .team-logo,
    .team-name img,
    #standings-table .team-name img,
    #playoff-table tbody tr td:nth-child(2) img,
    #chase-table tbody tr td:nth-child(2) img {
        margin-right: 0 !important;
        width: 20px !important;
        height: auto !important;
    }
}

/* ===========================================
   UNIFIED FONT SYSTEM - 추가 스타일
   =========================================== */

/* 텍스트 크기 클래스 */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }

/* 폰트 굵기 클래스 */
.font-normal { font-weight: var(--weight-normal); }
.font-medium { font-weight: var(--weight-medium); }
.font-bold { font-weight: var(--weight-bold); }

/* 테이블 폰트 통일 - 상대전적 스타일 기준 */
table td {
    font-size: 0.85rem;         /* 상대전적 메인 크기 */
    font-weight: 500;           /* 기본 굵기 */
    line-height: 1.3;           /* 상대전적 줄간격 */
}

table th {
    font-size: 0.85rem;         /* 상대전적 헤더 크기 */
    font-weight: 600;           /* 헤더는 볼드 필요 */
    line-height: 1.3;           /* 상대전적 줄간격 */
}

/* 순위 컬럼은 font-weight: 600 유지 */
#standings-table tbody tr td:nth-child(1),
#playoff-table tbody tr td:nth-child(1),
#chase-table tbody tr td:nth-child(1) {
    font-weight: 600;
}
/* 헤딩 요소들 통일 - 제목은 볼드 필요 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;           /* 제목은 볼드 필요 */
    line-height: 1.3;           /* 상대전적 줄간격 */
}

/* 폼 요소들 - 상대전적 스타일 상속 */
input, textarea, select, button {
    font-size: 0.85rem;         /* 상대전적 크기 */
    font-weight: 500;           /* 기본 굵기 */
    line-height: 1.3;           /* 상대전적 줄간격 */
}

/* ===========================================
   📱 모바일 통합 테이블 관리 시스템
   =========================================== */

/*
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 모바일 테이블 통합 관리 정책
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 관리 대상 테이블:
   ✅ #standings-table (팀 순위표) - 15개 컬럼
   ✅ #playoff-table (플레이오프 진출 조건) - 9개 컬럼  
   ✅ #chase-table (1위 탈환 가능성) - 10개 컬럼

📐 통합 컬럼 크기 시스템:
   📱 768px 이하: 순위 20px, 팀명 35px (총 55px)
   📱 600px 이하: 순위 18px, 팀명 30px (총 48px)
   📱 480px 이하: 순위 16px, 팀명 25px (총 41px)

🔧 통합 스타일 요소:
   ✅ 스티키 헤더 완전 해제 (자연스러운 스크롤)
   ✅ 팀명 컬럼만 스티키 처리 (팀 식별 유지)
   ✅ 통일된 폰트 크기 시스템
   ✅ 일관된 패딩 및 여백 시스템
   ✅ 반응형 로고 크기 조정
   ✅ 스티키 구분선 & 그림자 효과

🎨 모든 개별 테이블 스타일은 이 시스템으로 통합 관리됨
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/

/* 태블릿 및 모바일 기본 (768px 이하) */
@media (max-width: 768px) {
    :root {
        /* 모바일용 폰트 크기 시스템 */
        --text-xs: 0.7rem;      /* 11.2px */
        --text-sm: 0.8rem;      /* 12.8px */
        --text-base: 0.85rem;   /* 13.6px */
        --text-lg: 1rem;        /* 16px */
        --text-xl: 1.2rem;      /* 19.2px */
        --text-2xl: 1.6rem;     /* 25.6px - 키움 */
        --text-3xl: 1.8rem;     /* 28.8px */
        
        /* 모바일용 간격 시스템 */
        --space-1: 0.2rem;      /* 3.2px */
        --space-2: 0.4rem;      /* 6.4px */
        --space-3: 0.6rem;      /* 9.6px */
        --space-4: 0.8rem;      /* 12.8px */
        --space-5: 1rem;        /* 16px */
        --space-6: 1.2rem;      /* 19.2px */
        --space-8: 1.6rem;      /* 25.6px */
        --space-10: 2rem;       /* 32px */
        --space-12: 2.4rem;     /* 38.4px */
    }
    /* 컨테이너 및 기본 레이아웃 */
    .container {
        padding: var(--space-3);
        max-width: 100%;
    }
    /* 헤더 최적화 */
    .header {
        padding: 20px 15px;
        text-align: center;
    }
    .header h1 {
        font-size: var(--text-3xl) !important;
        margin-bottom: var(--space-2);
    }
    
    /* 카드 레이아웃 최적화 - 패딩과 여백 축소 */
    .card {
        margin-bottom: var(--space-3);      /* 카드 간 여백 축소 */
        padding: var(--space-3);            /* 카드 내부 패딩 축소 */
        border-radius: 8px;
    }
    .cards-grid {
        display: block;
    }
    /* 대시보드 모바일 최적화 - 2x3 그리드 */
    .summary-dashboard {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-3) !important;
    }
    
    .summary-card {
        min-height: 110px !important;
        padding: var(--space-4) var(--space-3) !important;
    }
    
    .summary-card h3 {
        font-size: var(--text-xl) !important;
        margin-bottom: var(--space-2) !important;
    }
    
    .summary-card .dashboard-value {
        font-size: var(--text-3xl) !important;
        margin: var(--space-2) 0 !important;
    }
    
    .summary-card .dashboard-sub-value {
        font-size: var(--text-lg) !important;
    }
    
    /* 모바일에서 예상 우승 확정일 줄바꿈 처리 */
    .summary-card .dashboard-sub-value {
        white-space: pre-line;
        text-align: center;
    }
    
    /* 모바일에서 대시보드 카드 span 요소 폰트 크기 재정의 */
    .summary-card .dashboard-value span {
        font-size: var(--text-3xl) !important;
        font-weight: var(--weight-bold) !important;
    }
    
    /* 모바일에서 예상 우승 확정일 줄바꿈 적용 */
    #clinch-date {
        white-space: pre-line !important;
        text-align: center !important;
    }
    
    /* 네비게이션 모바일 최적화 - root index와 동일하게 */
    .nav-menu {
        display: flex;
        justify-content: flex-start;
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
        padding: 0 10px;
    }
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    .nav-item {
        white-space: nowrap;
        font-size: var(--text-sm);
        padding: 8px 12px;
        flex-shrink: 0;
    }
    .nav-toggle {
        display: none;
    }
    /* 테이블 최적화 */
    .table-container {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: inset 0 0 0 1px var(--border-color);
        background: var(--bg-secondary);
    }
    table {
        min-width: 700px; /* 테이블 최소 너비 축소로 모바일 최적화 */
        font-size: var(--text-sm);
        width: auto; /* 고정 너비 대신 내용에 맞춤 */
    }
    th, td {
        padding: 6px 3px;
        font-size: var(--text-xs);
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 60px; /* 셀 최대 너비 축소 */
        overflow: hidden;
    }
    /* ═══════════════════════════════════════════════════════════════════════
       📱 모바일 통합 테이블 시스템 (768px 이하)
       ═══════════════════════════════════════════════════════════════════════ */
    /* 🎨 통합 테이블 기본 스타일 - 폰트 크기 증가 */
    table {
        font-size: 0.8rem !important; /* 0.7rem → 0.8rem 증가 */
        line-height: 1.3 !important;  /* 1.2 → 1.3 줄간격 증가 */
        min-width: 700px;
    }
    /* 🎨 통합 헤더 스타일 - 폰트 크기 증가 */
    table th {
        font-size: 0.75rem !important; /* 0.65rem → 0.75rem 증가 */
        font-weight: 600 !important;
        position: relative !important;
        background: var(--primary-color) !important;
        color: white !important;
        text-align: center !important;
        padding: 10px 4px !important; /* 8px → 10px 패딩 증가 */
        border-right: 1px solid rgba(255,255,255,0.1) !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        z-index: auto !important;
        height: auto !important;
        min-height: 44px !important; /* 40px → 44px 높이 증가 */
        vertical-align: middle !important;
    }
    /* 🎨 통합 데이터 셀 스타일 - 폰트 크기 증가 */
    table td {
        font-size: 0.85rem !important; /* 0.75rem → 0.85rem 모바일 데이터 셀 크기 증가 */
        font-weight: 500 !important;
        text-align: center !important; /* 모든 데이터 셀 중앙 정렬 강제 */
        padding: 8px 3px !important;   /* 6px → 8px 패딩 증가 */
        border-bottom: 1px solid var(--border-light) !important;
        border-right: 1px solid var(--border-color) !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        min-height: 40px !important; /* 36px → 40px 높이 증가 */
        background: white !important; /* 기본 배경색 명시 */
    }
    /* 🏆 순위 컬럼 통합 관리 (1번째) */
    table th:nth-child(1),
    table td:nth-child(1) {
        width: 35px !important;        /* 모바일에서 순위 컬럼 크기 더 증가 */
        min-width: 35px !important;
        max-width: 35px !important;
        padding: 6px 2px !important; /* 순위 전용 패딩 */
        font-weight: 600 !important; /* 순위는 굵게 */
        color: var(--primary-color) !important; /* 순위 강조 색상 */
    }
    /* 🏟️ 팀명 컬럼 통합 관리 (2번째) - 스티키 처리 */
    #standings-table th:nth-child(2),
    #standings-table td:nth-child(2) {
        position: sticky !important;
        left: 0 !important; /* 왼쪽 끝에 고정 */
        z-index: 10 !important; /* 다른 셀 위에 표시 */
        width: 55px !important;        /* 모바일에서 팀명 컬럼 크기 더 증가 */
        min-width: 55px !important;
        max-width: 55px !important;
        padding: 6px 2px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-weight: 500 !important;
        border-right: 2px solid var(--border-strong) !important; /* 스티키 구분선 */
        box-shadow: 2px 0 4px rgba(0,0,0,0.1) !important; /* 스티키 그림자 효과 */
    }
    /* 팀명 헤더는 더 높은 z-index */
    table th:nth-child(2) {
        z-index: 15 !important;
        background: var(--primary-color) !important; /* 헤더 배경 유지 */
    }
    /* 팀명 데이터 셀 배경 - 다른 셀과 통일 */
    table td:nth-child(2) {
        background: var(--bg-secondary) !important; /* 다른 테이블 셀과 동일한 배경 */
        transition: all 0.2s ease !important;
    }
    /* 팀명 셀 hover 효과 - 다른 셀과 통일 */
    table tr:hover td:nth-child(2) {
        background: rgba(26, 35, 126, 0.05) !important; /* 일반 hover와 동일하게 */
        transform: translateX(1px) !important; /* 스티키만의 특별 효과 */
        box-shadow: 3px 0 6px rgba(0,0,0,0.15) !important; /* 스티키 그림자 유지 */
    }
    /* 🎨 팀 로고 통합 관리 */
    table td:nth-child(2) .team-logo {
        width: 10px !important;
        height: auto !important;
        margin-right: 2px !important;
        object-fit: contain !important;
        vertical-align: middle !important;
        flex-shrink: 0 !important;
    }
    /* 📊 데이터 컬럼들 (3번째 이후) 통합 스타일 */
    table th:nth-child(n+3),
    table td:nth-child(n+3) {
        min-width: 45px !important; /* 데이터 컬럼 최소 너비 */
        max-width: 80px !important; /* 데이터 컬럼 최대 너비 */
        padding: 6px 2px !important;
        font-size: 0.65rem !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
    }
    /* 🎨 통합 스크롤 인디케이터 */
    .table-container {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        border: 1px solid var(--border-color);
        background: var(--bg-secondary);
        box-shadow: var(--shadow-sm);
        margin: 0;
    }
    .table-container::after {
        display: none;
    }
    /* 상대전적 테이블 모바일 최적화 */
    .vs-grid {
        gap: 1px;
        font-size: var(--text-xs);
        grid-template-columns: 90px repeat(10, 120px) !important;
        max-width: 100%;
        margin: 0 -10px;
        padding: 0 10px;
        justify-content: start;
    }
    
    .vs-grid > div {
        font-size: 0.85rem !important;
        padding: 6px 4px !important;
        min-height: 50px !important;
        line-height: 1.2;
        min-width: 120px !important;
    }
    
    /* 모바일에서도 스티키 유지 */
    .vs-grid > div:nth-child(-n+11) {
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .vs-grid > div:nth-child(11n+1) {
        position: sticky;
        left: 0;
        z-index: 15;
        width: 90px !important;
        min-width: 90px !important;
        max-width: 90px !important;
    }
    .vs-header {
        font-size: 0.85rem !important;
        font-weight: 600;
    }
    .vs-team {
        font-size: 0.85rem !important;
    }
    /* 모바일 안내 메시지 표시 */
    .mobile-notice {
        display: block !important;
    }
    /* PC 버전 강제 모드에서는 모바일 스타일 무효화 */
    body.force-desktop .mobile-notice {
        display: none !important;
    }
    /* PC 버전 강제 시 일부 모바일 최적화 해제 */
    body.force-desktop {
        min-width: 1200px;
    }
}

/* 작은 모바일 화면 (600px 이하) */
@media (max-width: 600px) {
    :root {
        --text-xs: 0.65rem;     /* 10.4px */
        --text-sm: 0.75rem;     /* 12px */
        --text-base: 0.8rem;    /* 12.8px */
        --text-lg: 0.9rem;      /* 14.4px */
        --text-xl: 1.1rem;      /* 17.6px */
        --text-2xl: 1.5rem;     /* 24px - 키움 */
        --text-3xl: 1.6rem;     /* 25.6px */
    }
    /* 대시보드 480px 미만 - 1열 그리드 */
    .summary-dashboard {
        grid-template-columns: 1fr !important;
        gap: var(--space-2) !important;
    }
    
    .summary-card {
        min-height: 100px !important;
        padding: var(--space-4) var(--space-3) !important;
    }
    
    .summary-card h3 {
        font-size: var(--text-lg) !important;
        margin-bottom: var(--space-2) !important;
    }
    
    .summary-card .dashboard-value {
        font-size: 2rem !important;
        margin: var(--space-2) 0 !important;
        font-weight: var(--weight-bold) !important;
    }
    
    .summary-card .dashboard-sub-value {
        font-size: var(--text-base) !important;
        margin-top: var(--space-1) !important;
        white-space: pre-line;
        text-align: center;
    }
    
    /* 소형 모바일에서 대시보드 카드 span 요소 폰트 크기 재정의 */
    .summary-card .dashboard-value span {
        font-size: 2rem !important;
        font-weight: var(--weight-bold) !important;
    }
    
    /* 소형 모바일에서도 예상 우승 확정일 줄바꿈 적용 */
    #clinch-date {
        white-space: pre-line !important;
        text-align: center !important;
        line-height: 1.4 !important;
    }
    /* 모바일에서 설명 카드 텍스트 크기 축소 */
    .legend-text {
        font-size: 0.8rem !important;
    }
    .legend-text h4 {
        font-size: 0.9rem !important;
    }
    .legend-text ul li {
        font-size: 0.75rem !important;
    }
    /* 챔피언십 섹션의 팀명과 추가 정보 폰트 크기 키우기 */
    #first-place-team-name {
        font-size: var(--text-xl) !important;
        font-weight: 700 !important;
    }
    #remaining-games-top-display, #min-wins-top-display {
        font-size: var(--text-lg) !important;
        font-weight: 700 !important;
    }
    /* 매직넘버 텍스트 강제 적용 */
    #championship-magic {
        font-size: var(--text-2xl) !important;
        font-weight: 800 !important;
    }
    /* 예상 확정일 텍스트 크기 키우기 */
    #clinch-date {
        font-size: var(--text-xl) !important;
        font-weight: 700 !important;
    }
    /* 모바일에서 팀 순위표 특정 컬럼 여백 추가 */
    #standings-table th:nth-child(8),   /* 승률 */
    #standings-table td:nth-child(8),
    #standings-table th:nth-child(9),   /* 홈 */
    #standings-table td:nth-child(9),
    #standings-table th:nth-child(10),  /* 방문 */
    #standings-table td:nth-child(10),
    #standings-table th:nth-child(13),  /* 최근10경기 */
    #standings-table td:nth-child(13) {
        padding: 7px 5px !important;
        white-space: nowrap !important; /* 홈/방문/최근10경기 모든 컬럼 줄바뀜 방지 */
    }
    /* 모바일에서 팀명 텍스트 숨기고 로고만 표시 */
    .team-name span,
    #standings-table .team-name span,
    #playoff-table tbody tr td:nth-child(2) span,
    #chase-table tbody tr td:nth-child(2) span {
        display: none !important;
    }
    /* 모바일에서 팀 로고 크기 조정 */
    .team-logo,
    .team-name img,
    #standings-table .team-name img,
    #playoff-table tbody tr td:nth-child(2) img,
    #chase-table tbody tr td:nth-child(2) img {
        margin-right: 0 !important;
        width: 22px !important;
        height: auto !important;
    }
    /* 헤더 더 축소 */
    .header {
        padding: 15px 10px;
    }
    .header h1 {
        font-size: var(--text-2xl) !important;
    }
    /* 카드 패딩 더 축소 */
    .card {
        padding: var(--space-2);             /* 카드 패딩 더 축소 */
        margin-bottom: var(--space-2);       /* 카드 간 여백 더 축소 */
    }
    /* 테이블 텍스트 크기 증가 */
    th, td {
        padding: 6px 2px;
        font-size: 0.85rem !important;   /* var(--text-xs) → 0.85rem 증가 */
        text-align: center !important;   /* 모든 셀 중앙 정렬 강제 */
        max-width: 60px; /* 더 작은 셀 너비 */
    }
    /* ═══════════════════════════════════════════════════════════════════════
       📱 작은 화면 통합 테이블 시스템 (600px 이하)
       ═══════════════════════════════════════════════════════════════════════ */
    /* 🎨 작은 화면 통합 폰트 시스템 - 폰트 크기 증가 */
    table {
        font-size: 0.75rem !important; /* 0.65rem → 0.75rem 증가 */
        min-width: 650px;
    }
    table th {
        font-size: 0.7rem !important; /* 0.6rem → 0.7rem 증가 */
        padding: 8px 3px !important; /* 6px → 8px 패딩 증가 */
        min-height: 40px !important; /* 36px → 40px 높이 증가 */
    }
    table td {
        font-size: 0.7rem !important; /* 0.6rem → 0.7rem 증가 */
        padding: 6px 2px !important; /* 4px → 6px 패딩 증가 */
        min-height: 36px !important; /* 32px → 36px 높이 증가 */
        background: white !important; /* 배경색 통일 */
    }
    /* 🏆 순위 컬럼 - 작은 화면 축소 */
    table th:nth-child(1),
    table td:nth-child(1) {
        width: 32px !important;        /* 600px 이하에서 순위 컬럼 크기 증가 */
        min-width: 32px !important;
        max-width: 32px !important;
        padding: 4px 1px !important;
    }
    /* 🏟️ 팀명 컬럼 - 작은 화면 축소 + 스티키 유지 */
    table th:nth-child(2),
    table td:nth-child(2) {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        width: 48px !important;        /* 600px 이하에서 팀명 컬럼 크기 증가 */
        min-width: 48px !important;
        max-width: 48px !important;
        padding: 4px 1px !important;
        border-right: 2px solid var(--border-strong) !important;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1) !important;
    }
    table th:nth-child(2) {
        z-index: 15 !important;
        background: var(--primary-color) !important;
    }
    table td:nth-child(2) {
        background: var(--bg-secondary) !important;
    }
    /* 🎨 로고 크기 축소 */
    table td:nth-child(2) .team-logo {
        width: 8px !important;
        margin-right: 1px !important;
    }
    /* 📊 데이터 컬럼 축소 */
    table th:nth-child(n+3),
    table td:nth-child(n+3) {
        min-width: 40px !important;
        max-width: 70px !important;
        font-size: inherit !important;   /* 다른 셀과 동일한 폰트 크기로 통일 */
    }
    /* 상대전적 테이블 더 축소 */
    .vs-grid > div {
        font-size: 0.75rem !important;
        padding: 3px 1px !important;
        min-height: 40px !important;
        min-width: 105px !important;
    }
}

/* 매우 작은 화면 (480px 이하) */
@media (max-width: 480px) {
    :root {
        --text-xs: 0.6rem;      /* 9.6px */
        --text-sm: 0.7rem;      /* 11.2px */
        --text-base: 0.75rem;   /* 12px */
        --text-lg: 0.85rem;     /* 13.6px */
        --text-xl: 1rem;        /* 16px */
        --text-2xl: 1.4rem;     /* 22.4px - 키움 */
        --text-3xl: 1.5rem;     /* 24px */
    }
    /* 컨테이너 여백 최소화 */
    .container {
        padding: var(--space-2);
    }
    /* 헤더 최소화 */
    .header {
        padding: 10px 8px;
    }
    .header h1 {
        font-size: var(--text-2xl) !important;
        margin-bottom: var(--space-1);
    }
    /* 모바일에서 팀 순위표 특정 컬럼 여백 추가 */
    #standings-table th:nth-child(8),   /* 승률 */
    #standings-table td:nth-child(8),
    #standings-table th:nth-child(9),   /* 홈 */
    #standings-table td:nth-child(9),
    #standings-table th:nth-child(10),  /* 방문 */
    #standings-table td:nth-child(10),
    #standings-table th:nth-child(13),  /* 최근10경기 */
    #standings-table td:nth-child(13) {
        padding: 6px 4px !important;
        white-space: nowrap !important; /* 홈/방문/최근10경기 모든 컬럼 줄바뜸 방지 */
    }
    /* 모바일에서 팀명 텍스트 숨기고 로고만 표시 */
    .team-name span,
    #standings-table .team-name span,
    #playoff-table tbody tr td:nth-child(2) span,
    #chase-table tbody tr td:nth-child(2) span {
        display: none !important;
    }
    /* 모바일에서 팀 로고 크기 조정 */
    .team-logo,
    .team-name img,
    #standings-table .team-name img,
    #playoff-table tbody tr td:nth-child(2) img,
    #chase-table tbody tr td:nth-child(2) img {
        margin-right: 0 !important;
        width: 20px !important;
        height: auto !important;
    }
    /* 요약 대시보드 1열로 */
    .summary-dashboard {
        grid-template-columns: 1fr !important;
        gap: var(--space-1) !important;
    }
    /* 테이블 패딩 최소화 */
    th, td {
        padding: 4px 1px;
        font-size: var(--text-xs);
        max-width: 50px; /* 가장 작은 셀 너비 */
    }
    /* ═══════════════════════════════════════════════════════════════════════
       📱 매우 작은 화면 통합 테이블 시스템 (480px 이하)
       ═══════════════════════════════════════════════════════════════════════ */
    /* 🎨 매우 작은 화면 통합 폰트 시스템 - 텍스트 크기 증가 */
    table {
        font-size: 0.85rem !important;   /* 0.6rem → 0.85rem 대폭 증가 */
        min-width: 600px; /* 매우 작은 화면용 최소 너비 */
        text-align: center !important;   /* 모든 테이블 셀 중앙 정렬 강제 */
    }
    table th {
        font-size: 0.9rem !important;    /* 0.55rem → 0.9rem 대폭 증가 */
        padding: 4px 2px !important;
        min-height: 32px !important;
    }
    table td {
        font-size: 0.55rem !important;
        padding: 3px 1px !important;
        min-height: 28px !important;
    }
    /* 🏆 순위 컬럼 - 최소화 */
    table th:nth-child(1),
    table td:nth-child(1) {
        width: 30px !important;        /* 480px 이하에서 순위 컨럼 크기 대폭 증가 */
        min-width: 30px !important;
        max-width: 30px !important;
        padding: 3px 1px !important;
    }
    /* 🏟️ 팀명 컬럼 - 최소화 + 스티키 유지 (로고 숨김) */
    table th:nth-child(2),
    table td:nth-child(2) {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        width: 45px !important;        /* 480px 이하에서 팀명 컨럼 크기 대폭 증가 */
        min-width: 45px !important;
        max-width: 45px !important;
        padding: 3px 1px !important;
        border-right: 2px solid var(--border-strong) !important;
        box-shadow: 2px 0 3px rgba(0,0,0,0.1) !important;
    }
    table th:nth-child(2) {
        z-index: 15 !important;
        background: var(--primary-color) !important;
    }
    table td:nth-child(2) {
        background: var(--bg-secondary) !important;
    }
    /* 🎨 로고 완전 숨김 */
    table td:nth-child(2) .team-logo {
        display: none !important;
    }
    /* 📊 데이터 컬럼 최소화 */
    table th:nth-child(n+3),
    table td:nth-child(n+3) {
        min-width: 35px !important;
        max-width: 60px !important;
        font-size: 0.55rem !important;
        padding: 3px 1px !important;
    }
    /* 특수 컬럼 추가 축소 - 폰트 크기 통일 */
    #standings-table th:nth-child(13), 
    #standings-table td:nth-child(13) { 
        font-size: inherit !important;  /* 다른 셀과 동일한 폰트 크기로 통일 */
        min-width: 75px !important;    /* 480px 이하에서도 최근10경기 컨럼 크기 증가 */
        max-width: 95px !important;    /* 480px 이하 최대 크기 증가 */
    }
    /* 상대전적 테이블 최소화 */
    .vs-grid {
        grid-template-columns: 80px repeat(10, 105px) !important;
    }
    
    .vs-grid > div {
        font-size: 0.8rem !important;
        padding: 4px 2px !important;
        min-height: 45px !important;
        min-width: 105px !important;
    }
    
    /* 소형 모바일에서도 스티키 유지 */
    .vs-grid > div:nth-child(11n+1) {
        position: sticky;
        left: 0;
        z-index: 15;
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
    }
    
    .vs-header, .vs-team {
        font-size: 0.75rem !important;
    }
    /* 네비게이션 패딩 축소 */
    .nav-item {
        padding: 8px 12px;
        font-size: var(--text-sm);
    }
}

/* ========================================
   푸터 스타일
   ======================================== */
   
.footer {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #ffffff;
    margin-top: 50px;
    padding: 40px 20px 20px 20px;
    width: 100%;
    font-family: 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.12);
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-section h3 {
    color: #ffd700;
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section h4 {
    color: #ffab91;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.team-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    justify-content: flex-start;
}

.team-link-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-link-item:hover {
    color: #ffd700;
}

.team-logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffd700;
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* 푸터 반응형 */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .team-links {
        grid-template-columns: repeat(2, 1fr);
    }
}