/* 
=========================================================
  人生の中の無限の宝箱 (Infinite Treasure Box) Styles
========================================================= 
*/

/* -------------------------------------
   1. Page Hero / Header
------------------------------------- */
.treasure-header {
    margin-bottom: 4rem;
    padding: 6rem 3rem;
    text-align: center;
    position: relative;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(82, 0, 114, 0.9) 0%, rgba(20, 0, 50, 0.95) 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    color: #ffffff;
    /* Optional: a faint glowing border */
    border: 1px solid rgba(255, 215, 0, 0.2);
}

#hero-stars-canvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* =========================================================
   Magic Highlight Effect
========================================================= */
.magic-highlight {
    background: linear-gradient(120deg, rgba(251, 191, 36, 0.4) 0%, rgba(251, 191, 36, 0.4) 100%);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    background-position: 0% 100%;
    transition: background-size 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-weight: 700;
    color: inherit;
    border-radius: 4px;
    padding: 0 0.2rem;
}

.magic-highlight.active {
    background-size: 100% 100%;
    animation: textBrighten 1.2s forwards;
}

@keyframes textBrighten {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.2); text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
    100% { filter: brightness(1); }
}

/* ヒーロー内の背景の輝きエフェクト */
.treasure-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 120%, rgba(255, 215, 0, 0.3) 0%, transparent 60%);
    pointer-events: none;
}

.treasure-header-content {
    position: relative;
    z-index: 2;
}

.subtitle-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(4px);
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    letter-spacing: -0.02em;
}

.intro-lead {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* -------------------------------------
   2. Typography & Box Elements
------------------------------------- */

/* 引用風のデザイン（自問自答など） */
.quote-style-box {
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--surface-color, #ffffff);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    max-width: 80%;
}

.quote-style-box::before,
.quote-style-box::after {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color-light, #e2e8f0);
    position: absolute;
    font-family: serif;
    opacity: 0.5;
}

.quote-style-box::before {
    top: -10px;
    left: 20px;
}

.quote-style-box::after {
    bottom: -40px;
    right: 20px;
}

.quote-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color, #333);
    line-height: 1.6;
    margin: 0 !important;
    position: relative;
    z-index: 2;
}

/* 小見出し（セクション内の分割用） */
.subsection-title {
    font-size: 1.3rem;
    color: #0f172a;
    margin: 3rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color, #3b82f6);
    line-height: 1.4;
}

/* =========================================================
   Glow Hover Effect for Specific Cards
========================================================= */
.glow-card {
    position: relative;
    overflow: hidden;
    cursor: default; /* Keep default if it's just text */
}

/* 擬似要素でマウス追従用のグラデーションレイヤーを作成 */
.glow-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Create a radial gradient at a customized CSS variable position */
    background: radial-gradient(
        800px circle at var(--x, 50%) var(--y, 50%),
        rgba(255, 255, 255, 0.4),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; /* Let clicks pass through */
    z-index: 1; /* Behind the text */
}

/* Lighter glow for the text-card as it is now light */
.text-card-dark.glow-card::before {
    background: radial-gradient(
        800px circle at var(--x, 50%) var(--y, 50%),
        rgba(255, 255, 255, 0.8),
        transparent 40%
    );
}

.glow-card:hover::before {
    opacity: 1;
}


/* セクションタイトル */
.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    color: var(--primary-color, #3b82f6);
    margin: 4rem 0 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color-light, #e2e8f0);
}

.title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-color, #3b82f6);
    color: white;
    border-radius: 12px;
    font-size: 1.2rem;
}


/* -------------------------------------
   3. Custom Sections / Highlights
------------------------------------- */

