:root {
    --nako-yellow: #ffec00;
    --nako-pink: #f200b5;
    --bg-gray: #fdfdfd;
    --text-main: #333;
}

body {
    background-color: var(--bg-gray);
    color: var(--text-main);
    margin: 0;
    font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

/* リンク色の固定（青・紫化を防止） */
a { text-decoration: none; color: var(--nako-pink); }
a:visited { color: var(--nako-pink); }

/* メニュー */
.site-menu {
    background: #fff;
    border-bottom: 4px solid var(--nako-yellow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.menu-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px;
}
.logo { font-weight: 900; text-decoration: none; color: var(--text-main); font-size: 1.2rem; }
.menu-links { display: flex; list-style: none; gap: 20px; margin: 0; padding: 0; }
.menu-links a { text-decoration: none; color: #666; font-weight: bold; font-size: 0.9rem; }

/* ハンバーガーボタン */
.menu-trigger { display: none; width: 30px; height: 24px; background: none; border: none; position: relative; cursor: pointer;}
.menu-trigger span { display: block; position: absolute; width: 100%; height: 2px; background: var(--nako-pink); transition: 0.3s; }
.menu-trigger span:nth-child(1) { top: 0; }
.menu-trigger span:nth-child(2) { top: 11px; }
.menu-trigger span:nth-child(3) { bottom: 0; }
.menu-trigger.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-trigger.active span:nth-child(2) { opacity: 0; }
.menu-trigger.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* メインコンテンツ */
.content { max-width: 800px; margin: 0 auto; padding: 20px; }
.main-title { font-size: 1.5rem; border-left: 6px solid var(--nako-yellow); padding-left: 12px; margin: 10px 0 20px; }

/* 制作者グリッド */
.creator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
.creator-card { background: #fff; border: 1px solid #eee; padding: 25px 10px; text-align: center; text-decoration: none; color: inherit; border-radius: 12px; transition: all 0.3s ease; }
.creator-card:hover { border-color: var(--nako-yellow); transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); background: #fffdf0; }
.creator-card h3 { font-size: 0.9rem; margin: 0 0 10px; color: var(--text-main); }
.creator-card span { font-size: 0.65rem; color: var(--nako-pink); font-weight: bold; }

/* タブ */
.tab-buttons { display: flex; gap: 5px; }
.tab-btn { flex: 1; padding: 12px; border: none; background: #eee; border-radius: 10px 10px 0 0; cursor: pointer; font-weight: bold; color: #777; }
.tab-btn.active { background: var(--nako-yellow); color: #000; }

/* カード */
.info-card { background: #fff; border: 2px solid var(--nako-yellow); padding: 20px; border-radius: 0 15px 15px 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }

/* 楽曲一覧（リスト形式） */
.album-section .info-card { padding: 0 !important; overflow: hidden; }
.list-view { list-style: none; padding: 0; margin: 0; }
.list-view li { border-bottom: 1px solid #eee; }
.list-view li a { 
    display: block; 
    color: var(--text-main); 
    font-size: 1.15rem; 
    padding: 18px 20px; 
    font-weight: 600; 
}

.info-item { margin-bottom: 20px; }
.info-item label { display: inline-block; background: var(--nako-yellow); color: #000; font-size: 0.75rem; font-weight: bold; padding: 2px 8px; margin-bottom: 8px; }
.info-item p a { color: var(--nako-pink); text-decoration: none; font-weight: bold; }
.date-section { background: #fffdf0; padding: 10px; border-radius: 8px; border: 1px solid #fef5b2; }
.date-section p { margin: 0; font-weight: bold; font-size: 1.1rem; }

/* 公式サイトURL（テキストリンク版） */
.official-url-link { color: var(--nako-pink); text-decoration: none; font-weight: bold; font-size: 0.95rem; }
.official-url-link:hover { text-decoration: underline; }

/* セットリスト */
.setlist { list-style: none; padding: 0; }
.setlist li { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px dashed #eee; }
.setlist li a { text-decoration: none; color: inherit; }
.setlist li a:hover { color: var(--nako-pink); }
.song-number { width: 26px; height: 26px; background: var(--nako-yellow); color: #000; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 0.75rem; font-weight: bold; margin-right: 12px; flex-shrink: 0; }
.song-number-empty { width: 26px; margin-right: 12px; flex-shrink: 0; }
.song-title { font-size: 1rem; }

/* アンコール設定（ライトモード基準） */
.encore-row { background-color: #fff9fe; }
.encore-num { background-color: var(--nako-pink) !important; color: #fff !important; font-size: 0.6rem !important; }
.encore-header { background-color: #fce4ec; border-bottom: 2px solid var(--nako-pink) !important; justify-content: center !important; font-weight: bold; color: var(--nako-pink); padding: 10px; margin: 10px 0; border-radius: 6px; display: flex; align-items: center; }

/* ライブ一覧 */
.list-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.live-card { text-decoration: none; color: inherit; background: #fff; border: 1px solid #eee; border-left: 5px solid var(--nako-yellow); border-radius: 8px; transition: transform 0.2s, box-shadow 0.2s; overflow: hidden; display: block; }
.live-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(255, 236, 0, 0.2); }
.card-content { padding: 20px; }
.card-category { font-size: 0.7rem; font-weight: bold; color: var(--nako-pink); }
.card-title { margin: 10px 0; font-size: 1.1rem; line-height: 1.4; color: var(--text-main); min-height: 3em; }
.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f9f9f9; padding-top: 15px; margin-top: 10px; }
.card-date { font-size: 0.85rem; color: #888; }
.card-arrow { font-size: 0.8rem; font-weight: bold; color: var(--nako-yellow); background: #333; padding: 4px 10px; border-radius: 4px; }

.site-footer { text-align: center; padding: 30px 20px; background: #fff; border-top: 1px solid #eee; margin-top: 50px; }

@media (max-width: 768px) {
    .menu-trigger { display: block; }
    .menu-links { 
        display: none; 
        position: absolute; 
        top: 60px; left: 0; width: 100%; 
        background: #fff; 
        flex-direction: column; 
        padding: 20px; 
        border-bottom: 3px solid var(--nako-yellow);
        box-sizing: border-box;
    }
    .menu-links.active { display: flex; }
    .list-container { grid-template-columns: 1fr; }
    .creator-grid { grid-template-columns: repeat(2, 1fr); }
    .list-view li a { font-size: 1.1rem !important; padding: 18px 15px !important; }
}

/* --------------------------------------------------
   ダークモード用の設定
-------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-gray: #1a1a1a;
        --card-bg: #2d2d2d;
        --text-main: #eeeeee;
        --border-color: #444444;
    }

    body {
        background-color: var(--bg-gray) !important;
        color: var(--text-main) !important;
    }

    /* ヘッダー・スマホメニュー背景の修正 */
    header.site-menu, .site-menu, .menu-links {
        background: #252525 !important;
        border-bottom: 4px solid #ffec00 !important;
    }

    /* イベントタグ */
    .card-category span, 
    .card-content .card-category span {
        background-color: #ffec00 !important;
        color: #000000 !important;
        padding: 2px 8px !important;
        border-radius: 4px !important;
    }

    /* カード・リスト */
    .info-card, .creator-card, .live-card, .album-section .info-card {
        background-color: var(--card-bg) !important;
        border-color: var(--border-color) !important;
    }

    .album-section .info-card { border-left: 6px solid #ffec00 !important; }
    .live-card { border-left: 5px solid #ffec00 !important; }

    /* 文字色 */
    .card-title, .logo, .menu-links a, .menu-links a:visited {
        color: #ffffff !important;
    }

    .date-section {
        background: #333 !important;
        border: 1px solid #ffec00 !important;
    }

    .date-section p { color: #ffec00 !important; }

    /* リンク色 */
    .official-url-link, .info-item p a, a, a:visited {
        color: #ff99bb !important;
    }

    /* アンコールセクションの白飛び修正 */
    .encore-row {
        background-color: transparent !important;
    }
    .encore-header {
        background-color: #3d253d !important; /* 少し暗めのピンク紫 */
        color: #ff99bb !important;
    }
    .encore-row .song-title, 
    .encore-row .song-title a {
        color: #ffffff !important;
    }

    .song-title a, .song-title a:visited {
        color: #ffffff !important;
    }

    .song-number {
        background-color: #ffec00 !important;
        color: #000000 !important;
    }

    .list-view li { border-bottom-color: #444 !important; }
    .list-view li a, .list-view li a:visited {
        color: #ffffff !important;
    }

    .site-footer {
        background: #252525 !important;
        border-top: 1px solid #444 !important;
    }
}

/* --- 披露回数と履歴のスタイル --- */

/* 総披露回数バッジ */
.play-count-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--nako-pink);
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 10px;
    font-size: 0.9rem;
}

/* 履歴リストの親要素 */
.live-history-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    counter-reset: history-counter; /* 番号をリセット */
}

/* 各履歴行 */
.live-history-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #666; /* ダークモードに合わせた色 */
    font-size: 0.95rem;
}

/* 番号の丸バッジ（自動カウント） */
.live-history-list li::before {
    counter-increment: history-counter; /* 番号を進める */
    content: counter(history-counter); /* 番号を表示 */
    width: 26px;
    height: 26px;
    background-color: var(--nako-yellow);
    color: #000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

/* 1回目だけ「初」にする設定 */
.live-history-list li:first-child::before {
    content: "初";
    background-color: #ff3366; /* 1回目だけ目立つピンクに変更 */
    color: #fff;
}

/* ライトモード時の調整 */
@media (prefers-color-scheme: light) {
    .live-history-list li {
        border-bottom-color: #eee;
    }
}

/* --- 誕生日演出用（3/7-8限定） --- */
.nako-birthday-card {
    background: linear-gradient(135deg, #fff5f7 0%, #fff 100%);
    border: 3px double var(--nako-pink);
    border-radius: 15px; padding: 25px; text-align: center;
    margin-bottom: 30px; position: relative; overflow: hidden;
    animation: nako-fadein 1.5s ease;
}
@keyframes nako-fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.birthday-confetti {
    position: fixed; top: -10px; width: 10px; height: 10px;
    z-index: 9999; pointer-events: none;
    animation: nako-fall linear forwards;
}
@keyframes nako-fall { to { transform: translateY(105vh) rotate(360deg); } }

@media (prefers-color-scheme: dark) {
    .nako-birthday-card { background: linear-gradient(135deg, #3d2b30 0%, #222 100%); border-color: var(--nako-pink); }
}