/* common.css */

/* :root でサイト全体のカラー変数を定義 */
:root {
    --bg-color: #0a0a1a;
    --text-color: #e0e0e0;
    --accent-color: #00f3ff;
    --accent-color-dark: #00a8b3;
    --card-bg-color: rgba(20, 20, 40, 0.7);
    --card-border-color: rgba(0, 243, 255, 0.2);
    --font-primary: 'Raleway', sans-serif;
    --font-secondary: 'Righteous', cursive;
}

/* 基本的なページ設定 */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    /* 背景アニメーション停止用 */
    transition: background-color 0.5s;
}

body.game-active {
    background-color: #000;
}

/* SVG背景 */
.svg-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
    background: radial-gradient(circle at center, #0a0a0a 0%, #000 100%);
}

.header-waves {
    opacity: 1 !important;
}

.header-waves .svg-wave {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 5px var(--accent-color));
    opacity: 0.5;
    animation: wavePulse 6s infinite ease-in-out alternate;
}

.header-waves .wave-1 {
    stroke: var(--accent-color);
    animation: waveMorph1 15s infinite ease-in-out alternate, wavePulse 6s infinite ease-in-out alternate;
}

.header-waves .wave-2 {
    stroke: var(--accent-secondary, #bc13fe);
    animation: waveMorph2 12s infinite ease-in-out alternate, wavePulse 5s infinite ease-in-out alternate -2s;
    opacity: 0.3;
}

.header-waves .wave-3 {
    stroke: var(--accent-color);
    animation: waveMorph3 18s infinite ease-in-out alternate, wavePulse 7s infinite ease-in-out alternate -1s;
}

.header-waves .wave-4 {
    stroke: var(--accent-secondary, #bc13fe);
    animation: waveMorph4 20s infinite ease-in-out alternate, wavePulse 8s infinite ease-in-out alternate -3s;
    opacity: 0.4;
}

.header-waves .wave-5 {
    stroke: #fff;
    animation: waveMorph5 14s infinite ease-in-out alternate, wavePulse 6s infinite ease-in-out alternate -4s;
    opacity: 0.2;
}

@keyframes waveMorph1 {
    0% { d: path('M-100,500 C200,200 600,800 1100,500'); }
    50% { d: path('M-100,500 C400,100 800,900 1100,500'); }
    100% { d: path('M-100,500 C300,800 700,200 1100,500'); }
}

@keyframes waveMorph2 {
    0% { d: path('M-100,500 C400,800 700,200 1100,500'); }
    50% { d: path('M-100,500 C600,900 300,100 1100,500'); }
    100% { d: path('M-100,500 C500,200 500,800 1100,500'); }
}

@keyframes waveMorph3 {
    0% { d: path('M-100,500 C200,300 900,700 1100,500'); }
    50% { d: path('M-100,500 C500,800 500,200 1100,500'); }
    100% { d: path('M-100,500 C800,100 200,900 1100,500'); }
}

@keyframes waveMorph4 {
    0% { d: path('M-100,500 C600,700 400,300 1100,500'); }
    50% { d: path('M-100,500 C800,200 200,800 1100,500'); }
    100% { d: path('M-100,500 C300,900 700,100 1100,500'); }
}

@keyframes waveMorph5 {
    0% { d: path('M-100,500 C700,100 300,900 1100,500'); }
    50% { d: path('M-100,500 C400,500 600,500 1100,500'); }
    100% { d: path('M-100,500 C200,800 800,200 1100,500'); }
}

@keyframes wavePulse {
    0% {
        stroke-width: 1;
        filter: drop-shadow(0 0 2px currentColor);
    }
    100% {
        stroke-width: 3;
        filter: drop-shadow(0 0 8px currentColor);
    }
}

/* メインコンテンツのコンテナ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

/* セクション共通スタイル */
.showcase-section {
    margin-bottom: 60px;
}

.showcase-section h2 {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

/* フェードイン効果 */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- artist-profile.html 専用スタイル --- */
.group-photo-container {
    text-align: center;
    margin-bottom: 50px;
}

.group-photo-container img {
    max-width: 100%;
    width: 700px;
    border-radius: 15px;
    border: 2px solid var(--card-border-color);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.25);
}

.story-section {
    max-width: 800px;
    margin: 20px auto 40px;
    padding: 30px;
    background: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.story-section p {
    margin-bottom: 1em;
}

.member-profile {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
    flex-direction: column; /* Mobile first */
}

.member-image {
    flex-shrink: 0;
}

.member-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid var(--card-border-color);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

@media (min-width: 768px) {
    .member-profile {
        flex-direction: row;
    }
    .member-profile:nth-child(odd) {
        flex-direction: row-reverse;
    }
}

/* ユーティリティ */
.hidden {
    display: none !important;
}

/* --- カード共通スタイル --- */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.game-card,
.song-item {
    background: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    position: relative;
    cursor: pointer;
}

.game-card:hover,
.song-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.2);
    border-color: var(--accent-color);
}

/* カードの角に表示するNEW/UPDATEバッジ */
.game-card.is-new::after {
    content: "NEW";
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff007f 0%, #ff5e62 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 0, 127, 0.4);
    z-index: 2;
    pointer-events: none;
    letter-spacing: 1px;
}

.game-card.is-updated::after {
    content: "UPDATE";
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #00f3ff 0%, #00a8b3 100%);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 243, 255, 0.4);
    z-index: 2;
    pointer-events: none;
    letter-spacing: 1px;
}


.game-thumbnail,
.song-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--card-border-color);
}

.game-info,
.song-info {
    padding: 20px;
}

.cta-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 30px;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
}

.cta-button:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px var(--accent-color);
}

/* --- game.html のゲームプレビュー用モーダルスタイル --- */
.game-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.game-preview-overlay iframe {
    /* PCでは見やすいサイズに、スマホでは画面幅に合わせる */
    width: 100%;
    max-width: 960px;
    /* 16:9のアスペクト比を維持しつつ、画面内に収まるように高さを設定 */
    aspect-ratio: 16 / 9;
    max-height: 90vh;
    border: 2px solid var(--accent-color-dark);
    border-radius: 10px;
    background-color: #000;
}

.preview-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
    font-size: 24px;
    line-height: 33px;
    text-align: center; 
    cursor: pointer; 
    z-index: 10;
    transition: background-color 0.3s, transform 0.3s;
}

.preview-close-button:hover {
    background-color: var(--accent-color);
    color: #000;
    transform: scale(1.1) rotate(90deg);
}

@media (max-width: 768px) {
    .preview-close-button {
        top: 10px;
        right: 10px;
    }
}

/* --- ハンバーガーメニュー --- */
#menu-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
}

#menu-icon {
    width: 30px;
    height: 22px;
    position: relative;
    transition: transform 0.5s ease-in-out;
}

#menu-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text-color);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

#menu-icon span:nth-child(1) { top: 0px; }
#menu-icon span:nth-child(2) { top: 9px; }
#menu-icon span:nth-child(3) { top: 18px; }

#menu-container.open #menu-icon span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
    background: var(--accent-color);
}

#menu-container.open #menu-icon span:nth-child(2) {
    opacity: 0;
    left: -30px;
}

#menu-container.open #menu-icon span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
    background: var(--accent-color);
}

#menu-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    padding-top: 80px;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

#menu-container.open #menu-content {
    transform: translateX(0);
}

#menu-content ul { list-style: none; padding: 0; margin: 0; }
#menu-content li { text-align: center; margin: 20px 0; }
#menu-content a {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}
#menu-content a:hover { color: var(--accent-color); text-shadow: 0 0 10px var(--accent-color); }