@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@300;400;500;700&display=swap');

:root {
    --primary: #9D80FF; /* より明るい紫に調整 */
    --primary-dark: #7A5CFF;
    --primary-light: #4B3C86;
    --primary-lighter: #362A66;
    --secondary: #FF6B96; /* ピンク色を維持 */
    --accent: #54D3FF; /* 明るい青色を維持 */
    --text: #E1E1E6;
    --text-light: #B5B5C3;
    --bg: #121218;
    --card-bg: #1E1E26;
    --hover-bg: #2A2A36;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-strong: rgba(0, 0, 0, 0.6);
    --gradient: linear-gradient(135deg, #7A5CFF 0%, #FF6B96 100%);
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'M PLUS Rounded 1c', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        linear-gradient(45deg, rgba(75, 60, 134, 0.3) 25%, transparent 25%, transparent 75%, rgba(75, 60, 134, 0.3) 75%),
        linear-gradient(45deg, rgba(75, 60, 134, 0.3) 25%, transparent 25%, transparent 75%, rgba(75, 60, 134, 0.3) 75%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

/* ヘッダー - モバイル最適化 */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px var(--shadow);
    padding: 0.8rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 0.8rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 1.1rem;
}

/* ヒーローセクションのレスポンシブ対応強化 */
.hero {
    background: var(--gradient);
    padding: 2.5rem 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .hero {
        padding: 4rem 0;
        margin-bottom: 5rem;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: 0;
    animation: bgMove 60s linear infinite;
}

/* 音波アニメーション */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E");
    background-size: cover;
    z-index: 1;
}

@media (min-width: 768px) {
    .hero-wave {
        height: 60px;
    }
}

/* 音符と波形のアニメーション - モバイルでは数を減らす */
.music-notes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.music-note {
    position: absolute;
    opacity: 0.15;
    animation: floatNote 15s linear infinite;
}

.music-note:nth-child(1) {
    top: 20%;
    left: 10%;
    font-size: 1.5rem;
    animation-duration: 15s;
    animation-delay: 0s;
}

.music-note:nth-child(2) {
    top: 30%;
    left: 20%;
    font-size: 1.2rem;
    animation-duration: 18s;
    animation-delay: 1s;
}

.music-note:nth-child(3) {
    top: 15%;
    left: 30%;
    font-size: 1.6rem;
    animation-duration: 20s;
    animation-delay: 2s;
}

@media (min-width: 768px) {
    .music-note:nth-child(1) { font-size: 2rem; }
    .music-note:nth-child(2) { font-size: 1.5rem; }
    .music-note:nth-child(3) { font-size: 2.2rem; }
}

.music-note:nth-child(4),
.music-note:nth-child(5),
.music-note:nth-child(6),
.music-note:nth-child(7) {
    display: none;
}

@media (min-width: 768px) {
    .music-note:nth-child(4),
    .music-note:nth-child(5),
    .music-note:nth-child(6),
    .music-note:nth-child(7) {
        display: block;
    }
    
    .music-note:nth-child(4) {
        top: 40%;
        left: 40%;
        font-size: 1.8rem;
        animation-duration: 17s;
        animation-delay: 3s;
    }
    
    .music-note:nth-child(5) {
        top: 25%;
        left: 60%;
        font-size: 2rem;
        animation-duration: 19s;
        animation-delay: 4s;
    }
    
    .music-note:nth-child(6) {
        top: 35%;
        left: 70%;
        font-size: 1.7rem;
        animation-duration: 16s;
        animation-delay: 5s;
    }
    
    .music-note:nth-child(7) {
        top: 20%;
        left: 80%;
        font-size: 2.1rem;
        animation-duration: 21s;
        animation-delay: 6s;
    }
}

@keyframes floatNote {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 音声波形表現 - モバイルでは数を減らす */
.waveform {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

@media (min-width: 768px) {
    .waveform {
        bottom: 60px;
        height: 40px;
    }
}

.wave-bar {
    width: 3px;
    height: 100%;
    margin: 0 1px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 1.5px;
    animation: wave 1.5s ease-in-out infinite;
}

@media (min-width: 768px) {
    .wave-bar {
        width: 4px;
        margin: 0 2px;
        border-radius: 2px;
    }
}

.wave-bar:nth-child(2n) {
    animation-delay: 0.2s;
}

.wave-bar:nth-child(3n) {
    animation-delay: 0.4s;
}

.wave-bar:nth-child(4n) {
    animation-delay: 0.6s;
}

.wave-bar:nth-child(5n) {
    animation-delay: 0.8s;
}

/* 10バー以上はモバイルでは非表示 */
.wave-bar:nth-child(n+11) {
    display: none;
}

@media (min-width: 768px) {
    .wave-bar:nth-child(n+11) {
        display: block;
    }
}

@keyframes wave {
    0%, 100% {
        height: 20%;
    }
    50% {
        height: 80%;
    }
}

/* ヒーローコンテンツレイアウト - モバイル対応 */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .hero-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.hero-text {
    margin-bottom: 1.5rem;
    color: var(--text);
}

@media (min-width: 768px) {
    .hero-text {
        margin-bottom: 0;
        width: 50%;
    }
}

.hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (min-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
}

.highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.2rem;
    background-color: var(--accent);
    border-radius: 1px;
    opacity: 0.7;
}

@media (min-width: 768px) {
    .highlight::after {
        height: 0.3rem;
        border-radius: 2px;
    }
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-size: 1rem;
    margin-top: 0.8rem;
}

@media (min-width: 768px) {
    .hero-subtitle {
        line-height: 1.6;
        font-size: 1.1rem;
        margin-top: 1rem;
    }
}

.hero-illustration {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .hero-illustration {
        width: 45%;
        max-width: 350px;
        margin-top: 0;
    }
}

/* ヒーローカードの新デザイン - モバイル対応 */
.hero-card {
    background-color: var(--white);
    border-radius: 1.2rem;
    padding: 1.2rem;
    box-shadow: 0 8px 24px var(--shadow-strong);
    position: relative;
    z-index: 2;
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
    overflow: hidden;
    max-width: 280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-card {
        border-radius: 1.5rem;
        padding: 1.5rem;
        box-shadow: 0 10px 30px var(--shadow-strong);
        max-width: 350px;
    }
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 100%);
    transform: rotate(45deg);
    z-index: 1;
}

.hero-card:hover {
    transform: rotate(0deg) scale(1.03);
}

.hero-card-inner {
    background-color: var(--primary-light);
    border-radius: 0.8rem;
    padding: 1.2rem;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .hero-card-inner {
        border-radius: 1rem;
        padding: 1.5rem;
    }
}

/* 音楽プレーヤー風UI - モバイル対応 */
.music-player {
    width: 100%;
    padding-top: 0.8rem;
}

@media (min-width: 768px) {
    .music-player {
        padding-top: 1rem;
    }
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
}

@media (min-width: 768px) {
    .player-controls {
        margin-top: 1rem;
    }
}

.player-button {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .player-button {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

.player-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.player-progress {
    height: 0.4rem;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.2rem;
    position: relative;
    overflow: hidden;
    margin-top: 0.8rem;
}

@media (min-width: 768px) {
    .player-progress {
        height: 0.5rem;
        border-radius: 0.25rem;
        margin-top: 1rem;
    }
}

.player-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 35%;
    background-color: var(--primary);
    border-radius: 0.2rem;
}

@media (min-width: 768px) {
    .player-progress-bar {
        border-radius: 0.25rem;
    }
}

/* ヒーロー装飾要素 */
.hero-decoration {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(5px);
    z-index: 1;
}

.hero-decoration-1 {
    width: 6rem;
    height: 6rem;
    background-color: var(--accent);
    top: -1.5rem;
    right: -1.5rem;
    animation: float 6s ease-in-out infinite;
}

@media (min-width: 768px) {
    .hero-decoration-1 {
        width: 8rem;
        height: 8rem;
        top: -2rem;
        right: -2rem;
    }
}

.hero-decoration-2 {
    width: 4rem;
    height: 4rem;
    background-color: var(--secondary);
    bottom: -1rem;
    left: -1rem;
    animation: float 8s ease-in-out infinite 1s;
}

@media (min-width: 768px) {
    .hero-decoration-2 {
        width: 5rem;
        height: 5rem;
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@media (min-width: 768px) {
    @keyframes float {
        0% {
            transform: translateY(0) rotate(0deg);
        }
        50% {
            transform: translateY(-20px) rotate(5deg);
        }
        100% {
            transform: translateY(0) rotate(0deg);
        }
    }
}

@keyframes bgMove {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.page-content {
    flex-grow: 1;
    padding-bottom: 3rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .page-content {
        padding-bottom: 4rem;
    }
}

/* 今日のピックアップセクション - モバイル対応 */
.featured-today {
    background-color: var(--card-bg);
    border-radius: 1.2rem;
    padding: 1.5rem;
    margin: 0 0 2.5rem 0;
    box-shadow: 0 8px 24px var(--shadow-strong);
    position: relative;
    overflow: hidden;
    transform: translateY(-25px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
    .featured-today {
        border-radius: 1.5rem;
        padding: 2rem;
        margin: 0 0 3rem 0;
        box-shadow: 0 10px 30px var(--shadow-strong);
        transform: translateY(-30px);
    }
}

.featured-today::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0.3rem;
    height: 100%;
    background: var(--gradient);
}

@media (min-width: 768px) {
    .featured-today::before {
        width: 0.5rem;
    }
}

.featured-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--gradient);
    color: var(--text);
    padding: 0.4rem 0.8rem;
    border-radius: 1.5rem;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    box-shadow: 0 3px 8px rgba(123, 104, 238, 0.3);
}

@media (min-width: 768px) {
    .featured-label {
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        border-radius: 2rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
        box-shadow: 0 4px 10px rgba(123, 104, 238, 0.3);
    }
}

.featured-label i {
    font-size: 0.7rem;
}

@media (min-width: 768px) {
    .featured-label i {
        font-size: 0.8rem;
    }
}

.featured-title {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    color: var(--text);
}

@media (min-width: 768px) {
    .featured-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
}

.featured-artist {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

@media (min-width: 768px) {
    .featured-artist {
        gap: 0.5rem;
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

.featured-artist i {
    color: var(--secondary);
}

.featured-thumbnail {
    width: 100%;
    border-radius: 0.8rem;
    margin-bottom: 1.2rem;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .featured-thumbnail {
        border-radius: 1rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 5px 15px var(--shadow);
    }
}

.featured-thumbnail:hover {
    transform: scale(1.02);
}

.featured-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .featured-details {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
}

.featured-details-text {
    color: var(--text-light);
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .featured-details-text {
        font-size: 0.9rem;
    }
}

.featured-details-text div {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

@media (min-width: 768px) {
    .featured-details-text div {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

.featured-details-text i {
    color: var(--primary);
}

.featured-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--gradient);
    color: var(--text);
    padding: 0.7rem 1.2rem;
    border-radius: 1.5rem;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(123, 104, 238, 0.3);
    width: 100%;
}

@media (min-width: 768px) {
    .featured-btn {
        gap: 0.5rem;
        padding: 0.8rem 1.5rem;
        border-radius: 2rem;
        box-shadow: 0 4px 10px rgba(123, 104, 238, 0.3);
        width: auto;
    }
}

.featured-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(123, 104, 238, 0.4);
}

@media (min-width: 768px) {
    .featured-btn:hover {
        box-shadow: 0 6px 15px rgba(123, 104, 238, 0.4);
    }
}

.featured-btn i {
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .featured-btn i {
        font-size: 0.9rem;
    }
}

/* セクションタイトル - モバイル対応 */
.section-title-container {
    text-align: center;
    margin: 0 0 2rem 0;
    position: relative;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 1.6rem;
        padding: 0 1.5rem;
        margin-bottom: 1rem;
    }
}

.section-title {
    display: inline-block;
    font-size: 1.6rem;
    position: relative;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 2rem;
    height: 0.3rem;
    background: var(--gradient);
    border-radius: 0.15rem;
}

@media (min-width: 768px) {
    .section-title::before,
    .section-title::after {
        width: 2rem;
        height: 0.3rem;
        border-radius: 0.15rem;
    }
}

.section-title::before {
    left: -5rem;
    transform: translateY(-50%) rotate(45deg);
}

.section-title::after {
    right: -5rem;
    transform: translateY(-50%) rotate(-45deg);
}

@media (min-width: 768px) {
    .section-title::before {
        left: -2rem;
    }
    
    .section-title::after {
        right: -2rem;
    }
}

.section-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .section-subtitle {
        font-size: 1rem;
    }
}

/* ソートボタン - モバイル向け最適化 */
.sort-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--primary) var(--card-bg); /* Firefox */
}

.sort-container::-webkit-scrollbar {
    height: 3px;
}

.sort-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.sort-container::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 3px;
}

@media (min-width: 768px) {
    .sort-container {
        margin-bottom: 3rem;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.sort-buttons {
    background-color: var(--card-bg);
    border-radius: 1.5rem;
    padding: 0.3rem;
    display: inline-flex;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

@media (min-width: 768px) {
    .sort-buttons {
        border-radius: 2rem;
        padding: 0.5rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

.sort-btn {
    border: none;
    background: none;
    padding: 0.6rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 44px; /* タップターゲットサイズ確保 */
}

@media (min-width: 768px) {
    .sort-btn {
        padding: 0.7rem 1.5rem;
        border-radius: 2rem;
        font-size: 0.95rem;
        gap: 0.5rem;
    }
}

.sort-btn i {
    font-size: 0.7rem;
}

@media (min-width: 768px) {
    .sort-btn i {
        font-size: 0.8rem;
    }
}

.sort-btn.active {
    background: var(--gradient);
    color: var(--text);
    box-shadow: 0 3px 8px rgba(123, 104, 238, 0.3);
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .sort-btn.active {
        box-shadow: 0 4px 10px rgba(123, 104, 238, 0.3);
    }
}

.sort-btn:not(.active):hover {
    background-color: var(--hover-bg);
    color: var(--primary);
    transform: translateY(-1px);
}

/* 動画グリッド - モバイル対応 */
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }
}

@media (min-width: 768px) {
    .video-grid {
        gap: 2rem;
        margin-bottom: 4rem;
    }
}

@media (min-width: 960px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.video-card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    top: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    will-change: transform; /* パフォーマンス最適化 */
}

@media (min-width: 768px) {
    .video-card {
        border-radius: 1.2rem;
        box-shadow: 0 5px 20px var(--shadow);
    }
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-strong);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .video-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px var(--shadow-strong);
    }
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-content {
    padding: 1.2rem;
    position: relative;
}

@media (min-width: 768px) {
    .video-content {
        padding: 1.5rem;
    }
}

.video-category {
    position: absolute;
    top: -0.8rem;
    right: 0.8rem;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.3rem 0.8rem;
    border-radius: 0.8rem;
    box-shadow: 0 2px 8px var(--shadow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

@media (min-width: 768px) {
    .video-category {
        top: -1rem;
        right: 1rem;
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
        border-radius: 1rem;
        box-shadow: 0 3px 10px var(--shadow);
    }
}

.video-category.cover {
    background-color: rgba(157, 128, 255, 0.4);
    color: #FFF;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.video-category.original {
    background-color: rgba(255, 107, 150, 0.4);
    color: #FFF;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.video-title {
    font-size: 1rem;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
    transition: color 0.3s ease;
}

@media (min-width: 768px) {
    .video-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
        line-height: 1.4;
    }
}

.video-card:hover .video-title {
    color: var(--primary);
}

.video-artist {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

@media (min-width: 768px) {
    .video-artist {
        gap: 0.5rem;
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
}

.video-artist i {
    color: var(--secondary);
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .video-meta {
        font-size: 0.8rem;
    }
}

.video-meta div {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

@media (min-width: 768px) {
    .video-meta div {
        gap: 0.4rem;
    }
}

.video-meta i {
    color: var(--primary);
    font-size: 0.7rem;
}

@media (min-width: 768px) {
    .video-meta i {
        font-size: 0.75rem;
    }
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 3rem;
    height: 3rem;
    background: rgba(30, 30, 38, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

@media (min-width: 768px) {
    .video-play-btn {
        width: 4rem;
        height: 4rem;
        font-size: 1.5rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
}

.video-card:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1);
}

.video-play-btn i {
    margin-left: 3px;
}

@media (min-width: 768px) {
    .video-play-btn i {
        margin-left: 5px;
    }
}

.video-thumbnail-container {
    position: relative;
    overflow: hidden;
}

.video-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-thumbnail-overlay {
    opacity: 1;
}

/* モバイル用オーバーレイは常に表示 */
@media (max-width: 767px) {
    .video-thumbnail-overlay {
        opacity: 0.5;
    }
    
    .video-play-btn {
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* 空の状態 - モバイル対応 */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    background-color: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 16px var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
    grid-column: 1 / -1;
    margin: 0 auto;
    max-width: 500px;
    width: 100%;
}

@media (min-width: 768px) {
    .empty-state {
        padding: 3rem;
        border-radius: 1.2rem;
        box-shadow: 0 5px 20px var(--shadow);
    }
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 0.8rem;
}

@media (min-width: 768px) {
    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--text);
}

@media (min-width: 768px) {
    .empty-state h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 300px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .empty-state p {
        font-size: 1rem;
    }
}

/* ローディング - モバイル対応 */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

@media (min-width: 768px) {
    .loading {
        padding: 3rem;
    }
}

.loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary);
    animation: spin 1s infinite linear;
    margin: 0 auto 0.8rem;
}

@media (min-width: 768px) {
    .loading-spinner {
        width: 3rem;
        height: 3rem;
        border-width: 4px;
        margin: 0 auto 1rem;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* フッター - モバイル対応 */
footer {
    background-color: var(--card-bg);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
    box-shadow: 0 -2px 8px var(--shadow);
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
    footer {
        padding: 2rem 0;
        font-size: 0.9rem;
        box-shadow: 0 -2px 10px var(--shadow);
    }
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

@media (min-width: 768px) {
    .footer-content {
        gap: 1rem;
    }
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

@media (min-width: 768px) {
    .footer-logo {
        font-size: 1.2rem;
        gap: 0.5rem;
    }
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 0.8rem 0;
}

@media (min-width: 768px) {
    .footer-nav {
        gap: 1.5rem;
        margin: 1rem 0;
    }
}

.footer-nav a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

@media (min-width: 768px) {
    .social-links {
        gap: 1rem;
        margin-bottom: 1rem;
    }
}

.social-link {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 44px; /* タップターゲットサイズ確保 */
    min-height: 44px;
}

@media (min-width: 768px) {
    .social-link {
        width: 2.2rem;
        height: 2.2rem;
    }
}

.social-link:hover {
    background: var(--primary);
    color: var(--text);
    transform: translateY(-3px);
}

.footer-copyright {
    margin-top: 0.8rem;
}

@media (min-width: 768px) {
    .footer-copyright {
        margin-top: 1rem;
    }
}

/* モバイル用タップターゲットの最適化 */
@media (max-width: 767px) {
    /* タップターゲットを大きく */
    .sort-btn, 
    .featured-btn, 
    .video-card,
    .social-link {
        touch-action: manipulation;
    }
    
    /* フォーカスを明確に */
    .sort-btn:focus, 
    .featured-btn:focus, 
    .video-card:focus,
    .social-link:focus {
        outline: 2px solid var(--primary);
    }
    
    /* タッチエリアの拡大 */
    .featured-btn {
        min-height: 44px;
        padding: 0.8rem 1.2rem;
    }
    
    .player-button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* モバイルでのスクロールパフォーマンス改善 */
@media (max-width: 767px) {
    .hero, 
    .featured-today, 
    .video-card {
        will-change: transform;
    }
    
    /* Fast Tap on iOS */
    a, button, .video-card, .player-button {
        -webkit-tap-highlight-color: transparent;
    }
}

/* 画面の小さいモバイル端末用の調整 */
@media (max-width: 374px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .section-subtitle {
        font-size: 0.8rem;
    }
    
    .video-title {
        font-size: 0.9rem;
    }
    
    .video-artist,
    .video-meta {
        font-size: 0.8rem;
    }
    
    .sort-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* 縦向き・横向きの最適化 */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-content {
        flex-direction: row;
    }
    
    .hero-text {
        width: 50%;
        margin-bottom: 0;
    }
    
    .hero-illustration {
        width: 45%;
        margin-top: 0;
    }
}

/* オフライン通知 */
.offline-message {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    color: var(--text);
    padding: 1rem;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px var(--shadow);
    border-top: 3px solid var(--secondary);
    animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* 画面読み込み時のアニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.video-card {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 遅延アニメーション */
.video-card:nth-child(2) { animation-delay: 0.1s; }
.video-card:nth-child(3) { animation-delay: 0.2s; }
.video-card:nth-child(4) { animation-delay: 0.25s; }
.video-card:nth-child(5) { animation-delay: 0.3s; }
.video-card:nth-child(6) { animation-delay: 0.35s; }

/* プリント用スタイル */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .hero, .sort-container, footer {
        display: none;
    }
    
    .video-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}-container {
        margin: 0 0 2.5rem 0;
    }
}

.section-title {
    display: inline-block;
    font-size: 1.4rem;
    position: relative;
    padding: 0 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 1.6rem;
        padding: 0 1.5rem;
        margin-bottom: 1rem;
    }
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 1.5rem;
    height: 0.25rem;
    background: var(--gradient);
    border-radius: 0.12rem;
}

@media (min-width: 768px) {
    .section-title::before,
    .section-title::after {
        width: 2rem;
        height: 0.3rem;
        border-radius: 0.15rem;
    }
}

.section-title::before {
    left: -1.5rem;
    transform: translateY(-50%) rotate(45deg);
}

.section-title::after {
    right: -1.5rem;
    transform: translateY(-50%) rotate(-45deg);
}

@media (min-width: 768px) {
    .section-title::before {
        left: -2rem;
    }
    
    .section-title::after {
        right: -2rem;
    }
}

.section-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .section-subtitle {
        font-size: 1rem;
    }
}
