/* ゲーム作品ギャラリー スタイル */
/* サイトカラー: アクセント #ea5932, ボタン #fdd462, ボーダー #000 */

/* === レイアウト修正 === */
#main_col:has(#kgg-game-list) {
    width: 100%;
    max-width: 100%;
    float: none;
}

#main_contents:has(#kgg-game-list) {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === アーカイブ（一覧） === */
.kgg-filter {
    text-align: center;
    margin-bottom: 15px;
    padding: 0 20px;
}

.kgg-filter:last-of-type {
    margin-bottom: 40px;
}

.kgg-filter-label {
    display: inline-block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-right: 10px;
    vertical-align: middle;
}

.kgg-filter-link {
    display: inline-block;
    padding: 8px 20px;
    margin: 5px;
    border: 2px solid #333;
    border-radius: 100vmax;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.kgg-filter-link:hover {
    background-color: #fdd462;
    border-color: #000;
    color: #000;
}

.kgg-filter-link.is_active {
    background-color: #ea5932;
    color: #fff;
    border-color: #ea5932;
}

/* カード一覧 */
#kgg-game-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 0 20px;
}

.kgg-game-item {
    overflow: hidden;
    border-radius: 12px;
    border: 3px solid #000;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kgg-game-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kgg-game-item .link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.kgg-game-item .kgg-game-thumb {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    display: block;
}

.kgg-game-item .kgg-game-thumb > .image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    transition: transform 0.5s ease;
}

.kgg-game-item:hover .kgg-game-thumb > .image {
    transform: scale(1.05);
}

.kgg-game-info {
    padding: 15px;
    border-top: 2px solid #eee;
}

.kgg-author {
    display: inline-block;
    font-size: 12px;
    color: #ea5932;
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
}

.kgg-game-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
    margin: 0 0 8px;
    color: #333;
}

.kgg-game-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.6;
    margin: 0;
}

/* コース・年度バッジ（一覧カード内） */
.kgg-card-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.kgg-card-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 100vmax;
    font-size: 11px;
    color: #666;
}

/* Webアプリ用バッジ（カード内） */
.kgg-card-badge-webapp {
    background: #247bf4;
    color: #fff;
    border-color: #247bf4;
}

/* === 個別ページ === */
.kgg-single-author {
    font-size: 15px;
    color: #ea5932;
    font-weight: bold;
    margin-top: 10px;
}

.kgg-single-course a,
.kgg-single-year a {
    display: inline-block;
    padding: 4px 14px;
    background: #f7f7f7;
    border: 2px solid #ddd;
    border-radius: 100vmax;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    margin: 5px 5px 0 0;
    font-weight: bold;
    transition: all 0.3s ease;
}

.kgg-single-course a:hover,
.kgg-single-year a:hover {
    background: #ea5932;
    color: #fff;
    border-color: #ea5932;
}

/* ゲームプレイエリア */
.kgg-game-play-area {
    margin: 30px 0;
}

.kgg-game-iframe-wrap {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 12px;
    border: 3px solid #000;
    overflow: hidden;
}

.kgg-game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.kgg-game-play-link {
    text-align: center;
    margin-top: 15px;
}

.kgg-play-button {
    display: inline-block;
    padding: 14px 35px;
    background: #fdd462;
    color: #000;
    text-decoration: none;
    border: 3px solid #000;
    border-radius: 100vmax;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.kgg-play-button:hover {
    background: #ea5932;
    color: #fff;
    border-color: #ea5932;
}

.kgg-webapp-button {
    background: #247bf4;
    color: #fff;
    border-color: #247bf4;
    font-size: 18px;
    padding: 18px 50px;
}

.kgg-webapp-button:hover {
    background: #1a5fc0;
    border-color: #1a5fc0;
    color: #fff;
}

/* 一覧に戻るリンク */
.kgg-back-to-gallery {
    text-align: center;
    margin: 40px 0;
}

.kgg-back-to-gallery a {
    display: inline-block;
    padding: 14px 35px;
    border: 3px solid #000;
    color: #000;
    text-decoration: none;
    border-radius: 100vmax;
    font-weight: bold;
    transition: all 0.3s ease;
}

.kgg-back-to-gallery a:hover {
    background: #fdd462;
}

/* === レスポンシブ === */
@media screen and (max-width: 1024px) {
    #kgg-game-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    #kgg-game-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }

    .kgg-game-title {
        font-size: 14px;
    }

    .kgg-game-desc {
        font-size: 12px;
    }

    .kgg-filter-link {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    #kgg-game-list {
        grid-template-columns: 1fr;
    }
}
