/* 全体のリセットとベース設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Readability: improve base typography scale and spacing */
body { line-height: 1.75; }
p { font-size: 1.025rem; }
h1 { letter-spacing: 0.2px; }
h2, h3 { letter-spacing: 0.1px; }
* { -webkit-tap-highlight-color: transparent; }

/* Focus visibility (keyboard) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.cast-btn:focus-visible,
.menu-toggle:focus-visible,
.back-link:focus-visible,
.close:focus-visible,
.sidebar-item:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* 統一カラーパレット */
:root {
    --primary-color: #4f46e5; /* indigo-600 */
    --secondary-color: #8b5cf6; /* violet-500 */
    --accent-color: #f59e0b; /* amber-500 */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-white: rgba(255, 255, 255, 0.98);
    --bg-card: rgba(255, 255, 255, 0.95);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 15px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* タイポグラフィの改善 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }

h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* ボタンの統一スタイル */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-small);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-light);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn:active {
    transform: translateY(0);
}

/* サイドバー */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(10px);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-sidebar:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 0.25rem 0;
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: var(--accent-color);
    transform: translateX(5px);
}

.sidebar-item i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-item span {
    font-weight: 500;
    font-size: 1rem;
}

/* サイドバーオーバーレイ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

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

/* ヘッダー */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-heavy);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--border-radius-small);
    transition: var(--transition);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

/* メインコンテンツ */
.main {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding-top: 120px;
    padding-bottom: 3rem;
    position: relative;
}

/* 404 page styles */
.error-404 {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem;
    position: relative;
}

