/* 大富豪への道 - 専用スタイル（赤テーマ） */

/* 基本レイアウト */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24, #c44569);
    min-height: 100vh;
    font-family: 'Nunito', sans-serif;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

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

.description {
    font-size: 1.1rem;
    color: #ffe8e8;
    margin-bottom: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

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

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    flex: 1;
    max-width: 500px;
}

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

.score-box {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.3);
    min-width: 100px;
}

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

.score {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Fredoka One', cursive;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: #ddd;
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.1);
}

.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);
    aspect-ratio: 1;
}

/* 大富豪への道専用タイル色（赤テーマ） */
.tile.tile-2 { background: #FEF3C7; color: #92400E; border: 2px solid #FDE68A; } /* 1円 - 茶色系 */
.tile.tile-4 { background: #FCE7F3; color: #BE185D; border: 2px solid #FBCFE8; } /* 5円 - ピンク系 */
.tile.tile-8 { background: #FEF2F2; color: #DC2626; border: 2px solid #FECACA; } /* 10円 - 赤系 */
.tile.tile-16 { background: #FEE2E2; color: #DC2626; border: 2px solid #FECACA; } /* 50円 - 赤系 */
.tile.tile-32 { background: #FEE2E2; color: #DC2626; border: 2px solid #FCA5A5; } /* 100円 - 赤系 */
.tile.tile-64 { background: #FECACA; color: #B91C1C; border: 2px solid #F87171; } /* 1000円 - 赤系 */
.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); } /* 5000円 - 金色系 */
.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); } /* 10000円 - 金色系 */
.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: #DC2626; color: #FFD700; font-size: 1.6rem; border: 2px solid #B91C1C; box-shadow: 0 0 15px rgba(220, 38, 38, 0.4); } /* 1億円 - 深赤系 */
.tile.tile-2048 { background: #B91C1C; color: #FFD700; font-size: 1.6rem; border: 2px solid #991B1B; box-shadow: 0 0 20px rgba(185, 28, 28, 0.5); } /* 大富豪 - 超深赤系 */

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

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

.currency-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);
}

.currency-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 .currency-emoji { font-size: 2rem; }
.tile.tile-256 .currency-emoji { font-size: 2.2rem; }
.tile.tile-512 .currency-emoji { font-size: 2.4rem; }
.tile.tile-1024 .currency-emoji { font-size: 2.6rem; }
.tile.tile-2048 .currency-emoji { font-size: 3rem; }

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

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

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

.game-currency-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);
}

.game-currency-icon {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
    background: transparent;
}

.game-currency-icon:hover {
    transform: scale(1.05);
}

/* 通貨の実際の大きさに合わせてアイコンサイズを調整 */
/* 小額通貨 */
.tile.tile-2 .game-currency-icon { width: 2.5rem; height: 2.5rem; } /* 1円 - 極小 */
.tile.tile-4 .game-currency-icon { width: 2.7rem; height: 2.7rem; } /* 5円 - 小さい */
.tile.tile-8 .game-currency-icon { width: 2.9rem; height: 2.9rem; } /* 10円 - 小さい */

/* 中額通貨 */
.tile.tile-16 .game-currency-icon { width: 3.1rem; height: 3.1rem; } /* 50円 - 中程度 */
.tile.tile-32 .game-currency-icon { width: 3.3rem; height: 3.3rem; } /* 100円 - 中程度 */
.tile.tile-64 .game-currency-icon { width: 3.5rem; height: 3.5rem; } /* 500円 - 中程度 */
.tile.tile-128 .game-currency-icon { width: 3.7rem; height: 3.7rem; } /* 1000円 - 中程度 */

/* 高額通貨 */
.tile.tile-256 .game-currency-icon { width: 3.9rem; height: 3.9rem; } /* 5000円 - 大きい */
.tile.tile-512 .game-currency-icon { width: 4.1rem; height: 4.1rem; } /* 10000円 - 大きい */
.tile.tile-1024 .game-currency-emoji { font-size: 3.4rem; } /* 百万円 - 大きい */

/* 超高額通貨 */
.tile.tile-2048 .game-currency-icon { width: 4.3rem; height: 4.3rem; } /* 1億円 - 巨大 */

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

.new-game-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.3);
    font-family: 'Nunito', sans-serif;
}

