/* Reset & Variables */
:root {
    --bg-color: #030305;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --accent-glow: #ff2a5f;
    --font-en: 'Outfit', sans-serif;
    --font-jp: 'Zen Maru Gothic', sans-serif;
}

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

body, html {
    width: 100%;
    height: 100%;
    /* overflow is handled by the scroll-container */
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(3, 3, 5, 0.4), rgba(3, 3, 5, 0.4)), url('assets/bg_beach.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: var(--font-en);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* WebGL Canvas */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    cursor: crosshair;
}

/* Scrollable UI Overlay */
.scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
    scroll-behavior: smooth;
    /* Hide scrollbar for cleaner look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Hero Section (First Screen) */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    pointer-events: none; /* Let clicks pass through to canvas where empty */
}

/* Enable pointer events on interactive elements within hero */
.hero-section > * {
    pointer-events: auto;
}

/* Navigation */
.modern-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--accent-glow);
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--text-primary);
}

/* Hero Content (Center) */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    mix-blend-mode: difference;
    pointer-events: none; /* Prevent blocking canvas clicks */
}

.glitch-title {
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0;
}

.subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.4em;
    font-weight: 300;
    color: var(--text-secondary);
}

.instruction {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    animation: pulse 2s infinite ease-in-out;
    pointer-events: auto; /* Allow clicking the instruction text */
    cursor: pointer;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    opacity: 0.7;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-secondary), transparent);
}

/* Controls Hint */
.controls-hint {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    text-align: right;
}

/* Info Section (Second Screen onwards) */
.info-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 10rem 2rem 5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.info-content {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Glassmorphism Cards */
.glass-panel {
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 42, 95, 0.3);
}

.card-num {
    font-size: 0.9rem;
    color: var(--accent-glow);
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.card-desc {
    font-family: var(--font-jp);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.card-price {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* CTA Container */
.cta-container {
    text-align: center;
    padding: 5rem 0;
}

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-desc {
    font-family: var(--font-jp);
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    font-family: var(--font-jp);
    transition: background 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent-glow);
    color: var(--text-primary);
    transform: scale(1.05);
}

/* Footer */
.minimal-footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    color: var(--text-secondary);
    font-family: var(--font-jp);
    font-size: 0.8rem;
    line-height: 2;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s cubic-bezier(0.76, 0, 0.24, 1);
}

.loading-content {
    text-align: center;
    width: 300px;
}

.loading-title {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    font-weight: 400;
    margin-bottom: 2rem;
}

.loading-progress {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--text-primary);
    transition: width 0.1s ease;
}

.loading-percent {
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

/* When loaded, hide overlay */
.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ==========================================
   最新メニュー＆お楽しみ抽選カード スタイル
   ========================================== */

/* メニュー表示 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
    width: 100%;
}

.menu-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-4px);
    border-color: rgba(244, 132, 95, 0.5);
}

.menu-badge {
    position: absolute;
    top: -12px;
    right: 16px;
    background: linear-gradient(135deg, #f4845f, #e8475f);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    box-shadow: 0 4px 12px rgba(232, 71, 95, 0.4);
}

.badge-popular {
    background: linear-gradient(135deg, #f4d35e, #ee9b00);
    color: #0a1628;
}

.menu-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.menu-detail {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
    line-height: 1.5;
}

.menu-price {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 900;
    color: #f4d35e;
}

.tax-in {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.menu-price-sizes {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.menu-price-sub {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.menu-price-sub strong {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: #f4d35e;
}

/* 賞品リスト */
.prizes-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    width: 100%;
}

.prize-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.3s ease;
}

.prize-card:hover {
    transform: translateX(6px);
}

.prize-rank {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    padding: 8px 16px;
    border-radius: 12px;
    color: #fff;
    min-width: 65px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.prize-1st .prize-rank {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

.prize-2nd .prize-rank {
    background: linear-gradient(135deg, #e0e0e0, #9e9e9e);
    color: #000;
}

.prize-3rd .prize-rank {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
}

.prize-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.prize-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* インタラクティブ抽選カード */
.interactive-card {
    background: linear-gradient(135deg, rgba(232, 71, 95, 0.15), rgba(244, 211, 94, 0.15));
    border: 1px solid rgba(244, 211, 94, 0.4);
}

.lottery-sim-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 24px;
    width: 100%;
}

.btn-lottery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 36px;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 900;
    color: #0a1628;
    background: linear-gradient(135deg, #f4d35e, #f4845f);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(244, 132, 95, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-lottery:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 40px rgba(244, 132, 95, 0.6);
}

.btn-lottery:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 1.3rem;
}

.lottery-result {
    margin-top: 24px;
    padding: 24px;
    width: 100%;
    border-radius: 20px;
    background: rgba(10, 22, 40, 0.9);
    border: 2px solid #f4d35e;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lottery-result.hidden {
    display: none;
}

.result-badge {
    display: inline-block;
    padding: 6px 24px;
    font-size: 1.2rem;
    font-weight: 900;
    border-radius: 100px;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: #000;
    margin-bottom: 12px;
}

.result-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
}

.result-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

@keyframes popIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 600px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
    .prize-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .prize-rank {
        align-self: flex-start;
    }
}