.error-sky {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.error-sky .star {
    position: absolute;
    color: rgba(255,255,255,0.65);
    text-shadow: 0 0 8px rgba(255,255,255,0.8), 0 0 16px rgba(255,255,255,0.4);
    animation: twinkle 2.2s ease-in-out infinite;
}

.error-sky .s1 { top: 12%; left: 14%; font-size: 14px; animation-delay: 0.1s; }
.error-sky .s2 { top: 28%; right: 10%; font-size: 12px; animation-delay: 0.6s; }
.error-sky .s3 { bottom: 18%; left: 8%; font-size: 10px; animation-delay: 1.1s; }
.error-sky .s4 { bottom: 26%; right: 18%; font-size: 16px; animation-delay: 1.6s; }

.error-sky .planet {
    position: absolute;
    top: 8%;
    right: 22%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff7 0%, #fff0 40%),
                linear-gradient(135deg, #f59e0b, #8b5cf6);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: floatY 6s ease-in-out infinite;
}

.ufo {
    position: absolute;
    left: 10%;
    top: 20%;
    width: 120px;
    height: 60px;
    transform: translateZ(0);
    animation: ufo-flight 10s ease-in-out infinite;
}

.ufo-top {
    position: absolute;
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
    width: 70px;
    height: 28px;
    background: linear-gradient(135deg, #e0f2fe, #93c5fd);
    border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) inset;
}

.ufo-bottom {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 120px;
    height: 36px;
    background: linear-gradient(135deg, #64748b, #94a3b8);
    border-radius: 60px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.ufo-beam {
    position: absolute;
    left: 50%;
    top: 32px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 28px solid transparent;
    border-right: 28px solid transparent;
    border-top: 140px solid rgba(255, 255, 255, 0.18);
    filter: blur(0.5px);
    animation: beam-pulse 2.2s ease-in-out infinite;
}

@keyframes ufo-flight {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(40vw, 10vh) rotate(2deg); }
    50% { transform: translate(60vw, -6vh) rotate(-2deg); }
    75% { transform: translate(20vw, 6vh) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes beam-pulse {
    0%, 100% { border-top-color: rgba(255, 255, 255, 0.10); }
    50% { border-top-color: rgba(255, 255, 255, 0.30); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.error-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 3.25rem 2.25rem;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.error-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
}

.error-title {
    font-size: 5.25rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}

.error-code {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
}

.error-emoji { display: inline-block; transform: rotate(-10deg); animation: wobble 2.5s ease-in-out infinite; }
@keyframes wobble {
    0%, 100% { transform: rotate(-10deg) translateY(0); }
    50% { transform: rotate(10deg) translateY(-4px); }
}

.error-sub {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.kaomoji {
    display: inline-block;
    margin-left: 0.25rem;
    position: relative;
    animation: sob 2.2s ease-in-out infinite;
}

/* tiny tear */
.kaomoji::after {
    content: '';
    position: absolute;
    left: 0.9em;
    top: 0.2em;
    width: 6px;
    height: 10px;
    border-radius: 50% 50% 60% 60% / 60% 60% 40% 40%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #93c5fd 60%);
    opacity: 0.9;
    filter: drop-shadow(0 2px 2px rgba(30, 58, 138, 0.25));
    animation: tear 1.8s ease-in-out infinite;
}

@keyframes sob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-2px) rotate(2deg); }
}

@keyframes tear {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 1; }
    60% { transform: translateY(6px); opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

.error-hint {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.error-actions { margin-bottom: 0.75rem; }
.error-btn { font-weight: 700; }

.error-small {
    font-size: 0.9rem;
    color: var(--text-light);
}

@media (max-width: 600px) {
    .error-title { font-size: 3.6rem; }
    .error-card { padding: 2.2rem 1rem; margin: 0 0.5rem; }
    .error-sub { font-size: 1.2rem; }
}

/* Constrain readable width for main content while preserving full-bleed background */
.main .container,
.hero,
.classes-section,
.schedule-header,
#schedule-tables,
.info-section,
.footer {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

.main > * {
    position: relative;
    z-index: 1;
}

/* ヒーローセクション */
.hero {
    background: var(--bg-white);
    margin: 2rem auto;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* カウントダウンセクション */
.countdown-section {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius-small);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 120px;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
}

.countdown-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.countdown-label {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-description {
    margin: 2rem 0 1.5rem 0;
    text-align: center;
}

.countdown-description h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
}

.festival-started {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-small);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 1rem;
    border-radius: var(--border-radius-small);
    background: rgba(102, 126, 234, 0.1);
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* クラスセクション */
.classes-section {
    margin: 2rem auto;
}

.classes-section h3 {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.class-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
    display: block;
    position: relative;
    overflow: hidden;
}

.class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.class-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.class-card:hover::before {
    transform: scaleX(1);
}

.class-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.class-card-header i {
    font-size: 2.5rem;
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.class-card-header h4 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.class-card-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-weight: 500;
}

.schedule-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.schedule-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-light);
}

.cast-count {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
}

/* スケジュールヘッダー */
.schedule-header {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin: 2rem auto;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.schedule-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    transition: var(--transition);
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid transparent;
}

.back-link:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
    transform: translateX(-5px);
}

.schedule-header h1 {
    margin: 0 0 1rem 0;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.schedule-header p {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
}

/* スケジュールコンテナ */
#schedule-tables {
    margin: 0 auto 2rem;
}

.schedule-day {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    position: relative;
}

.schedule-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.schedule-day h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem 2rem;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.schedule-day h2 i {
    font-size: 1.4rem;
}

/* スケジュールテーブルスタイル */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.schedule-table th {
    background: rgba(102, 126, 234, 0.12);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1.5rem 2rem;
    text-align: left;
    border-bottom: 2px solid rgba(102, 126, 234, 0.28);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.schedule-table td {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    vertical-align: middle;
}

.schedule-table tbody tr:nth-child(odd) { background-color: rgba(0, 0, 0, 0.018); }
.schedule-table tr:hover { background-color: rgba(0, 0, 0, 0.04); }

.time-cell {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-small);
    padding: 0.5rem;
    min-width: 80px;
}

.title-cell {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-small);
}

.cast-count-cell {
    text-align: center;
    width: 150px;
    background: rgba(102, 126, 234, 0.03);
    border-radius: var(--border-radius-small);
    padding: 0.5rem;
}

.cast-number {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.staff-number {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.cast-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
    box-shadow: var(--shadow-light);
    width: 100%;
    text-align: center;
}

.cast-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--bg-white);
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.7) translateY(-50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal entrance animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalBackdropFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

/* Modal exit animation */
@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
}

@keyframes modalBackdropFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

/* Enhanced modal content animations */
.modal-content h2 {
    margin: 0 0 2rem 0;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    animation: slideInDown 0.4s ease 0.2s both;
}

.cast-section, .staff-section {
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.4s ease 0.3s both;
}

.cast-section h3, .staff-section h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.cast-section h3 i, .staff-section h3 i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.cast-section ul, .staff-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.cast-section li, .staff-section li {
    padding: 1rem 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    animation: slideInLeft 0.3s ease both;
}

.cast-section li:nth-child(1) { animation-delay: 0.4s; }
.cast-section li:nth-child(2) { animation-delay: 0.5s; }
.cast-section li:nth-child(3) { animation-delay: 0.6s; }
.cast-section li:nth-child(4) { animation-delay: 0.7s; }
.cast-section li:nth-child(5) { animation-delay: 0.8s; }
.cast-section li:nth-child(6) { animation-delay: 0.9s; }
.cast-section li:nth-child(7) { animation-delay: 1.0s; }
.cast-section li:nth-child(8) { animation-delay: 1.1s; }

.staff-section li:nth-child(1) { animation-delay: 0.4s; }
.staff-section li:nth-child(2) { animation-delay: 0.5s; }
.staff-section li:nth-child(3) { animation-delay: 0.6s; }

.cast-section li:hover, .staff-section li:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.cast-section li i, .staff-section li i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Additional animation keyframes */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Add the missing fadeInUp keyframe for modal animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close button styles */
.close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.75rem;
    border-radius: 50%;
    transition: var(--transition);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.close:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    transform: scale(1.1);
}

.close i {
    pointer-events: none;
}

/* 区切り線 */
.section-divider {
    margin: 3rem auto;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.6;
}

/* 公演情報セクション */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
}

