/*
Theme Name: MLB Data Minimal Portal
Theme URI: https://trendpick100.com
Description: MLB Stats API 연동 및 애드센스 최적화 정보 포털용 커스텀 테마
Version: 1.0.0
Author: Park Chang-su
*/

/* --- 기본 초기화 및 코어 --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans KR', sans-serif; }
body { background-color: #f4f6f9; color: #1e293b; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- 최상단 네비게이션 헤더 (GNB) --- */
header { background-color: #0a192f; color: #ffffff; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; color: #38bdf8; display: flex; align-items: center; gap: 8px; }
.logo span { color: #ffffff; }
.main-menu { display: flex; list-style: none; gap: 30px; height: 100%; }
.main-menu li { height: 100%; }
.main-menu a { display: flex; align-items: center; height: 100%; padding: 0 4px; font-size: 16px; font-weight: 600; color: #cbd5e1; transition: color 0.2s; position: relative; }
.main-menu a:hover, .main-menu a.active { color: #ffffff; }
.main-menu a.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background-color: #38bdf8; border-radius: 2px 2px 0 0; }

/* --- 경기 일정/결과 미니 보드 (Ticker) --- */
.match-ticker-bar { background-color: #1e293b; padding: 12px 0; border-bottom: 1px solid #334155; overflow-x: auto; white-space: nowrap; }
.ticker-container { display: flex; gap: 15px; }
.ticker-item { background: #0f172a; border: 1px solid #334155; border-radius: 6px; padding: 8px 12px; min-width: 180px; display: inline-block; font-size: 13px; color: #94a3b8; }
.ticker-item .status { font-size: 11px; font-weight: bold; margin-bottom: 4px; display: flex; justify-content: space-between; }
.ticker-item .status.live { color: #ef4444; }
.ticker-item .team-row { display: flex; justify-content: space-between; color: #f1f5f9; font-weight: 500; margin: 2px 0; }
.ticker-item .team-row.win { font-weight: 700; color: #38bdf8; }

/* --- 메인 레이아웃 (Grid 시스템) --- */
.main-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-top: 24px; margin-bottom: 40px; }
@media (max-width: 992px) { .main-layout { grid-template-columns: 1fr; } }

/* 섹션 공통 스타일 */
.section-box { background: #ffffff; border-radius: 12px; border: 1px solid #e2e8f0; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 24px; }
.section-title { font-size: 18px; font-weight: 700; color: #0f172a; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; border-left: 4px solid #0a192f; padding-left: 10px; }
.section-title .more { font-size: 13px; color: #64748b; font-weight: 400; }

/* --- 코리안리거 섹션 스타일 --- */
.korean-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.player-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; transition: all 0.2s; }
.player-card:hover { transform: translateY(-2px); border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.player-info { display: flex; justify-content: space-between; margin-bottom: 12px; }
.player-info .name { font-size: 16px; font-weight: 700; color: #0f172a; }
.player-info .team { font-size: 12px; color: #64748b; font-weight: 600; background: #e2e8f0; padding: 2px 6px; border-radius: 4px; }
.player-stats { display: flex; gap: 12px; background: #ffffff; padding: 8px; border-radius: 6px; border: 1px solid #f1f5f9; text-align: center; }
.player-stats div { flex: 1; }
.player-stats span { display: block; font-size: 11px; color: #64748b; }
.player-stats strong { font-size: 14px; color: #0f172a; }

/* --- 스탯 랭킹 테이블 (메인 센터 보드) --- */
.ranking-tables-container { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .ranking-tables-container { grid-template-columns: 1fr; } }
.stat-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stat-table th { background-color: #f8fafc; color: #475569; font-weight: 600; padding: 8px 12px; text-align: left; border-bottom: 2px solid #e2e8f0; }
.stat-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.stat-table tr:hover { background-color: #f8fafc; }
.stat-table .rank { font-weight: 700; color: #64748b; width: 30px; }
.stat-table .p-name { font-weight: 600; color: #0f172a; }
.stat-table .p-team { font-size: 12px; color: #94a3b8; margin-left: 4px; }
.stat-table .value { text-align: right; font-weight: 700; color: #0a192f; }
.stat-table .value.highlight { color: #ef4444; }

/* --- 우측 사이드바 및 순위 위젯 고도화 스타일 --- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.ads-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 13px; text-align: center; min-height: 250px; }
.ads-premium { min-height: 100px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 20px; }

.ranking-widget { padding: 20px !important; }
.widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }
.widget-title { font-size: 15px; font-weight: 700; color: #0f172a; }
.league-tabs { display: flex; background: #f1f5f9; padding: 2px; border-radius: 6px; }
.tab-btn { background: transparent; border: none; padding: 4px 12px; font-size: 12px; font-weight: 700; color: #64748b; cursor: pointer; border-radius: 4px; transition: all 0.2s; }
.tab-btn.active { background: #ffffff; color: #0a192f; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.division-block { margin-bottom: 18px; }
.division-block:last-child { margin-bottom: 0; }
.division-title { font-size: 12px; font-weight: 700; color: #64748b; background: #f8fafc; padding: 4px 8px; border-radius: 4px; margin-bottom: 6px; border-left: 3px solid #38bdf8; }
.widget-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.widget-table td { padding: 6px 8px; border-bottom: 1px solid #f8fafc; color: #334155; }
.widget-table .rank { font-weight: 700; color: #94a3b8; width: 25px; text-align: center; }
.widget-table .t-name { font-weight: 500; }
.widget-table .value { text-align: right; font-weight: 600; color: #475569; }
.widget-table .highlight-row { background-color: #f0f9ff; font-weight: 700; }
.widget-table .highlight-row .t-name { color: #0284c7; }
.league-content { display: none; }
.league-content.active { display: block; }