body {
    font-family: Arial, sans-serif;
    margin: 0;
}

h2 {
    color: #333;
}

h2.page-title, h3 {
    color: #333;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin: 5px 0;
}

form {
    margin: 10px 0;
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-group label {
    flex: 0 0 150px;
    text-align: left;
}

.form-control {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

button, .btn-primary, .btn-secondary {
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 10px;
}

button:hover, .btn-primary:hover, .btn-secondary:hover {
    opacity: 0.9;
}

button, .btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-secondary {
    background-color: #f0ad4e;
    color: white;
}

table {
    width: auto;
    border-collapse: collapse;
    margin: 0 auto;
}

table, th, td {
    border: 1px solid black;
}

thead tr {
    background-color: #d9d9d9;
}

th {
    padding: 8px 12px;
    text-align: center;
    vertical-align: middle;
}

td {
    padding: 8px 12px;
    text-align: left;
}

.btn-delete {
    background-color: red;
}

.btn-spacing {
    margin-right: 10px;
}

.error-text {
    color: red;
    font-weight: bold;
    margin: 10px 0;
}

nav {
    position: relative;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.nav-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 220px;
    background-color: #333;
    color: white;
}

.nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 100%;
}

.nav-links li {
    list-style: none;
    text-align: center;
    margin: 20px 0;
    width: 100%;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    margin: 20px 0;
}


.nav-links a:hover {
    text-decoration: underline;
}

.flash-container {
    margin-top: 20px;
}

.main {
    margin-left: 240px;
    padding: 20px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.flash {
    padding: 5px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 12px;
    color: #fff;
}

.flash.success {
    background-color: #4CAF50; /* 緑色 */
}

.flash.danger {
    background-color: #f44336; /* 赤色 */
}

.pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-list li {
    margin: 0 5px;
}

.pagination-link {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #007bff;
}

.pagination-link:hover {
    background-color: #f1f1f1;
}

.pagination-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-link.disabled {
    color: #ccc;
    pointer-events: none;
    cursor: not-allowed;
}

.dashboard-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.dashboard-menu {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.dashboard-menu-item {
    list-style: none;
}

.dashboard-link {
    display: block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.edit-form {
    margin: 20px 0;
}

.inline-form {
    display: inline;
}

.error-container {
    margin-top: 10px;
}

.winner {
    background-color: lightgreen;
}

.loser {
    background-color: lightcoral;
}

.set-winner {
    color: red;
    font-weight: bold;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.table-header {
    background-color: #d9d9d9;
    font-weight: bold;
    text-align: center;
}

.set-row-1 {
    background-color: #f9f9f9;
}

.set-row-2 {
    background-color: #e9e9e9;
}

.set-row-3 {
    background-color: #f9f9f9;
}

.set-row-4 {
    background-color: #e9e9e9;
}

.player-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.player-info, .player-analysis, .player-rating-history, .player-team-info, .player-match-info {
    margin-bottom: 30px;
}

.analysis-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.stats-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-chart {
    width: 40%;
}

.stats-info {
    width: 50%;
}

/* 全体的なボックスのデフォルト設定を追加 */
* {
    box-sizing: border-box;
}

/* モバイル用ナビゲーションメニュー */
@media (max-width: 768px) {
    .main {
        margin-left: 0; /* モバイルではナビゲーションの幅を考慮しない */
        padding: 10px;
    }

    .nav-container {
        width: 100%; /* ナビゲーションを横幅いっぱいに広げる */
        height: auto;
        position: relative; /* スクロールを回避するために位置を修正 */
    }

    .nav-links {
        display: none; /* デフォルトでは非表示にする */
        flex-direction: column;
        width: 100%;
        background-color: #333;
    }

    .menu-toggle {
        display: block; /* メニューをハンバーガーメニューとして表示 */
        cursor: pointer;
        padding: 10px;
        background-color: #333;
        color: white;
        text-align: left;
    }

    .nav-links a {
        padding: 10px;
        text-align: left;
        width: 100%;
    }
}

/* デスクトップ用ナビゲーションメニュー */
@media (min-width: 769px) {
    .nav-links {
        display: flex; /* デスクトップ用では常に表示 */
    }

    .menu-toggle {
        display: none; /* デスクトップ用ではハンバーガーメニューを非表示にする */
    }
}

/* テーブルが画面幅に応じて自動調整される */
.responsive-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

.responsive-table th, .responsive-table td {
    padding: 8px;
    text-align: left;
}

.responsive-info-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

.responsive-info-table th {
    padding: 8px;
    text-align: left;
    background-color: #d9d9d9;
}

.responsive-info-table td {
    padding: 8px;
    text-align: left;
}
