/* アニマルキングダム - スタイルシート */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #0090BC;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    max-width: 500px;
    width: 90%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #DEA600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.description {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: #0090BC;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.score-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.score-box {
    background: #0090BC;
    color: white;
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    flex: 1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.score-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    opacity: 0.9;
}

.score {
    font-size: 1.5rem;
    font-weight: 700;
}

.game-board {
    background: #0090BC;
    border-radius: 15px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    aspect-ratio: 1;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 144, 188, 0.3);
}

.tile {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    transition: all 0.15s ease-in-out;
    position: relative;
    backdrop-filter: blur(5px);
}

.tile.tile-2 { background: #FEF3C7; color: #92400E; border: 2px solid #FDE68A; } /* ネズミ - 茶色系 */
.tile.tile-4 { background: #FCE7F3; color: #BE185D; border: 2px solid #FBCFE8; } /* ウサギ - ピンク系 */
.tile.tile-8 { background: #BAE6FD; color: #0F172A; border: 2px solid #7DD3FC; }
.tile.tile-16 { background: #7DD3FC; color: #0F172A; border: 2px solid #38BDF8; }
.tile.tile-32 { background: #38BDF8; color: #FFFFFF; border: 2px solid #0EA5E9; }
.tile.tile-64 { background: #0EA5E9; color: #FFFFFF; border: 2px solid #0284C7; }
.tile.tile-128 { background: #FFD700; color: #0F172A; font-size: 1.8rem; border: 2px solid #FFC107; box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
.tile.tile-256 { background: #FFC107; color: #0F172A; font-size: 1.8rem; border: 2px solid #FFB300; box-shadow: 0 0 10px rgba(255, 193, 7, 0.3); }
.tile.tile-512 { background: #FFB300; color: #0F172A; font-size: 1.8rem; border: 2px solid #FFA000; box-shadow: 0 0 10px rgba(255, 179, 0, 0.3); }
.tile.tile-1024 { background: #1E40AF; color: #FFD700; font-size: 1.6rem; border: 2px solid #1E3A8A; box-shadow: 0 0 15px rgba(30, 64, 175, 0.4); }
.tile.tile-2048 { background: #1E3A8A; color: #FFD700; font-size: 1.6rem; border: 2px solid #0F172A; box-shadow: 0 0 20px rgba(30, 58, 138, 0.5); }

/* 動物キャラクター表示用スタイル */
.animal-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.animal-emoji {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 2px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

.animal-name {
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.animal-number {
    font-size: 0.5rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 数字が大きくなるほど動物キャラクターのサイズを調整 */
.tile.tile-128 .animal-emoji { font-size: 2rem; }
.tile.tile-256 .animal-emoji { font-size: 2.2rem; }
.tile.tile-512 .animal-emoji { font-size: 2.4rem; }
.tile.tile-1024 .animal-emoji { font-size: 2.6rem; }
.tile.tile-2048 .animal-emoji { font-size: 3rem; }

.tile.tile-128 .animal-name { font-size: 0.7rem; }
.tile.tile-256 .animal-name { font-size: 0.75rem; }
.tile.tile-512 .animal-name { font-size: 0.8rem; }
.tile.tile-1024 .animal-name { font-size: 0.85rem; }
.tile.tile-2048 .animal-name { font-size: 0.9rem; }

.tile.tile-128 .animal-number { font-size: 0.6rem; }
.tile.tile-256 .animal-number { font-size: 0.65rem; }
.tile.tile-512 .animal-number { font-size: 0.7rem; }
.tile.tile-1024 .animal-number { font-size: 0.75rem; }
.tile.tile-2048 .animal-number { font-size: 0.8rem; }

/* ゲーム画面用の動物キャラクター表示スタイル */
.game-animal-display {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.game-animal-emoji {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 動物の実際の大きさに合わせてアイコンサイズを調整 */
/* 極小動物 */
.tile.tile-2 .game-animal-emoji { font-size: 1.8rem; } /* ネズミ - 極小 */
.tile.tile-4 .game-animal-emoji { font-size: 2.0rem; } /* ウサギ - 小さい */
.tile.tile-8 .game-animal-emoji { font-size: 2.2rem; } /* ネコ - 小さい */

/* 中型動物 */
.tile.tile-16 .game-animal-emoji { font-size: 2.4rem; } /* アライグマ - 中程度 */
.tile.tile-32 .game-animal-emoji { font-size: 2.6rem; } /* キツネ - 中程度 */
.tile.tile-64 .game-animal-emoji { font-size: 2.8rem; } /* イヌ - 中程度 */

/* 大型動物 */
.tile.tile-128 .game-animal-emoji { font-size: 3.0rem; } /* ヒツジ - 大きい */
.tile.tile-256 .game-animal-emoji { font-size: 3.2rem; } /* シカ - 大きい */
.tile.tile-512 .game-animal-emoji { font-size: 3.4rem; } /* ライオン - 大きい */

/* 巨大動物 */
.tile.tile-1024 .game-animal-emoji { font-size: 3.8rem; } /* ゾウ - 巨大 */
.tile.tile-2048 .game-animal-emoji { font-size: 4.2rem; } /* クジラ - 超巨大 */

.game-controls {
    text-align: center;
    margin-bottom: 20px;
}

.new-game-btn {
    background: #0090BC;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.new-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: #DEA600;
    color: #0090BC;
}

.instructions {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* モバイル対応 */
@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    .tile {
        font-size: 1.5rem;
    }
    
    .tile.tile-128,
    .tile.tile-256,
    .tile.tile-512 {
        font-size: 1.3rem;
    }
    
    .tile.tile-1024,
    .tile.tile-2048 {
        font-size: 1.1rem;
    }
    
    /* モバイル版：広告をゲームエリアの下に配置 */
    .main-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .ad-area {
        order: 2; /* ゲームエリアの後に表示 */
        flex-direction: row; /* モバイルでは横並び */
        justify-content: center;
        gap: 15px;
        margin-top: 0;
    }
    
    .game-area {
        order: 1; /* ゲームエリアを最初に表示 */
    }
    
    /* モバイル版：広告サイズ調整 */
    .ad-container {
        width: 150px !important;
        height: auto !important;
        min-height: auto !important;
        margin-top: 0 !important;
    }
    
    .ad-container img {
        width: 150px !important;
        height: auto !important;
        max-width: 100%;
    }
}

/* メインコンテンツ - 横並びレイアウト */
.main-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

/* 広告エリア（ゲームエリアの右側、縦並び） */
.ad-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* 広告コンテナ */
.ad-container {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.ad-container a {
    display: inline-block;
    text-decoration: none;
}

.ad-container img {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.ad-container img:hover {
    transform: scale(1.02);
}

/* モバイル用 - 縦並びレイアウト */
@media (max-width: 767px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }
    
    .ad-container {
        margin-top: 0;
        order: 2;
    }
    
    .game-container {
        order: 1;
    }
}

/* デスクトップ用 - 横並びレイアウト */
@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    
    .container {
        max-width: 900px;
    }
    
    .main-content {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .game-container {
        flex: 1;
        max-width: 500px;
    }
    
    .ad-container {
        margin-top: 20px;
        margin-left: 20px;
    }
}

/* howto.html用のスタイル */
.howto-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #DEA600;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 目次 */
.table-of-contents {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #DEA600;
}

.table-of-contents h3 {
    color: #DEA600;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.table-of-contents ol {
    list-style: none;
    counter-reset: item;
}

.table-of-contents li {
    counter-increment: item;
    margin-bottom: 8px;
    position: relative;
    padding-left: 30px;
}

.table-of-contents li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    background: #DEA600;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.table-of-contents a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.table-of-contents a:hover {
    color: #DEA600;
    text-decoration: underline;
}

/* セクション共通スタイル */
.content-section {
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(222, 166, 0, 0.2);
}

.content-section h2 {
    color: #DEA600;
    margin-bottom: 15px;
    font-size: 2rem;
    border-bottom: 3px solid #DEA600;
    padding-bottom: 15px;
    text-align: center;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 基本ルールセクション */
.rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.rule-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #DEA600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.rule-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 15px;
}

.rule-card h3 {
    color: #DEA600;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.rule-card p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 0;
}

.control-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-label {
    font-weight: bold;
    color: #DEA600;
    font-size: 0.9rem;
}

.control-desc {
    color: #555;
    font-size: 0.9rem;
}

.rule-list {
    margin: 0;
    padding-left: 20px;
}

.rule-list li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* 動物タイルセクション */
.animal-progression {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.animal-tier {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #DEA600;
}

.animal-tier.ultimate {
    border: 3px solid #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0.8));
}

.animal-tier h4 {
    color: #DEA600;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
    border-bottom: 2px solid #DEA600;
    padding-bottom: 10px;
}

.animal-tier.ultimate h4 {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

.tile-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.tile-info {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 2px solid #DEA600;
    transition: transform 0.3s ease;
}

.tile-info:hover {
    transform: scale(1.05);
}

.tile-info.ultimate-tile {
    border: 3px solid #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0.9));
}

.tile-example {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 動物の実際の大きさに合わせてhowto.htmlのアイコンサイズを調整 */
/* 極小動物 */
.tile-2 .animal-emoji { font-size: 1.2rem; } /* ネズミ - 極小 */
.tile-4 .animal-emoji { font-size: 1.4rem; } /* ウサギ - 小さい */
.tile-8 .animal-emoji { font-size: 1.5rem; } /* ネコ - 小さい */

/* 中型動物 */
.tile-16 .animal-emoji { font-size: 1.6rem; } /* アライグマ - 中程度 */
.tile-32 .animal-emoji { font-size: 1.7rem; } /* キツネ - 中程度 */
.tile-64 .animal-emoji { font-size: 1.8rem; } /* イヌ - 中程度 */

/* 大型動物 */
.tile-128 .animal-emoji { font-size: 1.9rem; } /* ヒツジ - 大きい */
.tile-256 .animal-emoji { font-size: 2.0rem; } /* シカ - 大きい */
.tile-512 .animal-emoji { font-size: 2.1rem; } /* ライオン - 大きい */

/* 巨大動物 */
.tile-1024 .animal-emoji { font-size: 2.3rem; } /* ゾウ - 巨大 */
.tile-2048 .animal-emoji { font-size: 2.5rem; } /* クジラ - 超巨大 */

.tile-info h5 {
    color: #DEA600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: bold;
}

.tile-info.ultimate-tile h5 {
    color: #FFD700;
}

.tile-info p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* 攻略法セクション */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.strategy-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #DEA600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.strategy-card.priority-high {
    border-color: #FF6B6B;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(255, 255, 255, 0.8));
}

.strategy-card.priority-medium {
    border-color: #4ECDC4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05), rgba(255, 255, 255, 0.8));
}

.strategy-card.priority-low {
    border-color: #45B7D1;
    background: linear-gradient(135deg, rgba(69, 183, 209, 0.05), rgba(255, 255, 255, 0.8));
}

.strategy-number {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #DEA600;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.strategy-card.priority-high .strategy-number {
    background: #FF6B6B;
}

.strategy-card.priority-medium .strategy-number {
    background: #4ECDC4;
}

.strategy-card.priority-low .strategy-number {
    background: #45B7D1;
}

.strategy-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    margin-top: 10px;
}

.strategy-card p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.strategy-tip {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid #FFD700;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* コツセクション */
.tips-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.tip-category {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #4CAF50;
}

.tip-category h4 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.tip-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-content strong {
    color: #4CAF50;
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.tip-content p {
    color: #555;
    line-height: 1.5;
    font-size: 0.9rem;
    margin: 0;
}

/* 間違いセクション */
.mistakes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.mistake-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #DEA600;
    transition: transform 0.3s ease;
    position: relative;
}

.mistake-card:hover {
    transform: translateY(-5px);
}

.mistake-card.critical {
    border-color: #FF6B6B;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(255, 255, 255, 0.8));
}

.mistake-card.warning {
    border-color: #FFA726;
    background: linear-gradient(135deg, rgba(255, 167, 38, 0.05), rgba(255, 255, 255, 0.8));
}

.mistake-card.info {
    border-color: #42A5F5;
    background: linear-gradient(135deg, rgba(66, 165, 245, 0.05), rgba(255, 255, 255, 0.8));
}

.mistake-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 15px;
}

.mistake-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.mistake-card p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.mistake-solution {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4CAF50;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #2E7D32;
    font-weight: 500;
}

.back-to-game {
    text-align: center;
    margin: 40px 0;
}

.play-button {
    display: inline-block;
    background: linear-gradient(45deg, #DEA600, #FFD700);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(222, 166, 0, 0.3);
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 166, 0, 0.4);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #666;
}

footer nav a {
    color: #DEA600;
    text-decoration: none;
    margin: 0 5px;
}

footer nav a:hover {
    text-decoration: underline;
}

/* レスポンシブデザイン for howto.html */
@media (max-width: 768px) {
    .howto-content {
        padding: 10px;
    }
    
    .content-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .rule-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .animal-progression {
        gap: 20px;
    }
    
    .tile-row {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .strategy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tips-container {
        gap: 20px;
    }
    
    .tip-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mistakes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tile-example {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .table-of-contents {
        padding: 15px;
    }
    
    .table-of-contents h3 {
        font-size: 1.1rem;
    }
    
    .rule-card, .strategy-card, .mistake-card {
        padding: 20px;
    }
    
    .tip-item {
        padding: 12px;
        gap: 10px;
    }
    
    .tip-icon {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 15px;
    }
    
    .content-section h2 {
        font-size: 1.3rem;
    }
    
    .tile-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rule-card, .strategy-card, .mistake-card {
        padding: 15px;
    }
    
    .strategy-number {
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }
    
    .tip-item {
        flex-direction: column;
        text-align: center;
    }
    
    .tip-icon {
        align-self: center;
    }
}
