/* 全体の基本スタイル */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    color: #333333;
}

/* コンテナ */
.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* グループタイトル */
.group-title {
    color: #1a365d;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 0.05em;
}

/* タイトルの下の横棒（区切り線） */
.title-divider {
    width: 100%;
    height: 3px;
    background-color: #2b6cb0;
    border-radius: 2px;
    margin-bottom: 25px;
}

/* グループタブ（横スクロール仕様） */
.group-tab-container {
    /* display: none; */
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 25px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

/* スクロールバーの調整 */
.group-tab-container::-webkit-scrollbar {
    height: 4px;
}
.group-tab-container::-webkit-scrollbar-thumb {
    background-color: #bee3f8;
    border-radius: 2px;
}

/* 各タブボタンのスタイル */
.tab-item {
    display: inline-block;
    padding: 8px 18px;
    margin-right: 8px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    color: #4299e1;
    background-color: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.tab-item:last-child {
    margin-right: 0;
}

.tab-item.active {
    color: #ffffff;
    background-color: #2b6cb0;
    border-color: #2b6cb0;
}

.tab-item:hover:not(.active) {
    background-color: #dee3f8;
    border-color: #4299e1;
}

/* ゲームアイコンのグリッド配置（3列） */
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 16px;
    width: 100%;
    margin-top: 10px;
}

/* ゲーム1つ分を包むボックス */
.game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

/* ゲームアイコン本体 */
.game-icon-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #63b3ed 0%, #4299e1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* ゲームタイトルテキスト */
.game-text {
    margin-top: 8px;
    font-size: 13px;
    font-weight: bold;
    color: #2d3748;
    text-align: center;
    word-break: break-all;
}

/* マウスホバー時の動き */
.game-item:hover .game-icon-box {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(66, 153, 225, 0.3);
}
.game-item:hover .game-text {
    color: #4299e1;
}

/* ゲームなし表示 */
.no-games {
    color: #a0aec0;
    font-size: 14px;
    text-align: center;
    padding: 40px 0;
    grid-column: 1 / -1;
}

/* 下部の余白 */
.spacer {
    height: 1000px;
}

/* TOPボタン */
.top-button {
    position: fixed;
    bottom: 20px;
    left: calc(50% + 250px - 60px - 20px);
    z-index: 999;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #2b6cb0;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.top-button:hover {
    transform: scale(1.1);
    background-color: #1a365d;
}

@media (max-width: 540px) {
    .top-button {
        left: auto;
        right: 20px;
    }
}
