@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Noto+Serif+TC:wght@700;900&family=JetBrains+Mono:wght@400;700&display=swap');

/* 全域重設 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #070B19;
    font-family: 'Noto Sans TC', sans-serif;
    color: #F8FAFC;
    user-select: none;
}

/* 1. 開場點擊播放遮罩 */
#startScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0B132B 0%, #070B19 100%);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out;
}

.start-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(0, 242, 254, 0.15);
    border: 1px fill rgba(0, 242, 254, 0.3);
    border-radius: 50px;
    color: #00F2FE;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.start-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: #FFFFFF;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

.start-subtitle {
    font-size: 1.1rem;
    color: #94A3B8;
    margin-bottom: 2.5rem;
}

#playBtn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #070B19;
    background: linear-gradient(135deg, #00F2FE 0%, #4FACFE 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
    transition: all 0.3s ease;
}

#playBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 242, 254, 0.6);
}

#playBtn:disabled {
    background: #475569;
    color: #94A3B8;
    box-shadow: none;
    cursor: not-allowed;
}

/* 2. 影片播放主容器 */
#videoContainer {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0B132B 0%, #070B19 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background 1s ease-in-out;
}

/* 左上角章節標示 */
#chapterNum {
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 0.9rem;
    color: #64748B;
    letter-spacing: 2px;
    font-weight: 500;
    z-index: 10;
}

.chapter-badge {
    color: #00F2FE;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* 影片內容場景區 */
#deckContainer {
    position: relative;
    width: 100%;
    height: 100%;
}

.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.scene.active {
    opacity: 1;
    visibility: visible;
}

.scene-content {
    max-width: 1100px;
    width: 100%;
    position: relative;
}

.flex-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 標題場景樣式 */
.glow-brain-container {
    margin-bottom: 2rem;
}

.glow-chip {
    filter: drop-shadow(0 0 20px rgba(0, 242, 254, 0.6));
    animation: floating 4s ease-in-out infinite;
}

.pulse-line {
    animation: chipPulse 2.5s ease-in-out infinite;
}

.core-glow {
    animation: corePulse 1.5s ease-in-out infinite;
}

.title-group {
    margin-top: 1rem;
}

.section-tag {
    font-size: 0.9rem;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: 3px;
    margin-bottom: 0.8rem;
    display: block;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.hero-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.3;
    color: #FFFFFF;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.subtitle-highlight {
    background: linear-gradient(90deg, #00F2FE 0%, #4FACFE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.8rem;
}

/* 共用場景標題 */
.scene-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.4rem;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.scene-subtitle {
    font-size: 1.1rem;
    color: #94A3B8;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* 雙欄版面配置 */
.split-layout {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 3rem;
    margin-top: 1.5rem;
}

.split-layout.align-center {
    align-items: center;
}

.left-box {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.right-box {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
}

/* 機械人動畫 */
.bot-svg {
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.4));
    animation: floating 3.5s ease-in-out infinite;
}

.eye-glow {
    animation: eyeBlink 4s infinite;
}

/* 特徵卡片 */
.feature-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, border 0.3s ease;
}

.feature-card:hover {
    transform: translateX(5px);
    border: 1px solid rgba(0, 242, 254, 0.3);
}

.card-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(79, 172, 254, 0.1) 100%);
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.card-desc h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.3rem;
}

.card-desc p {
    font-size: 0.9rem;
    color: #94A3B8;
}

/* Scene 3: 一條龍流程時間軸 */
.timeline-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    gap: 1rem;
}

.flow-step {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    flex: 1;
    min-width: 140px;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.flow-step:hover, .flow-step.highlight {
    border: 1px stroke rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
    transform: translateY(-5px);
}

.flow-step.highlight .step-num {
    background: #FFD700;
    color: #070B19;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.step-num {
    width: 32px;
    height: 32px;
    background: #00F2FE;
    color: #070B19;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    margin: 0 auto 0.8rem auto;
}

.step-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
}

