body {
    font-family: sans-serif;
    background-color: #f9f9f9;
    padding: 20px;
    margin: 0;
}

/* 年別・ソートコントロールエリア */
.sort-controls {
    max-width: 1200px;
    margin: 0 auto 20px auto;
    text-align: right;
}

/* コントロール内のグループ配置 */
.sort-group {
    display: inline-block;
    margin-right: 30px;
}

.pager-group {
    display: inline-block;
    background-color: #eee;
    padding: 4px 10px;
    border-radius: 4px;
}

/* 共通ボタンスタイル */
.sort-btn {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sort-btn:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* 💡 選択中のアクティブ状態（!importantなしで制御） */
.sort-btn.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* ボタン無効化時（限界値に達したとき）のスタイル */
.sort-btn:disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
    border-color: #ccc;
    cursor: not-allowed;
}

/* 動画表示グリッド */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 動画カード本体 */
.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ホバー時のシャキッとした浮き上がりエフェクト */
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

/* サムネイル比率の固定（16:9） */
.thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
}

.thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* テキスト情報エリア */
.info {
    padding: 12px;
}

.title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.artist {
    font-size: 12px;
    color: #606060;
    margin-bottom: 4px;
}

.year {
    font-size: 11px;
    color: #909090;
}

/* モーダル（暗い背景） */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* モーダル表示時（JavaScriptからactiveを付与） */
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* モーダルコンテンツ枠（16:9） */
.modal-content {
    width: 90%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
}

/* YouTubeプレイヤー本体 */
.video-player {
    width: 100%;
    height: 100%;
    border: none;
}