/* --- 基本スタイル & アニメーション --- */
:root {
    --bg-color: #ffd83f;
    --text-color: #555555;
    --accent-color: #4349ff;
    --card-bg: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-color);
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;

    color: var(--text-color);
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    overflow-x: hidden;
    margin: 0;
}
.font-playfair { font-family: 'Playfair Display', 'Arial', serif; , color: #9a9a9a}

@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); }
}

/* --- ヘッダー & プリローダー --- */
#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; 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%; color: #fead3b;}
.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; text-decoration: none; }
#lang-switcher-container { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 50; }
#lang-switcher-btn { padding: 0.5rem 1rem; color: #555555; 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); }
.icon { display: inline-block; width: 1em; height: 1em; stroke-width: 0; stroke: currentColor; fill: currentColor; vertical-align: middle; }
@media (min-width: 768px) {
    header h1 { font-size: 5rem; }
    header p { font-size: 1.5rem; }
}

/* --- 共通コンポーネント --- */
.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;
}
@media (min-width: 768px) {
    .section-title { font-size: 3rem; }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    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);
    will-change: transform;
}
.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-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}
.tab-buttons button {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background-color: rgba(255,255,255,0.1);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
}
.tab-buttons button.tab-active {
    background-color: var(--accent-color);
    color: #0d0d2b;
    box-shadow: 0 0 10px var(--accent-color);
}

/* --- レイアウト & セクション --- */
main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem 6rem 1rem;
}
main section { margin-bottom: 6rem; }

.grid { display: grid; gap: 2rem; grid-template-columns: repeat(1, minmax(0, 1fr));}
@media (min-width: 768px) { .md-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lg-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.cta-container { text-align: center; margin-top: 3rem; }

.fade-in-section {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}
.fade-in-section.is-visible {
    opacity: 1;
}

.info-card {
    padding: 2rem;
    border-radius: 1rem;
    background-color: var(--card-bg);
    backdrop-filter: blur(5px);
    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.125rem; }

.schedule-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: var(--card-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
}
.schedule-card.empty-card {
    display:flex;
    align-items:center;
    justify-content:center;
    color: #9ca3af;
    text-align:center;
}
.date-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #var(--accent-color);
}
.venue-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.schedule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.schedule-item time {
    width: 7rem;
    font-weight: bold;
    color: var(--accent-color);
    flex-shrink: 0;
}
.schedule-item div {
    flex-grow: 1;
    padding-left: 1rem;
    border-left: 2px dashed var(--accent-color);
}
.hidden { display: none; }

#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);
    background-color: rgba(255,255,255,0.1);
    color: var(--text-);
    cursor: pointer;
    transition: all 0.3s;
}
#filters button.filter-active {
    background-color: var(--accent-color);
    color: #0d0d2b;
    font-weight: bold;
}

#booth-grid {
    min-height: 800px; /* CLS対策 */
}
.booth-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    contain: content;
    will-change: transform;
}
.booth-card > div:first-child {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    min-height: 100px;
}
.booth-card h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #555555;
}
.booth-card p {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: #555555;
}
.booth-details {
    display: none;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(227,227,227,0.3);
    color: #e0e0e0;
}

#crowd-status-grid {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: var(--card-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    min-height: 200px;  /* CLS対策 */
}
.loading-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #9ca3af;
}
.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.status-indicator {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-0 { background-color: #4ade80; box-shadow: 0 0 8px #4ade80; }
.status-1 { background-color: #facc15; box-shadow: 0 0 8px #facc15; }
.status-2 { background-color: #f87171; box-shadow: 0 0 8px #f87171; }

.map-container {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}
.map-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    cursor: pointer;
}
.map-desc {
    text-align: center;
    margin-top: 1rem;
    color: #555555;
}

.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; }

.access-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.access-info-item .icon {
    width: 1.5rem;
    flex-shrink: 0;
}
.gmap-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.gmap-card .icon {
    font-size: 2.25rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}
.gmap-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

footer { position: relative; padding: 5rem 1rem 2rem 1rem; margin-top: 4rem; text-align: center; color: #555555; 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; }

#Raijin {
    position: fixed;
    top: -2%;
    left: -2%;
    z-index: -9999;
    transform-origin: top left;
    transform: scale(0.4);
}

#Fujin {
    position: fixed;
    bottom: -2%;
    right: -2%;
    z-index: -9999;
    transform-origin: bottom right;
    transform: scale(0.4);
}
