:root {
    --bg-color: #fdfdfd;
    --card-bg: rgba(0, 0, 0, 0.03);
    --card-hover-bg: rgba(0, 0, 0, 0.06);
    --border-color: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.4);
    --text-main: #050505;
    --text-muted: #666666;
    --accent: #050505;
    --transition-base: all 0.4s cubic-bezier(0.2, 0, 0, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: -2; /* 季節Canvasより奥 */
    overflow: hidden;
    pointer-events: none;
}

.background-decor {
    position: fixed;
    inset: 0;
    z-index: -1; /* コンテンツとGlowの間 */
    pointer-events: none;
}

.season-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

.noise {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.05;
    transition: transform 0.2s ease-out;
}

.glow-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--text-main) 0%, transparent 70%);
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--text-muted) 0%, transparent 70%);
}

.container {
    width: 100%;
    max-width: 1100px;
    padding: 4rem 2rem;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 5rem;
}

.logo-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border: 2px solid var(--text-main);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.logo-wrapper:hover {
    background: var(--text-main);
    transform: rotate(90deg);
}

.logo-wrapper .letter {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--text-main);
    transition: var(--transition-base);
}

.logo-wrapper:hover .letter {
    color: var(--bg-color);
    transform: rotate(-90deg);
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

header .subtitle {
    font-weight: 300;
    color: var(--text-muted);
}

header .tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.1em;
}

/* Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Menu Button */
.menu-button {
    display: flex;
    align-items: center;
    padding: 2.5rem;
    text-decoration: none;
    color: var(--text-main);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
}

.menu-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.02), transparent);
    transition: 0.5s;
}

.menu-button:hover::before {
    left: 100%;
}

.menu-button:hover {
    background: var(--card-hover-bg);
    border-color: var(--border-hover);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.02);
    margin-right: 1.5rem;
    color: var(--text-main);
    transition: var(--transition-base);
}

.menu-button:hover .icon-box {
    background: var(--text-main);
    color: var(--bg-color);
    transform: rotate(-10deg) scale(1.1);
}

.content {
    flex: 1;
}

.label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
}

.arrow {
    opacity: 0;
    color: var(--text-main);
    transform: translateX(-10px);
    transition: var(--transition-base);
}

.menu-button:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Footer */
footer {
    margin-top: 6rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Animations */
.animate-in {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.2, 0, 0, 1) forwards;
    animation-delay: var(--delay, 0s);
}

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

/* Cityscape Silhouette */
.cityscape {
    position: fixed;
    bottom: -2px;
    left: 0;
    width: 100vw;
    height: clamp(100px, 20vh, 180px);
    pointer-events: none;
    z-index: -1;
    color: rgba(0, 0, 0, 0.05); /* 明るいテーマ時 */
    transition: all 1s ease;
}

/* Seasonal Test Mode UI */
.season-test-mode {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.4rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    padding: 0.4rem;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.05);
}

.season-test-mode button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.season-test-mode button:hover {
    background: rgba(0,0,0,0.05);
}

.season-test-mode button.active {
    background: var(--text-main);
    color: var(--bg-color);
}

/* Dark Theme Overrides (For Fireworks, Fireflies, Snow) */
body.theme-dark {
    --bg-color: #0a0a0c;
    --text-main: #f0f0f5;
    --text-muted: #a0a0b0;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-hover-bg: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.4);
}

body.theme-dark .cityscape {
    color: #1a1a20;
}

body.theme-dark .noise {
    opacity: 0.08;
}

body.theme-dark .season-test-mode {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .menu-button:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.theme-dark .season-test-mode button:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.theme-dark .season-test-mode button.active {
    background: #fff;
    color: #000;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 3rem 1.5rem;
    }
    
    header {
        margin-bottom: 3rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-button {
        padding: 1.8rem;
    }
    
    .icon-box {
        width: 44px;
        height: 44px;
    }
}
