/*
Theme Name: BGMATE Child
Template: twentytwentyone
Version: 1.1
Description: BGMATE フリーBGM配布サイト用子テーマ
Author: BGMATE
*/

/* ===== Twenty Twenty-One 上書き ===== */
body {
    background: #f8f9fa !important;
    color: #333;
}

#content {
    background: #f8f9fa !important;
}

.site-main {
    background: #f8f9fa !important;
}

/* ===== 変数 ===== */
:root {
    --color-dark: #1a1a2e;
    --color-navy: #16213e;
    --color-accent: #ff6b35;
    --color-accent2: #ff4081;
    --color-yellow: #f4d03f;
    --color-bg: #f8f9fa;
    --color-card: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}

/* ===== 基本レイアウト ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== ヘッダー（ダークネイビー） ===== */
.site-header {
    background: var(--color-dark) !important;
    padding: 12px 0 !important;
    border-bottom: none !important;
}

.site-header a,
.site-header .site-title,
.site-header .site-description {
    color: #fff !important;
}

.site-header .site-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-header .site-description {
    font-size: 13px;
    opacity: 0.8;
}

/* ===== ナビゲーション（オレンジ→ピンク） ===== */
.primary-navigation {
    background: linear-gradient(135deg, #f39c12 0%, #ff6b35 50%, #ff4081 100%);
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 100;
}

.primary-navigation .primary-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.primary-navigation .menu-wrapper {
    justify-content: center;
}

.primary-navigation a {
    color: #fff !important;
    font-weight: 600;
    padding: 12px 24px !important;
    font-size: 15px;
}

.primary-navigation a:hover {
    background: rgba(255,255,255,0.15);
}

.primary-navigation .current-menu-item a {
    background: rgba(255,255,255,0.2);
}

/* ===== ヒーローセクション ===== */
.hero {
    text-align: center;
    padding: 100px 20px 80px;
    background: linear-gradient(135deg, #f39c12 0%, #ff6b35 40%, #ff4081 100%);
    color: #fff;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.06)"/><circle cx="90" cy="90" r="2.5" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100px 100px;
}

.hero h1 {
    font-size: 52px;
    margin-bottom: 16px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    letter-spacing: -1px;
}

.hero-desc {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.hero .btn {
    background: var(--color-dark);
    color: #fff;
    padding: 16px 48px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    background: #2a2a4e;
}

/* ===== セクション ===== */
.section {
    margin-bottom: 64px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 26px;
    margin-bottom: 4px;
    font-weight: 800;
    color: var(--color-text);
}

.section-header .sub {
    font-size: 13px;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== 検索セクション ===== */
.search-section {
    background: #fff;
    padding: 40px 20px;
    margin-bottom: 48px;
    border-bottom: 1px solid #e8e8e8;
}

.search-box {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    border: 2px solid #ddd;
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
}

.search-box select {
    padding: 14px 20px;
    border: none;
    border-right: 1px solid #eee;
    background: #f8f9fa;
    font-size: 15px;
    min-width: 140px;
    cursor: pointer;
    outline: none;
}

.search-box input[type="text"] {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 15px;
    outline: none;
}

.search-box button {
    padding: 14px 36px;
    background: var(--color-dark);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.search-box button:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
}

/* ===== 絞り込みタグ ===== */
.filter-section {
    background: #fff;
    padding: 24px 20px;
    margin-bottom: 48px;
    border-bottom: 1px solid #e8e8e8;
}

.filter-dropdown {
    max-width: 400px;
    margin: 0 auto;
}

.filter-dropdown select {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
}

/* ===== 楽曲グリッド ===== */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 0;
}

/* ===== 楽曲カード（BGMer風） ===== */
.music-card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    border: 1px solid #e8e8e8;
}

.music-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

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

.card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

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

.music-card:hover .card-thumb img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255,255,255,0.3);
}

/* サムネイル上の再生アイコン */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,107,53,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}

.play-overlay::after {
    content: '▶';
    color: #fff;
    font-size: 24px;
    margin-left: 4px;
}

.music-card:hover .play-overlay {
    opacity: 1;
}