.flow-arrow {
    font-size: 1.5rem;
    color: #475569;
}

.comparison-box {
    background: rgba(255, 215, 0, 0.08);
    border: 1px dashed rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    color: #FFD700;
    font-weight: 700;
    font-size: 1.1rem;
    max-width: 400px;
    margin: 2rem auto 0 auto;
}

/* Scene 4: 餐廳與主廚 */
.half-box {
    flex: 1;
}

.vs-divider {
    font-size: 1.5rem;
    font-weight: 900;
    color: #475569;
    background: #0F172A;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.8rem;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.concept-box {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.concept-box:hover {
    transform: translateY(-5px);
}

.concept-box.blue-border {
    border: 1px solid rgba(0, 242, 254, 0.25);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.05);
}

.concept-box.gold-border {
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.05);
}

.box-emoji {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    display: block;
}

.concept-box.blue-border .box-emoji {
    color: #00F2FE;
}

.concept-box.gold-border .box-emoji {
    color: #FFD700;
}

.concept-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #94A3B8;
}

/* Scene 5: 四格網格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.grid-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.grid-card:hover {
    border: 1px solid rgba(0, 242, 254, 0.3);
    background: rgba(15, 23, 42, 0.7);
    transform: scale(1.02);
}

.grid-icon {
    font-size: 2rem;
}

.grid-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
}

.input-demand {
    text-align: center;
    font-size: 1.2rem;
    color: #E2E8F0;
    margin-top: 2rem;
}

.input-demand strong {
    color: #00F2FE;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

/* Scene 6: 總結 */
.outro-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 24px;
    padding: 3rem;
    max-width: 700px;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.gold-badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 50px;
    color: #FFD700;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.conclusion-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.6rem;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.decor-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #00F2FE 0%, #FFD700 100%);
    margin: 1rem auto 2rem auto;
    border-radius: 20px;
}

.assistant-props {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.prop-badge {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
}

.outro-desc {
    font-size: 1.2rem;
    font-weight: 500;
    color: #E2E8F0;
}

/* 3. 動畫類定義 (GSAP / CSS anim) */
.anim {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes startFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes chipPulse {
    0% { stroke: #00F2FE; stroke-width: 4px; filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.4)); }
    50% { stroke: #4FACFE; stroke-width: 5px; filter: drop-shadow(0 0 15px rgba(79, 172, 254, 0.8)); }
    100% { stroke: #00F2FE; stroke-width: 4px; filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.4)); }
}

@keyframes corePulse {
    0% { transform: scale(1); opacity: 0.8; fill: #FFD700; }
    50% { transform: scale(1.2); opacity: 1; fill: #FFA500; filter: drop-shadow(0 0 8px #FFA500); }
    100% { transform: scale(1); opacity: 0.8; fill: #FFD700; }
}

@keyframes eyeBlink {
    0%, 95%, 100% { transform: scaleY(1); }
    97.5% { transform: scaleY(0.1); }
}

/* 4. 電影過渡遮罩 & Subtitles */
#transitionMask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #070B19;
    opacity: 0;
    visibility: hidden;
    z-index: 5;
    transition: opacity 0.25s ease-in-out, visibility 0.25s;
}

#transitionMask.active {
    opacity: 1;
    visibility: visible;
}

#subtitleContainer {
    display: none;
    position: absolute;
    bottom: 50px;
    width: 100%;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 0 2rem;
}

#subtitleText {
    font-size: 1.3rem;
    font-weight: 500;
    color: #F8FAFC;
    background: rgba(15, 23, 42, 0.7);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    max-width: 800px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#subtitleText.show {
    opacity: 1;
    transform: translateY(0);
}

/* 進度條 */
#progressBar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    width: 0%;
    background: linear-gradient(90deg, #00F2FE 0%, #4FACFE 50%, #FFD700 100%);
    box-shadow: 0 -2px 10px rgba(0, 242, 254, 0.5);
    z-index: 10;
    transition: width 0.1s linear;
}
