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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'ヒラギノ角ゴ ProN', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
    color: #333;
    line-height: 1.8;
    background: linear-gradient(to bottom, #87CEEB 0%, #e6f3ff 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* 雲のアニメーション背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23ffffff55' d='M71.34,71.59c-.46,0-.83.01-1.2.02-2.84.01-5.47-1.67-6.47-4.33-1.21-3.19-4.33-6.36-9.16-7.17-2.95-.49-5.58-.1-7.64.84-1.01.46-2.19-.11-2.4-1.21-.73-3.91-4.02-7.06-8.32-7.31-3.9-.23-7.55,2.17-8.91,5.83-.35.95-.53,1.91-.56,2.84s-.65,1.73-1.54,2.01c-2.11.67-3.78,2.48-4.15,4.83-.07.46-.09.91-.06,1.35,0,.15-.01.31,0,.47.1,2.01,1.04,3.28,2.57,4.08.73.51,1.59.88,2.53,1.03.51.08,1.02.09,1.52.04,3.94.43,9.13-.06,14.17-.06,3.55,0,6.43-.03,8.99-.09,1.92.11,4.34.09,6.59-.18,3.96-.12,7.95-.25,13.82-.29,36.57-.27,27.84-2.92.22-2.69Z'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    animation: floatClouds 40s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatClouds {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* コンテナ設定 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 42, 120, 0.1);
}

/* ヘッダー */
header {
    padding: 15px 10px;
    background: linear-gradient(135deg, #3f93f5 0%, #002a78 100%);
    margin: -10px -10px 20px -10px;
}

.breadcrumb {
    color: #fff;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.breadcrumb a:hover {
    opacity: 1;
}

/* メインタイトル */
h1 {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 2.5rem;
    color: #002a78;
    text-align: center;
    margin: 30px 0;
    text-shadow: 2px 2px 4px rgba(63, 147, 245, 0.3);
    letter-spacing: 2px;
    animation: skyFloat 3s ease-in-out infinite;
    position: relative;
}

@keyframes skyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

h1::after {
    content: '☁';
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    animation: cloudMove 8s linear infinite;
}

@keyframes cloudMove {
    from { right: -40px; }
    to { right: calc(100% + 40px); }
}

/* 目次 */
.toc {
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f3ff 100%);
    border: 2px solid #3f93f5;
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
}

.toc h2 {
    color: #002a78;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #3f93f5;
    padding-bottom: 10px;
}

.toc ul {
    list-style: none;
}

.toc ul li {
    padding: 8px 0;
    border-bottom: 1px dotted #cce7ff;
}

.toc a {
    color: #002a78;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.toc a:hover {
    color: #3f93f5;
    padding-left: 10px;
}

.toc a::before {
    content: '▸';
    margin-right: 8px;
    color: #3f93f5;
}

/* 目次に戻るボタン */
.back-to-toc {
    text-align: center;
    margin: 30px 0 10px;
}

.back-to-toc a {
    display: inline-block;
    background: linear-gradient(135deg, #3f93f5, #002a78);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(63, 147, 245, 0.3);
}

.back-to-toc a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(63, 147, 245, 0.5);
}

.back-to-toc a::before {
    content: '↑ ';
    margin-right: 5px;
}

/* セクション */
section {
    margin: 40px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 42, 120, 0.1);
}

h2 {
    color: #002a78;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3f93f5;
    position: relative;
}

h3 {
    color: #3f93f5;
    font-size: 1.3rem;
    margin: 20px 0 15px;
    padding-left: 15px;
    border-left: 4px solid #3f93f5;
}