.new-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.4);
}

.new-game-btn:active {
    transform: translateY(0);
}

/* 広告エリア（ゲームエリアの右側、縦並び） */
.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);
}

.instructions {
    text-align: center;
    font-size: 0.9rem;
    color: #ffe8e8;
    line-height: 1.4;
    margin-top: 20px;
}

.instructions a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
}

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

/* モバイル対応 */
@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-container {
        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%;
    }
}

/* howto.html専用スタイル */
.howto-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.breadcrumb {
    text-align: center;
    margin-bottom: 20px;
    color: #ffe8e8;
    font-size: 0.9rem;
}

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

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

.table-of-contents {
    background: rgba(255, 107, 107, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 5px solid #ff6b6b;
}

.table-of-contents h3 {
    color: #dc2626;
    margin-bottom: 15px;
    font-family: 'Fredoka One', cursive;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    color: #dc2626;
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 3px solid #ff6b6b;
    padding-bottom: 10px;
}

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

.rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rule-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #ff6b6b;
    transition: transform 0.3s ease;
}

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

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

.rule-card h3 {
    color: #dc2626;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

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

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

.control-label {
    font-weight: bold;
    color: #ff6b6b;
    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;
}

/* 通貨タイルセクション */
.currency-progression {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.currency-tier {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.currency-tier h4 {
    color: #dc2626;
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 10px;
}

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

.tile-info {
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 2px solid #ff6b6b;
    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用のアイコンスタイル */
.currency-icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
    background: transparent;
}

.currency-icon:hover {
    transform: scale(1.05);
}

/* 通貨の実際の大きさに合わせてhowto.htmlのアイコンサイズを調整 */
/* 小額通貨 */
.tile-2 .currency-icon { width: 1.2rem; height: 1.2rem; } /* 1円 - 極小 */
.tile-4 .currency-icon { width: 1.3rem; height: 1.3rem; } /* 5円 - 小さい */
.tile-8 .currency-icon { width: 1.4rem; height: 1.4rem; } /* 10円 - 小さい */

/* 中額通貨 */
.tile-16 .currency-icon { width: 1.5rem; height: 1.5rem; } /* 50円 - 中程度 */
.tile-32 .currency-icon { width: 1.6rem; height: 1.6rem; } /* 100円 - 中程度 */
.tile-64 .currency-icon { width: 1.7rem; height: 1.7rem; } /* 500円 - 中程度 */
.tile-128 .currency-icon { width: 1.8rem; height: 1.8rem; } /* 1000円 - 中程度 */

/* 高額通貨 */
.tile-256 .currency-icon { width: 1.9rem; height: 1.9rem; } /* 5000円 - 大きい */
.tile-512 .currency-icon { width: 2.0rem; height: 2.0rem; } /* 10000円 - 大きい */
.tile-1024 .currency-emoji { font-size: 2.1rem; } /* 百万円 - 大きい */

/* 超高額通貨 */
.tile-2048 .currency-icon { width: 2.4rem; height: 2.4rem; } /* 1億円 - 巨大 */

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

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

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

.strategy-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

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

.strategy-card.priority-high {
    border-left: 5px solid #dc2626;
}

.strategy-card.priority-medium {
    border-left: 5px solid #f59e0b;
}

.strategy-card.priority-low {
    border-left: 5px solid #10b981;
}

.strategy-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.strategy-card h3 {
    color: #dc2626;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.priority {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc2626;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* コツとテクニック */
.tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tip-category {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tip-category h4 {
    color: #dc2626;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 8px;
}

.tip-item {
    margin-bottom: 15px;
}

.tip-item strong {
    color: #dc2626;
    font-weight: 700;
}

/* よくある失敗 */
.mistakes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.mistake-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.mistake-card.severity-high {
    border-left: 5px solid #dc2626;
}

.mistake-card.severity-medium {
    border-left: 5px solid #f59e0b;
}

.mistake-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.mistake-card h3 {
    color: #dc2626;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.severity {
    background: #dc2626;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

.back-to-game {
    text-align: center;
    margin-top: 30px;
}

.play-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.3);
    font-family: 'Nunito', sans-serif;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.4);
    text-decoration: none;
    color: white;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #ffe8e8;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

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