/* --- 基本スタイル & アニメーション --- */
:root {
    --bg-color: #1a1a3b;
    --text-color: #f0f0f0;
    --accent-color: #d1bfff;
    --card-bg: rgba(0, 0, 0, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    overflow-x: hidden;
    margin: 0;
}

.font-playfair { font-family: 'Playfair Display', serif; }

@keyframes gradient-animation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}
@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; text-shadow: 0 0 5px var(--accent-color); }
    50% { opacity: 1; text-shadow: 0 0 15px var(--accent-color); }
}

/* --- 共通コンポーネント --- */
.section-title {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color), 0 0 12px var(--accent-color);
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.25rem;
}
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    color: white;
    font-weight: bold;
    text-decoration: none;
    background: linear-gradient(45deg, #8a2be2, #d1bfff, #ff69b4, #8a2be2);
    background-size: 300% 300%;
    animation: gradient-animation 8s ease infinite;
    transition: all 0.3s ease;
}
.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-color);
}
.floating-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3), 0 0 15px rgba(209, 191, 255, 0.1);
}
.floating-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 25px rgba(209, 191, 255, 0.2);
}
.tab-active {
    background-color: var(--accent-color) !important;
    color: #0d0d2b !important;
    box-shadow: 0 0 10px var(--accent-color);
}
#filters button.filter-active {
    background-color: var(--accent-color);
    color: #0d0d2b;
    font-weight: bold;
}

/* --- レイアウト & セクション --- */
main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem 6rem 1rem;
}
main section { margin-bottom: 6rem; }
.grid { display: grid; gap: 2rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* --- プリローダー & 背景 --- */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-color); z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.8s ease, visibility 0.8s ease; }
#preloader .loader-text { color: var(--accent-color); font-size: 2rem; font-family: 'Playfair Display', serif; animation: pulse 2s infinite; }
#starry-sky { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

/* --- ヘッダー --- */
header { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; padding: 1rem; }
header h1 { font-size: 3rem; font-weight: 900; margin-bottom: 1rem; line-height: 1.2; }
header p { font-size: 1.125rem; color: #d1d5db; }
.galaxy-text { background: linear-gradient(45deg, #d1bfff, #a29bfe, #74b9ff, #d1bfff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-fill-color: transparent; animation: gradient-animation 5s ease infinite; background-size: 200% 200%; }
.scroll-down-arrow { position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); animation: bounce 2s infinite; color: var(--accent-color); font-size: 1.875rem; }

/* --- 言語スイッチャー --- */
#lang-switcher-container { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 50; }
#lang-switcher-btn { padding: 0.5rem 1rem; color: white; background-color: var(--card-bg); backdrop-filter: blur(5px); border: 1px solid var(--border-color); border-radius: 9999px; transition: all 0.3s; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; }
#lang-switcher-btn:hover { background-color: rgba(255, 255, 255, 0.2); }

/* --- 情報セクション --- */
.info-card { padding: 2rem; border-radius: 1rem; background-color: var(--card-bg); backdrop-filter: blur(4px); border: 1px solid var(--border-color); background-size: cover; background-blend-mode: overlay; }
.info-card h3 { font-size: 1.875rem; margin-bottom: 1rem; color: var(--accent-color); }
.info-card p { font-size: 1.25rem; }

/* --- スケジュールセクション --- */
.tab-buttons { display: flex; justify-content: center; margin-bottom: 1rem; gap: 1rem; }
.tab-buttons button { padding: 0.5rem 1.5rem; border-radius: 9999px; background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(4px); transition: all 0.3s; cursor: pointer; color: var(--text-color); }
.date-content.hidden { display: none; }
.schedule-card { padding: 2.5rem; border-radius: 1rem; background-color: var(--card-bg); backdrop-filter: blur(4px); border: 1px solid var(--border-color); }
.schedule-card h4 { font-size: 1.5rem; text-align: center; margin-bottom: 1.5rem; color: var(--accent-color); }
.schedule-item { display: flex; align-items: center; gap: 1rem; }
.schedule-item time { width: 7rem; font-weight: bold; color: var(--accent-color); }
.schedule-item div { flex: 1; border-left: 2px dashed var(--accent-color); padding-left: 1rem; }
.schedule-card .space-y-6 > * + * { margin-top: 1.5rem; }

/* --- 企画 & 展示セクション --- */
#filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
#filters button { padding: 0.5rem 1rem; border-radius: 9999px; border: 1px solid var(--border-color); transition: all 0.3s; cursor: pointer; color: var(--text-color); background-color: rgba(255, 255, 255, 0.1); }
.booth-card { background-color: var(--card-bg); backdrop-filter: blur(4px); border: 1px solid var(--border-color); border-radius: 1rem; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.booth-card > div:first-child { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 1rem; min-height: 180px; }
.booth-card h3 { font-size: 1.25rem; font-weight: bold; }
.booth-card p { font-size: 0.875rem; margin-top: 0.25rem; color: #e0e0e0; }
.booth-details { display: none; padding: 1rem; border-top: 1px solid var(--border-color); background-color: rgba(0,0,0,0.2); color: #d1d5db; }
.booth-details p { margin-top: 0.5rem; }

/* --- 混雑状況セクション --- */
#crowd-status-grid { max-width: 56rem; margin: 0 auto; padding: 2rem; border-radius: 1rem; background-color: var(--card-bg); backdrop-filter: blur(4px); border: 1px solid var(--border-color); }
.status-item { display: flex; align-items: center; }
.status-indicator { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; margin-right: 0.75rem; }
.status-0 { background-color: #4ade80; box-shadow: 0 0 8px #4ade80; } /* green */
.status-1 { background-color: #facc15; box-shadow: 0 0 8px #facc15; } /* yellow */
.status-2 { background-color: #f87171; box-shadow: 0 0 8px #f87171; } /* red */

/* --- マップセクション --- */
.map-container { background-color: var(--card-bg); padding: 1rem; border-radius: 1rem; border: 1px solid var(--border-color); }
.map-image { width: 100%; border-radius: 0.5rem; cursor: pointer; }
.map-image.hidden { display: none; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); align-items: center; justify-content: center; }
.modal-content { margin: auto; display: block; max-width: 90%; max-height: 90%; }
.modal-close { position: absolute; top: 25px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }

/* --- フッター --- */
footer { position: relative; padding: 5rem 0 2rem 0; margin-top: 4rem; text-align: center; color: #9ca3af; font-size: 0.875rem; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.footer-stars { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
.star { position: absolute; background-color: white; border-radius: 50%; animation: twinkle 5s infinite ease-in-out; }

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

/* --- レスポンシブ対応 --- */
@media (min-width: 768px) {
    .md-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    header h1 { font-size: 5rem; }
    header p { font-size: 1.5rem; }
    .section-title { font-size: 3rem; }
}
