:root {
    --primary-color: #1b95e0;
    --background-color: #f8f9fa;
    --text-color: #333333;
    --border-color: #dee2e6;
}

body {
    font-family: "Noto Sans JP", sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.champion-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.champion-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.champion-name {
    font-weight: 500;
    min-width: 150px;
}

.skill-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.skill-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.skill-radio:hover {
    background-color: #f0f0f0;
}

.skill-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.skill-label {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.skill-radio input[type="radio"]:checked + .skill-label {
    color: white;
    font-weight: bold;
}

/* スキルレベルごとの色設定 */
.skill-label.bad {
    border-color: #ff4444;
}
.skill-radio input[type="radio"]:checked + .skill-label.bad {
    background-color: #ff4444;
}

.skill-label.novice {
    border-color: #999999;
}
.skill-radio input[type="radio"]:checked + .skill-label.novice {
    background-color: #999999;
}

.skill-label.beginner {
    border-color: #4CAF50;
}
.skill-radio input[type="radio"]:checked + .skill-label.beginner {
    background-color: #4CAF50;
}

.skill-label.intermediate {
    border-color: #2196F3;
}
.skill-radio input[type="radio"]:checked + .skill-label.intermediate {
    background-color: #2196F3;
}

.skill-label.advanced {
    border-color: #9C27B0;
}
.skill-radio input[type="radio"]:checked + .skill-label.advanced {
    background-color: #9C27B0;
}

.skill-label.master {
    border-color: #FF9800;
}
.skill-radio input[type="radio"]:checked + .skill-label.master {
    background-color: #FF9800;
}

.skill-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.skill-radio:hover {
    background-color: #f0f0f0;
}

.skill-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.skill-label {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.skill-radio input[type="radio"]:checked + .skill-label {
    color: white;
    font-weight: bold;
}

/* スキルレベルごとの色設定 */
.skill-label.bad {
    border: 1px solid #ff4444;
}
.skill-radio input[type="radio"]:checked + .skill-label.bad {
    background-color: #ff4444;
}

.skill-label.novice {
    border: 1px solid #999999;
}
.skill-radio input[type="radio"]:checked + .skill-label.novice {
    background-color: #999999;
}

.skill-label.beginner {
    border: 1px solid #4CAF50;
}
.skill-radio input[type="radio"]:checked + .skill-label.beginner {
    background-color: #4CAF50;
}

.skill-label.intermediate {
    border: 1px solid #2196F3;
}
.skill-radio input[type="radio"]:checked + .skill-label.intermediate {
    background-color: #2196F3;
}

.skill-label.advanced {
    border: 1px solid #9C27B0;
}
.skill-radio input[type="radio"]:checked + .skill-label.advanced {
    background-color: #9C27B0;
}

.skill-label.master {
    border: 1px solid #FF9800;
}
.skill-radio input[type="radio"]:checked + .skill-label.master {
    background-color: #FF9800;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
}

.submit-button, .back-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 240px;
    text-align: center;
}

.scroll-bottom-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 2rem;
}

.submit-button:hover, .back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.submit-button:active, .back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scroll-bottom-button:hover {
    opacity: 0.9;
}

.scroll-bottom-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-top: 0;
}

.result-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.champion-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.table-controls {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.control-select,
.control-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.control-input {
    min-width: 200px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.champions-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.champions-table th,
.champions-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.champions-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.champions-table tbody tr:hover {
    background-color: #f8f9fa;
}

.skill-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: white;
}

.skill-badge.master {
    background-color: #FF9800;
}

.skill-badge.advanced {
    background-color: #9C27B0;
}

.skill-badge.intermediate {
    background-color: #2196F3;
}

.skill-badge.beginner {
    background-color: #4CAF50;
}

.skill-badge.novice {
    background-color: #9E9E9E;
}

.skill-badge.bad {
    background-color: #F44336;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: #e9ecef;
    margin: 0.1rem;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stats-group {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-group h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.stats-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-group li {
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.stats-group li:last-child {
    border-bottom: none;
}

.role-lists, .type-lists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.role-group, .type-group {
    margin-bottom: 1rem;
}

.role-group h4, .type-group h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .main {
        padding: 1rem;
    }
    
    .champion-item {
        grid-template-columns: 1fr;
    }
    
    .skill-select {
        width: 100%;
    }
}
