/* --- グローバル & 基本設定 --- */
:root {
    --primary-color: #ffcce0;
    /* ソフトピンク */
    --secondary-color: #cce0ff;
    /* ソフトブルー */
    --accent-color: #fffacd;
    /* ライトイエロー */
    --text-color: #555;
    --text-dark: #333;
    --bg-color: #fff8fC;
    /* ごく薄いピンク背景 */
    --border-color: #eee;
    --button-hover-bg: #ffe0f0;
    /* ボタンホバー時のピンク */
    --card-bg: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
}

h1,
h2,
h3 {
    color: var(--text-dark);
    margin-bottom: 0.8em;
    font-weight: 500;
    line-height: 1.3;
}

h1 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    /* 丸っこいフォントに変更 */
    font-size: 2.2rem;
    color: #fff;
    /* 文字色を白に変更して見やすく */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    /* 影を少し調整 */
    background-color: #ff80ab;
    /* 囲いの背景色 (元の文字色) */
    padding: 15px 35px;
    /* 囲いの内側余白を調整 */
    border-radius: 50px;
    /* 囲いの角をより丸くする */
    display: inline-block;
    /* コンテンツ幅に合わせる */
    margin-bottom: 0.8em;
    /* 他の要素との間隔 */
    font-weight: 700;
    /* フォントの太さ */
    box-shadow: 0 3px 8px rgba(255, 128, 171, 0.3);
    /* 囲いに影を追加 */
}


h2 {
    font-size: 1.6rem;
    border-left: 5px solid var(--secondary-color);
    padding-left: 10px;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: #ff80ab;
}

/* --- レイアウト --- */
.site-header,
.main-content,
.site-footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.site-header {
    position: relative;
    /* これを追加 */
    text-align: center;
    padding-top: 40px;
    padding-bottom: 30px;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 30px;
}

.site-header p {
    font-size: 1.1rem;
    color: #aaa;
}

.main-content>section {
    margin-bottom: 40px;
    padding: 25px;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(200, 200, 230, 0.15);
    border: 1px solid var(--border-color);
}

.site-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.9rem;
    color: #aaa;
}

/* --- 星座選択ボタン --- */
.zodiac-selector h2 {
    text-align: center;
    border-left: none;
    padding-left: 0;
    margin-bottom: 25px;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* ボタン間の隙間を少し広げる */
    justify-content: center;
}

.zodiac-button {
    font-family: inherit;
    font-size: 1rem;
    /* 少し大きく */
    padding: 12px 22px;
    /* パディング調整 */
    border: none;
    /* border-radius は個別に設定 */
    color: var(--text-dark);
    /* 文字色を少し濃く */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 500;
    /* 少し太字に */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    /* 軽い影 */
    min-width: 130px;
    /* 最小幅 */
    text-align: center;
}

.zodiac-button.active {
    /* 選択中のスタイル */
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset;
    /* 内側に影 */
    transform: translateY(1px);
    /* 少し沈む */
    /* background-color は個別設定を優先 */
}

/* --- 星座別ボタンの色と形 --- */
.zodiac-button.aries {
    background-color: #ff9a8b;
    border-radius: 30px 10px 30px 10px;
}

.zodiac-button.taurus {
    background-color: #f9d4a5;
    border-radius: 10px 30px 10px 30px;
}

.zodiac-button.gemini {
    background-color: #fffacd;
    border-radius: 25px;
}

/* ライトイエロー */
.zodiac-button.cancer {
    background-color: #cce0ff;
    border-radius: 10px;
}

/* ソフトブルー */
.zodiac-button.leo {
    background-color: #ffcc80;
    border-radius: 50% 20% / 10% 40%;
}

/* オレンジ系, 不定形 */
.zodiac-button.virgo {
    background-color: #c8e6c9;
    border-radius: 5px 25px 5px 25px;
}

/* ソフトグリーン */
.zodiac-button.libra {
    background-color: #ffcce0;
    border-radius: 25px 5px 25px 5px;
}

/* ソフトピンク */
.zodiac-button.scorpio {
    background-color: #ffab91;
    border-radius: 40% 10% / 20% 50%;
}