.card-body {
    padding: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.card-tags .tag {
    font-size: 11px;
    color: var(--color-accent);
    font-weight: 600;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    color: var(--color-text);
}

.card-title::before {
    content: '▶ ';
    color: var(--color-accent);
    font-size: 14px;
}

.card-mood {
    font-size: 13px;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.card-mood::before {
    content: '♡ ';
    color: var(--color-accent2);
}

/* ダウンロードボタン（BGMer風） */
.card-downloads {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.download-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: var(--color-dark);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.download-btn:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
}

.download-btn .label {
    font-weight: 700;
}

.download-btn .time {
    font-size: 11px;
    opacity: 0.8;
}

/* ===== 詳細ページ ===== */
.music-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.music-single .music-title {
    font-size: 32px;
    margin-bottom: 24px;
    font-weight: 700;
}

.youtube-player {
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.youtube-player iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.download-section {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid #e8e8e8;
}

.download-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 700;
}

.download-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255,107,53,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.4);
}

.btn-secondary {
    background: var(--color-dark);
    color: #fff;
}

.btn-secondary:hover {
    background: #2a2a4e;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.music-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid #e8e8e8;
}

.meta-item {
    font-size: 14px;
    color: var(--color-text-light);
}

.music-taxonomies {
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid #e8e8e8;
}

.tax-group {
    margin-bottom: 8px;
    font-size: 14px;
}

.tax-group a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.tax-group a:hover {
    text-decoration: underline;
}

/* ===== 一覧絞り込み ===== */
.filter-nav {
    margin-bottom: 32px;
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid #e8e8e8;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tags .tag {
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 50px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 14px;
    transition: all 0.2s;
    font-weight: 500;
}

.filter-tags .tag:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
    color: #fff;
}

.filter-tags .tag.active {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
    color: #fff;
}

/* ===== カテゴリリンク（トップページ） ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #fff;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s;
    box-shadow: var(--shadow);
    border: 1px solid #e8e8e8;
    min-height: 100px;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
    color: #fff;
    border-color: transparent;
}

.cat-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    text-align: center;
    line-height: 1.3;
}

.cat-count {
    font-size: 12px;
    opacity: 0.7;
}

/* ===== 雰囲気タグ ===== */
.mood-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mood-tag {
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 14px;
    transition: all 0.2s;
    font-weight: 500;
}

.mood-tag:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
    color: #fff;
    border-color: transparent;
}

/* ===== ページネーション ===== */
.pagination {
    text-align: center;
    margin-top: 40px;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 4px;
    background: #fff;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
    color: #fff;
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
    color: #fff;
}

/* ===== セクションフッター ===== */
.section-footer {
    text-align: center;
    margin-top: 32px;
}

.section-footer .btn {
    background: #fff;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.section-footer .btn:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 100%);
    color: #fff;
    border-color: transparent;
}

/* ===== 詳細ページ：説明文 ===== */
.music-description {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    border: 1px solid #e8e8e8;
    line-height: 1.8;
}

.music-description p {
    margin-bottom: 1em;
}

.music-description p:last-child {
    margin-bottom: 0;
}

/* ===== フッター ===== */
.site-footer {
    background: var(--color-dark);
    color: #fff;
    padding: 32px 20px;
    margin-top: 48px;
}

.site-footer .site-info {
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

.site-footer a {
    color: var(--color-accent);
}

/* ===== Select要素のスタイル確保 ===== */
select {
    -webkit-appearance: auto;
    -moz-appearance: auto;
    appearance: auto;
    cursor: pointer;
}

/* ===== アーカイブページ共通 ===== */
.music-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.music-archive h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--color-text);
    line-height: 1.3;
}

.music-archive .no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-light);
    font-size: 16px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e8e8e8;
}

/* ===== WordPressデフォルト上書き ===== */
.entry-header {
    display: none;
}

.widget-area,
#secondary,
aside.widget-area {
    display: none !important;
}

/* 親テーマのコンテンツエリア調整 */
#primary,
.content-area {
    max-width: 100% !important;
}

/* ページタイトル調整 */
.page-title {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-size: 28px;
    font-weight: 800;
}

/* archiveページのヘッダー調整 */
.archive-header {
    max-width: 1200px;
    margin: 40px auto 20px;
    padding: 0 20px;
}

.archive-header .archive-title {
    font-size: 28px;
    font-weight: 800;
}
