/* 変更開始：ページ全体のベーススタイル */
body { 
    font-family: 'Helvetica Neue', Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif; 
    background: #f0f4f8; 
    text-align: center; 
    color: #333; 
    margin: 0; 
    padding: 10px; 
}

#app { 
    max-width: 800px; 
    margin: 20px auto; 
    padding: 25px; 
    background: #fff; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
}

/* タイトル周り：対抗戦らしい力強い色味に変更 */
h1 { 
    color: #d32f2f; /* 情熱的なレッドへ変更 */
    margin-bottom: 5px; 
    font-size: 1.8rem; 
    letter-spacing: -0.5px; 
    font-weight: 900;
}

p { 
    font-size: 0.9rem; 
    color: #555; 
    margin-bottom: 25px; 
    font-weight: bold;
}

.divider { 
    border: 0; 
    border-top: 1px solid #eee; 
    margin: 35px 0; 
}

/* ドーナツチャートのスタイル */
.chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

.chart-wrap {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    position: relative;
    background: #eee;
    transition: background 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    height: 65%;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

#total-votes { 
    font-size: 2rem; 
    font-weight: 900; 
    color: #333; 
    line-height: 1; 
}

.chart-center small { 
    font-size: 0.65rem; 
    color: #999; 
    font-weight: bold; 
    margin-top: 5px; 
    letter-spacing: 1px;
}

/* 凡例（レジェンド）のスタイル */
.legend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    text-align: left;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    gap: 8px;
    padding: 6px 10px;
    background: #f8f9fa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.legend-item:hover {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.dot { 
    width: 12px; 
    height: 12px; 
    border-radius: 3px; 
    flex-shrink: 0; 
}

.legend-item .name { 
    flex-grow: 1; 
    font-weight: bold; 
    color: #444; 
}

.legend-item .percent { 
    font-family: 'Courier New', Courier, monospace; 
    font-weight: bold;
    color: #777; 
}

/* 投票ボタンのグリッドレイアウト */
#vote-buttons { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
    gap: 15px; 
}

button { 
    padding: 18px 10px; 
    border: 1px solid #eef2f6; 
    border-radius: 16px; 
    cursor: pointer; 
    background: #ffffff; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

button:hover { 
    background: #fff; 
    border-color: #d32f2f; 
    transform: translateY(-4px); 
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.15); 
}

button:active { 
    transform: scale(0.92); 
}

button img { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    margin-bottom: 10px; 
    background: #fff; 
    border: 2px solid #fff; 
    box-shadow: 0 3px 8px rgba(0,0,0,0.1); 
    transition: transform 0.2s ease;
}

button:hover img {
    transform: scale(1.1);
}

button .school-name { 
    font-size: 0.85rem; 
    font-weight: 800; 
    color: #333; 
}

/* 変更開始：ボタン内の得票数（シンプルに n ）のスタイル */
.vote-count {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}
/* 変更終了 */

/* レスポンシブ調整 */
@media (max-width: 600px) {
    .legend-grid { grid-template-columns: repeat(2, 1fr); }
    h1 { font-size: 1.5rem; }
}

@media (max-width: 400px) {
    #vote-buttons { grid-template-columns: repeat(2, 1fr); }
    .chart-wrap { width: 200px; height: 200px; }
    .legend-grid { gap: 8px; }
    button { padding: 12px 5px; }
}
/* 変更終了 */