/* タグカテゴリのスタイル - 改善版 */
.tag-categories {
    margin-top: 1rem;
}

.tag-category {
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(40, 45, 60, 0.5); /* より暗めの背景色でコントラスト向上 */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tag-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    position: relative;
    background: rgba(30, 35, 50, 0.5); /* よりはっきりした背景 */
    transition: all 0.2s ease;
}

    .tag-category-header:hover {
        background: rgba(45, 50, 65, 0.7);
    }

.tag-category-name {
    display: flex;
    align-items: center;
    font-weight: 600;
    gap: 8px; /* アイコンとテキストの間隔を改善 */
}

    .tag-category-name i {
        width: 18px; /* アイコンの幅を固定 */
        text-align: center;
        transition: transform 0.2s ease;
    }

/* アクティブ状態のヘッダー */
.tag-category-header.active {
    background: rgba(50, 55, 70, 0.8); /* アクティブ時の背景をより目立たせる */
}

    .tag-category-header.active i {
        transform: rotate(180deg);
    }

/* タグカウントバッジをより見やすく */
.tag-category-count {
    background: rgba(80, 90, 110, 0.5);
    border-radius: 12px;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 28px; /* 最小幅を設定 */
    text-align: center;
    margin-left: 8px; /* ヘッダーテキストとの間隔を確保 */
}

/* コンテンツ部分の調整 */
.tag-category-content {
    max-height: 200px;
    overflow-y: auto;
    transition: all 0.3s ease;
    padding: 0.75rem;
    background: rgba(35, 40, 55, 0.3); /* コンテンツ部分の背景 */
}

    .tag-category-content.collapsed {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        overflow: hidden;
    }

/* タグクラウド内のタグ */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 16px; /* より丸みを帯びたデザイン */
    background: rgba(60, 70, 90, 0.5);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

    .tag-link:hover {
        background: rgba(80, 90, 120, 0.6);
    }

    .tag-link.active {
        background: rgba(80, 120, 200, 0.5); /* 選択中のタグをより目立たせる */
        color: #ffffff;
    }

/* スクロールバーのスタイル */
.tag-category-content::-webkit-scrollbar {
    width: 6px;
}

.tag-category-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.tag-category-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

    .tag-category-content::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }
