/* ==============================================
   K41ru Entertainment - Ultra Advanced Styles
   超高度スタイル v2.0
   ============================================== */

/* 3Dカード変形 */
.artist-card,
.music-card,
.news-card {
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
    will-change: transform;
    isolation: isolate; /* 重なり問題を防ぐ */
}

/* パララックス用カード設定 */
.artists-grid,
.music-grid {
    position: relative;
    z-index: 1;
}

.artists-grid .artist-card,
.music-grid .music-card {
    position: relative;
    z-index: auto;
}

/* テキストリビールアニメーション */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(-90deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* マウスフォロワー */
.mouse-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.6);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
    mix-blend-mode: screen;
}

.mouse-follower.hovering {
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(102, 126, 234, 0.8);
}

/* オーディオビジュアライザー */
.audio-visualizer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.visualizer-bar {
    width: 8px;
    background: linear-gradient(to top, var(--primary-purple), var(--accent-pink));
    border-radius: 4px 4px 0 0;
    transition: height 0.2s ease;
    animation: visualizerPulse 0.8s ease-in-out infinite alternate;
}

@keyframes visualizerPulse {
    0% {
        opacity: 0.6;
        filter: brightness(1);
    }
    100% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

/* ページトランジションオーバーレイ */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-violet));
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

.page-transition-overlay::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 3px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ヒーロー背景画像 + グラデーションオーバーレイ */
.hero {
    background:
        linear-gradient(180deg, rgba(9,9,15,0.55) 0%, rgba(9,9,15,0.25) 40%, rgba(9,9,15,0.65) 85%, rgba(9,9,15,0.95) 100%),
        url('hero-bg.webp') center / cover no-repeat;
    position: relative;
    overflow: hidden;
}
/* JPEG fallback for browsers without WebP */
@supports not (background-image: -webkit-image-set(url('hero-bg.webp') type('image/webp'))) {
    .hero {
        background:
            linear-gradient(180deg, rgba(9,9,15,0.55) 0%, rgba(9,9,15,0.25) 40%, rgba(9,9,15,0.65) 85%, rgba(9,9,15,0.95) 100%),
            url('hero-bg.jpg') center / cover no-repeat;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ヒーローセクション波エフェクト - CSS純粋アニメーション版（2025年10月8日） */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 100px;
    background: transparent;
    pointer-events: none;
}

.hero::before {
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0) 100%);
    background-size: 800px 100px;
    background-repeat: repeat-x;
    animation: wave1 15s linear infinite;
    opacity: 0.8;
}

.hero::after {
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 65%, rgba(255, 255, 255, 0) 100%);
    background-size: 600px 80px;
    background-repeat: repeat-x;
    animation: wave2 20s linear infinite reverse;
    opacity: 0.6;
    bottom: 10px;
}

@keyframes wave1 {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-800px);
    }
}

@keyframes wave2 {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-600px);
    }
}

/* カードホバー時のシャドウ強化 */
.artist-card:hover,
.music-card:hover,
.news-card:hover {
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(102, 126, 234, 0.3),
        inset 0 -2px 20px rgba(102, 126, 234, 0.2);
}

/* グロウエフェクト */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* パーティクルグロー */
.particle-canvas {
    filter: blur(1px);
    opacity: 0.6;
}

/* スクロールプログレスグロー */
.scroll-progress-bar {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

/* 音楽カードプレイ状態強化 */
.music-card.playing {
    animation: musicPulse 1s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
}

@keyframes musicPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 60px rgba(102, 126, 234, 0.8);
    }
}

/* セクションタイトルアンダーライン */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-pink));
    transition: width 0.6s ease;
    border-radius: 2px;
}

.section-title.animate-in::after {
    width: 80px;
}

/* ニュースカードホバー時の画像ズーム */
.news-image {
    transition: transform 0.5s ease;
    overflow: hidden;
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

/* アーティストカードグラデーションボーダー */
.artist-card {
    position: relative;
    background: var(--bg-white);
}

.artist-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg,
        var(--primary-purple),
        var(--primary-violet),
        var(--accent-pink),
        var(--primary-purple)
    );
    border-radius: var(--radius-xl);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    animation: borderRotate 3s linear infinite;
    background-size: 300% 300%;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.artist-card:hover::before {
    opacity: 1;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .mouse-follower {
        display: none;
    }

    .audio-visualizer {
        height: 100px;
    }

    .visualizer-bar {
        width: 4px;
    }

    .hero::before {
        height: 80px;
    }
}

/* ローディングアニメーション */
.loading-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-full);
    color: var(--primary-purple);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.loading-indicator.active {
    opacity: 1;
}

/* ダークモード対応 */
body.dark-mode .page-transition-overlay {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

body.dark-mode .mouse-follower {
    background: rgba(167, 139, 250, 0.6);
}

body.dark-mode .mouse-follower.hovering {
    background: rgba(167, 139, 250, 0.3);
    border-color: rgba(167, 139, 250, 0.8);
}