/* ハイライト枠（思考の転換など） */
.highlight-callout {
    display: flex;
    gap: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 0 16px 16px 0;
    margin: 3rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.highlight-callout .icon-circle {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.highlight-callout .text-content p {
    margin: 0;
    font-weight: 500;
    color: #334155;
}

.emphasis-text-center {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 3rem 0;
}


/* -------------------------------------
   4. The Treasure Keys (Cards Layout)
------------------------------------- */
.key-steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.key-step-card {
    background: var(--surface-color, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.key-step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

/* キラッとするエフェクト */
.key-step-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-20deg);
}
.key-step-card:hover::after {
    animation: shine 0.7s forwards;
}

@keyframes shine {
    100% { left: 200%; }
}

.step-header {
    margin-bottom: 1rem;
}

.step-icon {
    width: 50px; height: 50px;
    background: #f0fdf4; /* Light green tint */
    color: #16a34a;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Change icon colors individually if desired */
.key-step-card:nth-child(1) .step-icon { background: #eff6ff; color: #2563eb; }
.key-step-card:nth-child(2) .step-icon { background: #fdf4ff; color: #c026d3; }
.key-step-card:nth-child(3) .step-icon { background: #fffbeb; color: #d97706; }
.key-step-card:nth-child(4) .step-icon { background: #f0fdfa; color: #0d9488; }


.step-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--heading-color, #1e293b);
}

.step-body p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-color, #475569);
    line-height: 1.6;
}

.custom-check-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.custom-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.5rem;
}

.custom-check-list li i {
    color: #10b981; /* Green check */
    margin-top: 0.2rem;
}

.emphasis-text-box {
    background: rgba(255, 215, 0, 0.05); /* Very light gold */
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

/* -------------------------------------
   Flip Cards (Perspective Shift & 4 Keys)
------------------------------------- */
.flip-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    perspective: 1000px;
}

.perspective-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); /* slightly smaller for 3 items */
}

.flip-card-container {
    background-color: transparent;
    height: 250px; /* Fixed height for consistency */
    perspective: 1000px;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* slight bounce */
    transform-style: preserve-3d;
    cursor: pointer;
}

/* Flip on hover for desktop, tap on mobile might need just hover if it acts as focus */
.flip-card-container:hover .flip-card {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.flip-card-front {
    background: #fff;
    border: 1px solid #e2e8f0;
}

.flip-card-front p {
    font-size: 0.95rem !important;
    margin-bottom: 0 !important;
}

.flip-card-back {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, #8b5cf6));
    color: white;
    transform: rotateY(180deg);
}

/* Specific styling for Perspective Shift (Idea A) */
.bad-label {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}

.good-label {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Specific styling for 4 Keys (Idea B) */
.key-front .step-num {
    font-size: 0.9rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.flip-card .icon-large {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.bad-label .icon-large { color: #94a3b8; }
.good-label .icon-large { color: #fff; }

.flip-card-front h3, .flip-card-front h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.flip-card-back h4 {
    color: #fff;
    margin: 0 0 1rem 0 !important;
    font-size: 1.2rem;
}

.flip-card-back p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem !important;
    line-height: 1.5;
    margin: 0 !important;
}

/* Fix for check list inside flip card */
.flip-card-back .compact {
    text-align: left;
    margin-top: 0;
    padding-left: 0;
}
.flip-card-back .compact li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    list-style: none; /* remove bullet */
}
.flip-card-back .compact li i {
    color: #fde047; /* Yellow check on green bg */
    margin-top: 0.2rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Interactive list styling */
.interactive-list li {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.interactive-list li:hover {
    transform: translateX(4px);
    opacity: 0.9;
}
.interactive-list li.checked span {
    text-decoration: line-through;
    opacity: 0.6;
}
.interactive-list li.checked i {
    transform: scale(1.4) rotate(10deg);
    color: #fff;
}

/* -------------------------------------
   5. Kitchen Metaphor Section & Parallax
------------------------------------- */
.kitchen-metaphor {
    margin: 5rem 0;
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem;
    border-radius: 24px;
    background: linear-gradient(to bottom, #ffffff, #fdf8f6, #ffffff);
    z-index: 1;
}

.kitchen-parallax-bg {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    /* Subtle geometric Kitchen pattern or gradient */
    background-image: radial-gradient(circle at 2px 2px, rgba(148, 163, 184, 0.15) 2px, transparent 0);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
    transform: translateY(0);
    will-change: transform;
}

.kitchen-illustration {
    font-size: 5rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0.5;
}

.metaphor-box {
    background: #f8fafc; /* Very light slate */
    color: #334155; /* Dark gray text */
    padding: 3rem;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    position: relative;
    text-align: center;
    border: 1px solid #e2e8f0;
}
.metaphor-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 0 !important;
    font-weight: 500;
}
.kitchen-lead {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 3rem 0 2rem;
}

.important-note {
    border-left: 4px solid #ef4444; /* red indicator */
    padding-left: 1.5rem;
    margin: 3rem 0;
}
.important-note strong {
    color: #ef4444;
    font-size: 1.2rem;
}

/* -------------------------------------
   6. Dark Text Card / Banner
------------------------------------- */
.callout-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    margin: 3rem 0;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.callout-banner p { margin: 0 !important; color: white; }


.text-card-dark {
    background: #f0f9ff; /* Soft sky blue */
    color: #0f172a; /* Slate 900 text */
    padding: 2.5rem;
    border-radius: 16px;
    margin: 3rem 0;
    border-left: 4px solid #38bdf8;
    position: relative;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.05);
}
.text-card-dark p { margin: 0 !important; color: inherit; position: relative; z-index: 2; font-weight: 500;}


/* -------------------------------------
   7. Edison Story (Thematic Box & Notes)
------------------------------------- */
.shout-box {
    text-align: center;
    margin: 4rem 0;
}
.shout-box p {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 800;
    color: transparent;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    margin: 0 !important;
}

/* Container to hold both the animating notes and the actual card */
.edison-story-container {
    position: relative;
    margin: 4rem 0;
}

/* 失敗のメモ（紙くず）が舞う背景レイヤー */
.edison-notes-bg {
    position: absolute;
    top: -20%; left: -10%; right: -10%; bottom: -20%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.falling-note {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(217, 119, 6, 0.2); /* very faint orange/brown */
    transform-origin: center;
    animation: drift 15s linear infinite;
}

@keyframes drift {
    0% { transform: translateY(-50px) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh) translateX(var(--drift-x, 100px)) rotate(var(--drift-r, 360deg)); opacity: 0; }
}


.edison-story-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: #fffbeb; /* Light yellow background representing light */
    border: 1px solid #fde68a;
    padding: 3rem;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    z-index: 1; /* bring above notes */
}

@media (min-width: 768px) {
    .edison-story-card {
        flex-direction: row;
        align-items: center;
    }
}

.edison-icon {
    flex-shrink: 0;
    width: 100px; height: 100px;
    background: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
    color: #fbbf24;
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.4);
    /* Basic animation handled in JS, or CSS here */
    transition: all 0.3s ease;
}

.edison-content h3 {
    margin: 0 0 1rem 0;
    color: #b45309;
    font-size: 1.4rem;
}
.edison-content p {
    margin-bottom: 1rem;
    color: #78350f;
}
.edison-conclusion {
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 1px solid rgba(180, 83, 9, 0.2);
    padding-top: 1rem;
    margin-bottom: 0 !important;
}

.strong-encouragement {
    text-align: center;
    font-size: 1.3rem;
    line-height: 2;
    font-weight: 600;
    margin: 4rem 0;
}

.conclusion-manifesto {
    position: relative;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 20px;
    padding: 3rem;
    margin: 5rem 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(234, 179, 8, 0.1);
}

.conclusion-manifesto::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #fde047, transparent, #f59e0b, transparent);
    z-index: -1;
    border-radius: 22px;
    animation: goldBorder 6s linear infinite;
    background-size: 200% 200%;
}

@keyframes goldBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.manifesto-icon {
    font-size: 2.5rem;
    color: #eab308;
    margin-bottom: 1.5rem;
}

.conclusion-manifesto p {
    font-size: 1.2rem;
    line-height: 2;
    font-weight: 500;
    color: #713f12;
    margin-bottom: 1.5rem !important;
}
.conclusion-manifesto p:last-child {
    margin-bottom: 0 !important;
}


/* -------------------------------------
   8. The Final Treasure Reveal (Interactive)
------------------------------------- */
.treasure-reveal-box {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(to bottom, #ffffff 0%, #fef3c7 100%);
    border-radius: 24px;
    margin: 5rem 0 3rem;
    border: 2px solid #fde68a;
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.15);
    position: relative;
}

.treasure-reveal-box.interactive {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.treasure-reveal-box.interactive:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px rgba(251, 191, 36, 0.25);
    border-color: #fbbf24;
}

.box-visual {
    position: relative;
    display: inline-block;
    z-index: 10;
}

.treasure-icon-large {
    font-size: 4rem;
    color: #f59e0b;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 10px 10px rgba(245, 158, 11, 0.3));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.treasure-reveal-box.interactive:hover .treasure-icon-large {
    animation: clickMeBounce 1s infinite ease-in-out;
}

@keyframes clickMeBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); filter: drop-shadow(0 20px 20px rgba(245, 158, 11, 0.5));}
}

.treasure-reveal-box p {
    font-size: 1.8rem;
    font-weight: 800;
    color: #b45309;
    margin-bottom: 1rem !important;
    position: relative;
    z-index: 2;
}

.treasure-glow-wave {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: radial-gradient(circle, rgba(253,224,71,0.6) 0%, rgba(253,224,71,0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}
.treasure-glow-wave.burst {
    animation: waveBurst 1.2s ease-out forwards;
}
@keyframes waveBurst {
    0% { width: 0; height: 0; opacity: 1; }
    50% { opacity: 0.8; }
    100% { width: 1000px; height: 1000px; opacity: 0; }
}

.click-hint {
    display: block;
    font-size: 0.95rem;
    color: #92400e;
    opacity: 0.8;
    margin-bottom: 1rem;
    animation: pulseHint 2s infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hidden-treasure-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
}

.hidden-treasure-content.revealed {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed #fcd34d;
}

.hidden-treasure-content span {
    font-size: 1.1rem;
    color: #78350f;
    line-height: 1.8;
}

/* Magic Burst Particles for Treasure Box */
.magic-burst-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    animation: explode 1s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes explode {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* Energy Absorption Particles (Hover) */
.energy-absorb-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fef08a; /* Soft yellow/gold */
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 0 10px #fef08a, 0 0 20px #eab308;
    animation: absorb linear forwards;
}

@keyframes absorb {
    0% { transform: translate(var(--startX), var(--startY)) scale(0); opacity: 0; }
    20% { opacity: 0.8; transform: translate(calc(var(--startX)*0.8 + var(--endX)*0.2), calc(var(--startY)*0.8 + var(--endY)*0.2)) scale(1.5); }
    100% { transform: translate(var(--endX), var(--endY)) scale(0); opacity: 0.2; }
}

/* Text Burst Particles (Click) */
.burst-text-particle {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 900;
    pointer-events: none;
    z-index: 110;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(255,255,255,0.9), 0 0 20px var(--glowColor);
    animation: explodeText 1.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes explodeText {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.5) rotate(var(--rot)); opacity: 0; }
}


/* -------------------------------------
   9. Final Summary Points
------------------------------------- */
.final-summary {
    background: #f8fafc;
    padding: 3rem 0;
    border-radius: 24px;
    margin-top: 4rem;
}

.summary-points {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 3rem 0;
}

.point-item {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.point-icon {
    flex-shrink: 0;
    width: 40px; height: 40px;
    background: #1e293b;
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.point-text h4 {
    margin: 0 0 0.5rem 0;
    color: #0f172a;
    font-size: 1.2rem;
}
.point-text p {
    margin: 0 !important;
    font-size: 0.95rem;
}

.final-message {
    text-align: center;
    font-size: 1.2rem;
    line-height: 2;
    font-weight: 500;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px dashed #cbd5e1;
}

/* -------------------------------------
   Canvas Background (Fixed to body/wrapper)
------------------------------------- */
#treasure-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* クリックを邪魔しない */
    opacity: 0.3; /* Subtle effect */
}

/* =========================================================
   Magic Navigator Light (Glowing orb that follows scroll)
========================================================= */
.magic-nav-light {
    position: fixed;
    right: 20px; /* Base right position */
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #fde047 50%, rgba(253, 224, 71, 0) 100%);
    box-shadow: 0 0 20px 10px rgba(251, 191, 36, 0.4), 
                0 0 40px 20px rgba(251, 191, 36, 0.2);
    pointer-events: none;
    z-index: 99;
    /* Soft floating animation on top of JS translation */
    animation: navFloat 3s infinite ease-in-out;
    opacity: 0; /* Hidden initially, JS will fade it in */
    transition: opacity 0.5s ease, transform 0.1s linear; /* Smooth follow */
}

@keyframes navFloat {
    0%, 100% { right: 20px; }
    50% { right: 25px; } /* Tiny horizontal wobble */
}

/* ==========================================
   10. PREMIUM VIDEO THEATER (SUMMARY)
   ========================================== */

.video-theater-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 20px;
    background: #1a1a2e; /* dark purple-ish black */
    padding: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(234, 179, 8, 0.2);
}

.video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect */
    border-radius: 8px;
    overflow: hidden;
}

.video-frame video {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

.video-overlay, .video-replay-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 10; cursor: pointer; transition: all 0.4s ease;
}
.video-overlay { background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(2px); }
.video-replay-overlay { background: rgba(0, 0, 0, 0.7); opacity: 0; visibility: hidden; backdrop-filter: blur(5px); }

.video-theater-container.is-playing .video-overlay { opacity: 0; visibility: hidden; }
.video-theater-container.is-finished .video-replay-overlay { opacity: 1; visibility: visible; }

.play-circle {
    width: 80px; height: 80px; background: #ff0000; /* YouTube Red */
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.4); position: relative;
}
.play-circle i { color: white; font-size: 2.5rem; margin-left: 5px; }
.play-circle::after {
    content: ""; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px;
    border: 2px solid #ff0000; border-radius: 50%; animation: pulsePlay 2s infinite;
}
@keyframes pulsePlay { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }

.video-title-label {
    background: transparent;
    color: #fff;
    padding: 1rem 0.5rem 0.5rem 0.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    font-family: 'Kaisei Opti', serif;
    text-align: left;
    letter-spacing: 0.05em;
}

.video-theater-container.is-playing .video-title-label { opacity: 1; }

.play-text { color: white; margin-top: 1.5rem; font-weight: 700; letter-spacing: 0.2em; font-family: 'Outfit', serif; text-align: center; width: 100%; }
.play-trigger { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.replay-trigger { display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; font-weight: bold; letter-spacing: 0.2em; font-family: 'Outfit', sans-serif;}
.replay-trigger i { font-size: 3rem; color: #eab308; margin-bottom: 1rem; }

@media (max-width: 768px) {
    .movie-summary-section { padding: 2rem 1.5rem; }
    .play-circle { width: 60px; height: 60px; }
    .play-circle i { font-size: 1.5rem; }
}