.info-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 1.5rem;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.info-card h4 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.info-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

/* フッター */
.footer {
    background: var(--bg-white);
    padding: 2rem;
    text-align: center;
    margin: 2rem auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.footer-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* エラーメッセージ */
.error-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #fed7d7;
    color: #c53030;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-medium);
    z-index: 3000;
    max-width: 400px;
    border-left: 4px solid #c53030;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.error-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-content i {
    font-size: 1.2rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .header {
        padding: 1rem;
        backdrop-filter: blur(15px);
    }
    
    .main {
        padding-top: 100px;
    }
    
    .header h1 {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }
    
    .menu-toggle {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
    }
    
    .hero {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .schedule-header {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .schedule-header h1 {
        font-size: 2rem;
    }
    
    .schedule-header p {
        font-size: 1.1rem;
    }
    
    #schedule-tables {
        margin: 0 1rem 1rem;
    }
    
    .schedule-day h2 {
        padding: 1rem 1.5rem;
        font-size: 1.3rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .time-cell {
        width: 100px;
    }
    
    .cast-count-cell {
        width: 120px;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .info-section {
        margin: 1rem;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .error-message {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .schedule-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .class-card-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Responsive improvements */
@media (max-width: 600px) {
  .header h1 { 
    font-size: 1.25rem; 
    letter-spacing: 0.5px;
  }
  .menu-toggle { 
    font-size: 1.2rem; 
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
  }
  .main { padding-top: 100px; padding-left: 12px; padding-right: 12px; }

  .classes-grid { grid-template-columns: 1fr; gap: 12px; }
  .class-card { padding: 12px; }
  .class-card .class-card-header h4 { font-size: 1.05rem; }
  .class-card .class-card-content p { font-size: 0.95rem; }
  .schedule-info { gap: 8px; }

  .schedule-header h1 { font-size: 1.25rem; }
  .schedule-header p { font-size: 0.95rem; }

  .schedule-table { font-size: 0.95rem; }
  .schedule-table th, .schedule-table td { padding: 10px 8px; }

  .info-section { grid-template-columns: 1fr; gap: 12px; }
  .info-card { padding: 12px; }

  .modal .modal-content { width: calc(100% - 24px); margin: 12px; padding: 12px; }
}

/* Keep countdown in single row */
.countdown-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 0 8px;
  width: 100%;
}

.countdown-item {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 1rem 0.5rem;
}

.countdown-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: #1e40af;
  line-height: 1;
  margin-bottom: 4px;
}

.countdown-label {
  display: block;
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .countdown-section { gap: 10px; }
  .countdown-item { padding: 0.75rem 0.25rem; }
  .countdown-number { font-size: 2rem; }
  .countdown-label { font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .countdown-section { gap: 8px; }
  .countdown-item { padding: 0.5rem 0.25rem; }
  .countdown-number { font-size: 1.8rem; }
  .countdown-label { font-size: 0.8rem; }
}

@media (max-width: 360px) {
  .countdown-section { gap: 6px; }
  .countdown-item { padding: 0.5rem 0.125rem; }
  .countdown-number { font-size: 1.6rem; }
  .countdown-label { font-size: 0.75rem; }
}

/* Remove horizontal scroll for tables */
.schedule-day { overflow-x: visible; }
.schedule-day > .schedule-table { 
  min-width: auto; 
  width: 100%;
  table-layout: fixed;
}

.schedule-table th:nth-child(1) { width: 20%; }
.schedule-table th:nth-child(2) { width: 25%; }
.schedule-table th:nth-child(3) { width: 25%; }
.schedule-table th:nth-child(4) { width: 30%; }

/* Card animation effects */
.class-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.class-card:nth-child(1) { animation-delay: 0.1s; }
.class-card:nth-child(2) { animation-delay: 0.2s; }
.class-card:nth-child(3) { animation-delay: 0.3s; }
.class-card:nth-child(4) { animation-delay: 0.4s; }
.class-card:nth-child(5) { animation-delay: 0.5s; }
.class-card:nth-child(6) { animation-delay: 0.6s; }
.class-card:nth-child(7) { animation-delay: 0.7s; }
.class-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Improve tap targets */
.cast-btn { padding: 10px 14px; font-size: 0.95rem; }
.close, .menu-toggle, .close-sidebar { min-width: 44px; min-height: 44px; }

/* Enhanced readability */
.schedule-table td { 
  word-break: break-word; 
  vertical-align: top;
}

.cast-count-cell {
  text-align: center;
  white-space: nowrap;
}

.title-cell {
  font-weight: 500;
}

.time-cell {
  font-weight: 600;
  color: var(--primary-color);
}

/* Better spacing for mobile */
@media (max-width: 600px) {
  .schedule-table th, .schedule-table td { 
    padding: 8px 4px; 
    font-size: 0.9rem;
  }
  
  .time-cell {
    padding: 6px 4px;
    font-size: 1rem;
    min-width: 60px;
  }
  
  .title-cell {
    padding: 6px 4px;
    font-size: 0.95rem;
  }
  
  .cast-count-cell {
    padding: 6px 4px;
  }
  
  .cast-btn { 
    padding: 8px 12px; 
    font-size: 0.85rem;
    white-space: nowrap;
  }
  
  .schedule-day h2 { 
    font-size: 1.1rem; 
    margin-bottom: 12px;
  }
}

/* Section entrance animations */
@keyframes fadeInSoft {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero,
.schedule-header,
.info-card {
    opacity: 0;
    animation: fadeInSoft 0.6s ease forwards;
}

/* Stagger info cards for subtle rhythm */
.info-section .info-card:nth-child(1) { animation-delay: 0.08s; }
.info-section .info-card:nth-child(2) { animation-delay: 0.16s; }
.info-section .info-card:nth-child(3) { animation-delay: 0.24s; }
.info-section .info-card:nth-child(4) { animation-delay: 0.32s; }

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero, .schedule-header, .info-card { animation: none; opacity: 1; }
}