/* マップ領域 */
.map-area {
    background: linear-gradient(to bottom, #e6f3ff, #fff);
    border: 2px dashed #3f93f5;
    border-radius: 15px;
    padding: 40px 20px;
    margin: 30px 0;
    min-height: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.map-area::before {
    content: '🗺️ ステージマップ';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #3f93f5;
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.map-placeholder {
    color: #999;
    font-style: italic;
    margin-top: 50px;
}

/* 攻略ポイント */
.strategy-point {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
    border-left: 5px solid #ffa500;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
}

.strategy-point strong {
    color: #ff7b00;
    font-size: 1.1rem;
}

/* キャラクターセリフ */
.dialogue {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
    gap: 15px;
}

.character-icon {
    flex-shrink: 0;
    text-align: center;
}

.character-icon img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #3f93f5;
    background: white;
}

.character-name {
    font-size: 0.85rem;
    color: #002a78;
    margin-top: 5px;
    font-weight: bold;
}

.speech-bubble {
    flex-grow: 1;
    background: white;
    padding: 15px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 2px solid #3f93f5;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent #3f93f5 transparent transparent;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

/* アイテムリスト */
.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.item-card {
    background: linear-gradient(135deg, #f8f8f8, #fff);
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(63, 147, 245, 0.3);
}

.item-card img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

/* FAQ */
.faq-section {
    background: linear-gradient(135deg, #f0f9ff, #fff);
    padding: 30px 20px;
    margin: 40px 0;
    border-radius: 15px;
}

.faq-item {
    margin: 20px 0;
    border-bottom: 1px solid #cce7ff;
    padding-bottom: 20px;
}

.faq-question {
    color: #002a78;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.faq-question::before {
    content: 'Q.';
    background: #3f93f5;
    color: white;
    padding: 2px 8px;
    border-radius: 5px;
    margin-right: 10px;
}

.faq-answer {
    padding-left: 40px;
    color: #666;
}

.faq-answer::before {
    content: 'A.';
    color: #ff7b00;
    font-weight: bold;
    margin-right: 10px;
}

/* 関連リンク */
.related-links {
    background: linear-gradient(135deg, #002a78, #3f93f5);
    padding: 30px 20px;
    margin: 40px -10px;
    color: white;
}

.related-links h2 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 30px;
}

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

.link-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
    overflow: hidden;
    display: block;
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.link-card .image-wrapper {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: linear-gradient(135deg, #3f93f5, #002a78);
}

.link-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.link-card:hover img {
    transform: scale(1.1);
}

.link-card .text {
    padding: 15px;
}

.link-card .title {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.link-card .desc {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* フッター */
footer {
    background: #f8f8f8;
    padding: 30px 20px;
    margin: 40px -10px -10px;
    border-top: 3px solid #3f93f5;
}

.copy {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.copy p {
    margin: 10px 0;
}

.copy a {
    color: #3f93f5;
    text-decoration: none;
}

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

.contact-info {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.usage-terms {
    margin: 15px 0;
}

.copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h1::after {
        display: none;
    }

    section {
        padding: 15px;
    }

    .dialogue {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .speech-bubble::before,
    .speech-bubble::after {
        display: none;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }

    .link-card .image-wrapper {
        height: 120px;
    }
}
/* アイテムリスト（改良版） */
.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.item-card-link {
    text-decoration: none;
    display: block;
}

.item-card {
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
    border: 2px solid #3f93f5;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.item-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(63, 147, 245, 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(63, 147, 245, 0.4);
    border-color: #002a78;
}

.item-card:hover::before {
    opacity: 1;
    animation: shimmer 0.5s ease-in-out;
}

@keyframes shimmer {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.item-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 42, 120, 0.2));
    transition: transform 0.3s;
}

.item-card:hover img {
    transform: scale(1.1) rotate(5deg);
}

.item-info {
    position: relative;
    z-index: 1;
}

.item-name {
    color: #002a78;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.item-count {
    color: #3f93f5;
    font-size: 0.9rem;
    background: rgba(63, 147, 245, 0.1);
    padding: 2px 10px;
    border-radius: 10px;
    display: inline-block;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .item-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .item-card {
        padding: 15px 10px;
    }

    .item-card img {
        width: 45px;
        height: 45px;
        margin-bottom: 10px;
    }

    .item-name {
        font-size: 0.9rem;
    }

    .item-count {
        font-size: 0.8rem;
    }
}
/* ===== テキストリンクの改善スタイル（追加分のみ） ===== */

/* テキストリンクの基本スタイル改善 */
p a,
.strategy-point a,
.dialogue a {
    color: #3f93f5;
    text-decoration: none;
    position: relative;
    font-weight: 600;
    padding: 2px 4px;
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, transparent 60%, rgba(63, 147, 245, 0.1) 60%);
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

p a:hover,
.strategy-point a:hover,
.dialogue a:hover {
    color: #002a78;
    background: linear-gradient(to bottom, transparent 0%, rgba(63, 147, 245, 0.15) 0%);
    padding: 2px 6px;
}

/* アンダーラインアニメーション */
p a::after,
.strategy-point a::after,
.dialogue a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3f93f5, #002a78);
    transition: width 0.3s ease;
    border-radius: 2px;
}

p a:hover::after,
.strategy-point a:hover::after,
.dialogue a:hover::after {
    width: 100%;
}

/* アイコン画像の追加 */
a[href*="enemys.html"]::before,
a[href*="items.html"]::before,
a[href*="gimicks.html"]::before,
a[href*="#flamuu"]::before,
a[href*="#muu"]::before,
a[href*="#wind-bullet"]::before,
a[href*="#dream-fragment"]::before,
a[href*="#moon-fragment"]::before,
a[href*="#heart"]::before,
a[href*="#spike"]::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 1px 2px rgba(0, 42, 120, 0.3));
    transition: transform 0.3s;
}

a:hover::before {
    transform: scale(1.2) rotate(5deg);
}

/* 各リンクタイプ別のアイコン設定 */
a[href*="#flamuu"]::before,
a[href*="#flying-moo"]::before {
    background-image: url('https://eikyuhozon.com/image/klonoa/flying-moo.webp');
}

a[href*="#muu"]::before {
    background-image: url('https://eikyuhozon.com/image/klonoa/moo.webp');
}

a[href*="#wind-bullet"]::before {
    background-image: url('https://eikyuhozon.com/image/klonoa/wind.webp');
}

a[href*="#dream-fragment-large"]::before {
    background-image: url('https://eikyuhozon.com/image/klonoa/dream-fragment-large.webp');
}

a[href*="#dream-fragment"]::before {
    background-image: url('https://eikyuhozon.com/image/klonoa/dream-fragment-small.webp');
}

a[href*="#moon-fragment"]::before {
    background-image: url('https://eikyuhozon.com/image/klonoa/moon-fragment.webp');
}

a[href*="#heart"]::before {
    background-image: url('https://eikyuhozon.com/image/klonoa/heart.webp');
}

a[href*="#spike"]::before {
    background-image: url('https://eikyuhozon.com/image/klonoa/spikes.webp');
}

/* カテゴリー別の色分け */
a[href*="enemys.html"] {
    background: linear-gradient(to bottom, transparent 60%, rgba(255, 123, 0, 0.1) 60%);
    color: #ff7b00;
}

a[href*="enemys.html"]:hover {
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 123, 0, 0.15) 0%);
    color: #d65a00;
}

a[href*="items.html"] {
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 200, 100, 0.1) 60%);
    color: #00a855;
}

a[href*="items.html"]:hover {
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 200, 100, 0.15) 0%);
    color: #008844;
}

a[href*="gimicks.html"] {
    background: linear-gradient(to bottom, transparent 60%, rgba(160, 32, 240, 0.1) 60%);
    color: #a020f0;
}

a[href*="gimicks.html"]:hover {
    background: linear-gradient(to bottom, transparent 0%, rgba(160, 32, 240, 0.15) 0%);
    color: #8b00ff;
}

/* クリック時のアニメーション */
p a:active,
.strategy-point a:active,
.dialogue a:active {
    transform: scale(0.95);
}

/* モバイル対応 */
@media (max-width: 768px) {
    a::before {
        width: 18px;
        height: 18px;
    }
}
