@import url('https://fonts.googleapis.com/css2?family=Mochiy+Pop+One&family=Kosugi+Maru&display=swap');

/* --- 変数定義: 統一感のあるポップな配色 --- */
:root {
    --primary: #FFDE59;   /* メインイエロー */
    --secondary: #64C5EB; /* スカイブルー */
    --accent: #FF9BCC;    /* ピンク */
    --white: #ffffff;
    --dark: #444444;
    --gray: #f4f8fb;
    --shadow: 0 8px 0 rgba(0,0,0,0.1); /* ポップな影 */
    --radius: 24px;
}

body {
    font-family: 'Kosugi Maru', sans-serif;
    background-color: var(--gray);
    color: var(--dark);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- ヘッダー --- */
.site-header {
    background: var(--primary);
    padding: 40px 20px;
    text-align: center;
    border-bottom: 8px solid #f0c400;
}

.logo-text {
    font-family: 'Mochiy Pop One', cursive;
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--white);
    text-shadow: 3px 3px 0 var(--dark), 6px 6px 0 var(--accent);
    margin: 0;
    animation: popBounce 2s infinite ease-in-out;
}

@keyframes popBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.site-concept {
    font-weight: bold;
    color: #555;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* --- レイアウト --- */
.main-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- 独立したブロックのデザイン (重要！) --- */
.content-block {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    border: 4px solid var(--primary);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

/* イントロダクション */
.intro-section {
    text-align: center;
    border-color: var(--secondary);
}
.section-title {
    font-family: 'Mochiy Pop One', cursive;
    color: var(--secondary);
    margin-top: 0;
}

/* --- ゲームグリッド (レスポンシブ対応) --- */
.grid-heading {
    text-align: center;
    font-family: 'Mochiy Pop One', cursive;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.game-grid {
    display: grid;
    gap: 30px;
    /* デフォルト(スマホ): 1カラム */
    grid-template-columns: 1fr;
}

/* PC(768px以上): 2カラム */
@media (min-width: 768px) {
    .game-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- ゲームカードの個別デザイン --- */
.game-card {
    display: flex;
    flex-direction: column;
    border-width: 4px;
    padding: 20px;
}
.game-card:hover {
    transform: translateY(-5px);
}

/* カードごとの色分け */
.card-kuso { border-color: #8B4513; }
.card-map { border-color: #d32f2f; }
.card-science { border-color: #0077b6; }
.card-music { border-color: #2d5a27; }
.card-casual { border-color: #e67e22; }

.card-header h3 {
    font-family: 'Mochiy Pop One', cursive;
    margin: 10px 0;
    font-size: 1.4rem;
}

.category-badge {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    display: inline-block;
}
.type-jp { background: #8B4513; }
.type-social { background: #d32f2f; }
.type-science { background: #0077b6; }
.type-music { background: #2d5a27; }
.type-casual { background: #e67e22; }

/* --- サムネイル画像とリンク --- */
.thumb-link {
    display: block;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin: 15px 0;
    border: 3px solid #eee;
}

.game-thumb {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.play-overlay i {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.thumb-link:hover .game-thumb { transform: scale(1.05); }
.thumb-link:hover .play-overlay { opacity: 1; }

/* --- 折りたたみ（アコーディオン） --- */
.game-details {
    margin-bottom: 20px;
    border-top: 2px dashed #eee;
    padding-top: 10px;
}

.game-details summary {
    cursor: pointer;
    color: #666;
    font-weight: bold;
    font-size: 0.9rem;
    outline: none;
    list-style: none; /* 三角を消す(一部ブラウザ用) */
    text-align: right;
}
.game-details summary::-webkit-details-marker { display: none; }
.game-details summary::after { content: " ▼"; font-size: 0.8rem; }
.game-details[open] summary::after { content: " ▲"; }

.details-body {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #555;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    text-align: left;
}

.read-more-link {
    display: block;
    margin-top: 10px;
    text-align: right;
    color: var(--secondary);
    text-decoration: underline;
    font-weight: bold;
}

/* --- プレイボタン --- */
.btn-play {
    margin-top: auto; /* 下寄せ */
    background: #ff6b6b;
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 5px 0 #b33939;
    transition: transform 0.1s;
    display: block;
}
.btn-play:hover {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #b33939;
}

/* --- その他 --- */
.coming-soon {
    text-align: center;
    font-family: 'Mochiy Pop One', cursive;
    color: var(--accent);
    font-size: 1.2rem;
    border-style: dashed;
}

.ad-block {
    text-align: center;
    border-color: #ddd;
    box-shadow: none;
    background: transparent;
}
.ad-label { font-size: 0.7rem; color: #999; display: block; margin-bottom: 5px; }

/* --- フッター --- */
.site-footer {
    background: var(--dark);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 50px;
}

.footer-nav a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    display: inline-block;
}
.footer-nav a:hover { text-decoration: underline; }
.copyright { margin-top: 20px; opacity: 0.7; font-size: 0.8rem; }