/* 駅伝結果 インデックスページのスタイル - 汎用デザイン */

.resultContainer {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.resultContainer h1 {
    text-align: center;
    color: #333333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.resultTableWrapper {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
}

.resultTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #ffffff;
    min-width: 800px;
}

.resultTable thead {
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
}

.resultTable th {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: #555555;
    border-right: 1px solid #e0e0e0;
}

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

.resultTable th:first-child {
    width: 180px;
}

.resultTable th:nth-child(2) {
    width: 120px;
}

.resultTable th:nth-child(3),
.resultTable th:nth-child(4),
.resultTable th:nth-child(5) {
    width: 220px;
}

.resultTable tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.resultTable tbody tr:hover {
    background: #f9f9f9;
}

.resultTable tbody tr:nth-child(even) {
    background: #fafafa;
}

.resultTable tbody tr:nth-child(even):hover {
    background: #f5f5f5;
}

.resultTable td {
    padding: 1rem;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid #f0f0f0;
}

.resultTable td:last-child {
    border-right: none;
}

.resultYear {
    font-weight: 600;
    color: #333333;
    font-size: 0.95rem;
    white-space: nowrap;
}

.resultButtonCell {
    padding: 0.8rem !important;
}

.resultButton {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.resultButton:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.resultButton svg {
    width: 14px;
    height: 14px;
}

.resultTeam {
    font-weight: 500;
    line-height: 1.5;
    padding: 1rem 0.8rem !important;
    position: relative;
}

/* 順位アイコンのSVG */
.rank-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.resultTeam.gold {
    background: #ffffff;
    color: #333333;
    border-left: 3px solid #ffc107;
}

.resultTeam.silver {
    background: #ffffff;
    color: #333333;
    border-left: 3px solid #9e9e9e;
}

.resultTeam.bronze {
    background: #ffffff;
    color: #333333;
    border-left: 3px solid #ff9800;
}

/* メディアクエリ - タブレット */
@media screen and (max-width: 1024px) {
    .resultContainer {
        margin: 1.5rem;
        padding: 1.5rem;
    }
    
    .resultContainer h1 {
        font-size: 1.8rem;
    }
    
    .resultTable {
        font-size: 0.85rem;
    }
}

/* メディアクエリ - タブレット（小） */
@media screen and (max-width: 768px) {
    .resultContainer {
        margin: 1rem;
        padding: 1rem;
        border-radius: 6px;
    }
    
    .resultContainer h1 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .resultTable {
        font-size: 0.8rem;
        min-width: 700px;
    }
    
    .resultTable th,
    .resultTable td {
        padding: 0.8rem 0.6rem;
    }
    
    .resultTeam {
        padding: 0.8rem 0.6rem !important;
        font-size: 0.85rem;
    }
    
    .resultButton {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .rank-icon {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }
}

/* メディアクエリ - スマートフォン */
@media screen and (max-width: 480px) {
    .resultContainer {
        margin: 0.5rem;
        padding: 0.8rem;
        border-radius: 4px;
    }
    
    .resultContainer h1 {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .resultTable {
        font-size: 0.75rem;
        min-width: 650px;
    }
    
    .resultTable th,
    .resultTable td {
        padding: 0.6rem 0.4rem;
    }
    
    .resultYear {
        font-size: 0.8rem;
    }
    
    .resultTeam {
        padding: 0.6rem 0.4rem !important;
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .resultButton {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .rank-icon {
        width: 16px;
        height: 16px;
        margin-right: 4px;
    }
}

/* メディアクエリ - 極小スマートフォン */
@media screen and (max-width: 360px) {
    .resultContainer {
        margin: 0.25rem;
        padding: 0.6rem;
    }
    
    .resultContainer h1 {
        font-size: 1.2rem;
    }
    
    .resultTable {
        font-size: 0.7rem;
        min-width: 600px;
    }
    
    .resultTable th,
    .resultTable td {
        padding: 0.5rem 0.3rem;
    }
    
    .resultTeam {
        padding: 0.5rem 0.3rem !important;
        font-size: 0.75rem;
    }
    
    .resultButton {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* テーブルのスクロールバー */
.resultTableWrapper::-webkit-scrollbar {
    height: 6px;
}

.resultTableWrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.resultTableWrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.resultTableWrapper::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* フォーカス時のアクセシビリティ */
.resultButton:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* プリント時のスタイル */
@media print {
    .resultContainer {
        box-shadow: none;
        margin: 0;
        padding: 1rem;
        border: 1px solid #ccc;
    }
    
    .resultButton {
        background: #333 !important;
        color: white !important;
    }
    
    .resultTeam.gold,
    .resultTeam.silver,
    .resultTeam.bronze {
        background: white !important;
        color: black !important;
        border-left: 2px solid #333 !important;
    }
    
    .rank-icon {
        display: none;
    }
}