/* コーラル系, 不定形 */
.zodiac-button.sagittarius {
    background-color: #d1c4e9;
    border-radius: 15px;
}

/* ソフトパープル */
.zodiac-button.capricorn {
    background-color: #cfd8dc;
    border-radius: 20px 0 20px 0;
}

/* グレー系 */
.zodiac-button.aquarius {
    background-color: #b3e5fc;
    border-radius: 0 20px 0 20px;
}

/* ライトシアン */
.zodiac-button.pisces {
    background-color: #b2dfdb;
    border-radius: 50px;
}

/* ソフトティール */

/* --- ホバー時のスタイル --- */
.zodiac-button:hover {
    transform: translateY(-3px) scale(1.05);
    /* 共通の変形効果 */
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.12);
    /* 共通の影効果 */
}

/* 星座別ホバー時の背景色 */
.zodiac-button.aries:hover {
    background-color: #ffafa0;
}

/* 少し明るい赤系 */
.zodiac-button.taurus:hover {
    background-color: #fbe0b9;
}

/* 少し明るいオレンジ系 */
.zodiac-button.gemini:hover {
    background-color: #ffffcc;
}

/* 少し明るいイエロー */
.zodiac-button.cancer:hover {
    background-color: #ddeaff;
}

/* 少し明るいブルー */
.zodiac-button.leo:hover {
    background-color: #ffdca0;
}

/* 少し明るいオレンジ */
.zodiac-button.virgo:hover {
    background-color: #d8f0d9;
}

/* 少し明るいグリーン */
.zodiac-button.libra:hover {
    background-color: #ffddeb;
}

/* 少し明るいピンク */
.zodiac-button.scorpio:hover {
    background-color: #ffbfa8;
}

/* 少し明るいコーラル */
.zodiac-button.sagittarius:hover {
    background-color: #e1d4f9;
}

/* 少し明るいパープル */
.zodiac-button.capricorn:hover {
    background-color: #dfe8ec;
}

/* 少し明るいグレー */
.zodiac-button.aquarius:hover {
    background-color: #c3f0ff;
}

/* 少し明るいシアン */
.zodiac-button.pisces:hover {
    background-color: #c2efeb;
}

/* 少し明るいティール */


/* --- 選択されたアドバイス表示エリア --- */
.selected-advice {
    background-color: var(--accent-color);
    border: 2px dashed var(--primary-color);
    padding: 25px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    transition: background-color 0.5s ease;
    /* 背景色変化アニメーション */
}

.selected-advice p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.selected-advice h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    border-left: none;
    padding-left: 0;
}

.selected-advice h3 .zodiac-icon {
    font-size: 1.5em;
    margin-right: 8px;
    color: var(--primary-color);
}

.selected-advice .advice-content {
    font-size: 1.15rem;
    line-height: 1.8;
    margin: 0;
    color: var(--text-color);
    opacity: 0;
    /* 初期状態は透明 */
    animation: fadeInAdvice 0.5s ease forwards;
    /* フェードインアニメーション */
}

