/*
Theme Name: NPB Stadium Mapper Theme (Final Precision Layout)
Description: 1400px固定・メインコンテンツ幅フッター整列版
Version: 1.7
*/

/* --- 1. 画面全体の幅をPCサイズに完全固定 --- */
html, body { 
    background: #0a192f; 
    margin: 0; 
    padding: 0;
    width: 1400px; 
}

body { 
    font-family: 'Helvetica Neue', Arial, sans-serif; 
    color: #e6edf3; 
    padding: 30px 0; 
    overflow-x: hidden; 
}

.container { 
    width: 1340px; 
    margin: 0 auto; 
}

h1 { text-align: center; color: #58a6ff; margin-bottom: 25px; font-size: 2.2rem; }
h1 small { display: block; font-size: 0.8rem; color: #8b949e; margin-top: 8px; }

/* --- 2. 3カラム構造の維持 --- */
.main-layout { 
    display: flex; 
    flex-direction: row; 
    gap: 25px; 
    align-items: flex-start;
    width: 100%;
}

.main-content { 
    flex: 1; 
    min-width: 930px; /* メインコンテンツの基準幅 */
}

.sidebar { 
    width: 180px; 
    flex-shrink: 0; 
    position: sticky; 
    top: 20px; 
}

.widget-item { background: #161b22; border: 1px solid #30363d; border-radius: 12px; margin-bottom: 20px; padding: 10px; text-align: center; min-height: 200px; box-sizing: border-box;}

/* --- 3. ガイドセクション --- */
.guide-section { 
    background: rgba(88, 166, 255, 0.05); 
    border: 1px solid #30363d; 
    border-radius: 12px; 
    padding: 25px; 
    margin-bottom: 25px; 
    display: flex; 
    flex-direction: row; 
    gap: 30px; 
    box-sizing: border-box;
}

.guide-box { flex: 1; }
.guide-box h3 { font-size: 1rem; color: #58a6ff; margin: 0 0 15px 0; border-left: 4px solid #58a6ff; padding-left: 12px; }
.guide-box ul { padding: 0; margin: 0; list-style: none; }
.guide-box li { display: flex; align-items: flex-start; margin-bottom: 10px; font-size: 0.85rem; line-height: 1.6; }
.guide-box b { color: #ffa657; white-space: nowrap; margin-right: 5px; min-width: 110px; }
.guide-box .colon { margin-right: 10px; color: #8b949e; }
.guide-text { flex: 1; white-space: normal; }

/* --- 4. コントロールエリア --- */
.controls { 
    background: #161b22; 
    padding: 25px; 
    border-radius: 12px; 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    margin-bottom: 30px; 
    border: 1px solid #30363d; 
    box-sizing: border-box;
}

.control-group { display: flex; flex-direction: column; justify-content: center; }
label { font-size: 0.85rem; color: #8b949e; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; white-space: nowrap; }
.value-display { color: #ffa657; font-weight: bold; font-size: 1.2rem; font-family: 'Consolas', monospace; }
input[type="range"] { width: 100%; cursor: pointer; accent-color: #58a6ff; height: 12px; margin: 10px 0; }

.phys-btn { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; padding: 12px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: bold; width: 100%; transition: 0.2s; text-align: center; }
.phys-btn.active { background: #238636; color: white; border-color: #2ea043; }
.share-btn { background: #58a6ff; color: #0a192f; border: none; }

/* --- 5. リーグ表示と結果カード --- */
.league-split-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    width: 100%;
}

.results-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px; 
}

.stadium-card { 
    background: #0d1117; 
    border: 1px solid #30363d; 
    padding: 15px; 
    border-radius: 12px; 
    position: relative; 
    overflow: hidden; 
    height: 180px; 
    box-sizing: border-box;
}

.stadium-card.is-hr { border: 2px solid #f85149; background: linear-gradient(135deg, #0d1117 0%, rgba(248, 81, 73, 0.15) 100%); }
.stadium-card.is-hr::after { content: "HR"; position: absolute; top: 12px; right: -22px; background: #da3633; color: white; padding: 2px 25px; transform: rotate(45deg); font-size: 0.7rem; font-weight: bold; }

.stadium-name, .data-row, .data-label, .data-val { white-space: nowrap; }
.stadium-name { font-weight: bold; font-size: 1.05rem; color: #fff; display: block; margin-bottom: 10px; border-bottom: 1px solid #30363d; padding-bottom: 8px; overflow: hidden; text-overflow: ellipsis; }
.data-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.data-label { color: #8b949e; font-size: 0.75rem; }
.data-val { font-family: 'Consolas', monospace; font-weight: bold; font-size: 0.9rem; }
.tag-info { font-size: 0.6rem; color: #ffa657; font-style: italic; margin-top: 8px; text-align: center; background: rgba(255, 166, 87, 0.1); padding: 3px; border-radius: 4px; border: 1px dashed rgba(255, 166, 87, 0.2); white-space: normal; }

/* --- 6. フッター（メインコンテンツの幅 930px に整列） --- */
.disclaimer { 
    margin-top: 40px; 
    padding: 20px 0; 
    border-top: 1px solid #30363d; 
    text-align: left; 
    color: #8b949e; 
    font-size: 0.8rem; 
    line-height: 1.8; 
    width: 930px; /* メインコンテンツの幅に合わせる */
    margin-left: 205px; /* 左サイドバー(180px) + 隙間(25px) 分だけ右へ */
    box-sizing: border-box; 
}

.copyright { 
    margin-top: 20px; 
    text-align: center; 
    color: #484f58; 
    font-size: 0.75rem; 
    padding-bottom: 40px; 
    width: 930px;
    margin-left: 205px;
}