@keyframes fadeInAdvice {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 全星座アドバイス表示エリア (コメントアウト) --- */
/*
        .daily-advice-section h2 {
            text-align: center;
            border-left: none;
            padding-left: 0;
        }

        #today-date-link {
            font-weight: 500;
            color: var(--primary-color);
            text-decoration: none;
            border-bottom: 1px dotted var(--primary-color);
        }

        #today-date-link:hover {
            color: #ff80ab;
            border-bottom-style: solid;
            text-decoration: none;
        }

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

        .advice-card {
            background-color: #fff;
            padding: 20px;
            border-radius: 10px;
            border: 1px solid var(--border-color);
            transition: box-shadow 0.3s ease, transform 0.3s ease;
        }

        .advice-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(180, 180, 220, 0.2);
        }

        .advice-card h3 {
            font-size: 1.2rem;
            margin-bottom: 10px;
            color: var(--secondary-color);
            display: flex;
            align-items: center;
            font-weight: 500;
            border-left: none;
            padding-left: 0;
        }

        .advice-card h3 .zodiac-icon {
            font-size: 1.5em;
            margin-right: 8px;
        }

        .advice-card p {
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 0;
        }

        .advice-card.highlighted {
            border-color: var(--primary-color);
            box-shadow: 0 0 15px var(--primary-color);
            transform: scale(1.02);
        }
        */

/* --- AdSenseプレースホルダー (仮) --- */
.ad-placeholder {
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin: 30px auto;
    max-width: 728px;
    min-height: 90px;
    color: #999;
    font-size: 0.9rem;
    border-radius: 8px;
}

/* --- レスポンシブデザイン --- */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .main-content>section {
        padding: 20px;
    }

    .button-container {
        gap: 10px;
    }

    /* スマホではギャップを少し詰める */
    .zodiac-button {
        padding: 10px 16px;
        /* パディング調整 */
        font-size: 0.9rem;
        min-width: 110px;
        /* 最小幅調整 */
    }

    /*
            .advice-grid {
                grid-template-columns: 1fr;
            }
            */
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .site-header,
    .main-content,
    .site-footer {
        padding: 15px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .button-container {
        gap: 8px;
    }

    .zodiac-button {
        flex-basis: calc(33.333% - 8px);
        /* 3列レイアウト */
        padding: 8px 10px;
        /* パディング調整 */
        min-width: auto;
        /* 最小幅解除 */
    }

    .selected-advice h3 {
        font-size: 1.2rem;
    }

    .selected-advice .advice-content {
        font-size: 1.05rem;
    }
}

/* --- 言語切り替えボタン --- */
.language-switcher {
    text-align: right;
    /* 右寄せ */
    padding: 10px 20px 0;
    /* 上右に余白 */
    position: absolute;
    /* ヘッダー右上に配置 */
    top: 15px;
    right: 15px;
    z-index: 10;
    /* 他の要素より手前に */
}

.lang-button {
    display: inline-block;
    padding: 6px 14px;
    /* 少し小さめに */
    margin-left: 6px;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    /* 丸く */
    background-color: #fff;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    /* 少し小さめに */
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-button:hover {
    background-color: var(--button-hover-bg);
    color: #ff80ab;
    /* ホバー時の濃いピンク */
    text-decoration: none;
}

.lang-button.current {
    background-color: var(--primary-color);
    color: #fff;
    cursor: default;
    border-color: var(--primary-color);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .language-switcher {
        position: static;
        /* 通常配置に戻す */
        text-align: center;
        /* 中央寄せ */
        padding: 15px 0 0 0;
        /* 上に余白 */
        margin-bottom: -15px;
        /* ヘッダーとの間隔調整 */
    }
}

@media (max-width: 480px) {
    .lang-button {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

/* --- 他の占いへのリンク --- */
.other-fortune-links {
    text-align: center;
    padding: 30px 20px;
    /* 上下の余白 */
    background-color: var(--card-bg);
    /* 背景はカードと同じ白 */
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(200, 200, 230, 0.1);
    /* 軽い影 */
    border: 1px solid var(--border-color);
    max-width: 900px;
    /* 他のセクションと幅を合わせる */
    margin: 0 auto 40px auto;
    /* 下マージンを追加 */
}

.other-fortune-links h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    border-left: none;
    /* 左ボーダー不要 */
    padding-left: 0;
}

.link-button-container {
    display: flex;
    flex-wrap: wrap;
    /* スマホで折り返す */
    gap: 20px;
    justify-content: center;
}

.fortune-link-button {
    display: inline-flex;
    /* アイコンとテキストを横並び */
    align-items: center;
    padding: 12px 25px;
    border-radius: 30px;
    /* 丸みのあるボタン */
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.fortune-link-button .icon {
    margin-right: 10px;
    font-size: 1.2em;
    /* アイコンサイズ */
}

/* 個別の色設定 */
.fortune-link-button.lunar {
    background-color: var(--secondary-color);
    /* ソフトブルー */
}

.fortune-link-button.lunar:hover {
    background-color: #ddeaff;
    /* 少し明るいブルー */
}

.fortune-link-button.omikuji {
    background-color: var(--accent-color);
    /* ライトイエロー */
}

.fortune-link-button.omikuji:hover {
    background-color: #ffffcc;
    /* 少し明るいイエロー */
}

.fortune-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    /* ホバー時の下線不要 */
    color: var(--text-dark);
    /* ホバー時の文字色維持 */
}