/* --- 1. 全域與定位佈局 --- */
* {
    box-sizing: border-box;
    margin: 0; padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Noto Sans TC', sans-serif;
    overflow-x: hidden;
    overflow-y: auto; 
}

/* 背景地圖：全裝置垂直與水平置中 */
.world-map {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 1280px; /* PC 版 1280px */
    height: auto;
    aspect-ratio: auto;
    min-height: 800px;
    z-index: -1;
    background-image: url('../assets/world-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* 雙倍強化羽化強度 */
    -webkit-mask-image: radial-gradient(circle, black 20%, transparent 65%);
    mask-image: radial-gradient(circle, black 20%, transparent 65%);
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

/* --- 2. 核心舞台：由 Flexbox 掌控按鈕與圖片間距 --- */
.main-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px; /* 您要求的 30px 間距，最穩固的寫法 */
    position: relative;
    z-index: 10;
}

.card-wrapper {
    position: relative;
    width: 520px; /* PC 版代禱卡 520px */
    z-index: 5;
    opacity: 0;
}

.card {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    perspective: 2000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateY(180deg);
    opacity: 0;
}

.card-front, .card-back {
    position: absolute;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    border-radius: 4px;
    overflow: hidden;
}

.card-front { transform: rotateY(0deg); background: #000; }
.card-front img { width: 100%; height: 100%; object-fit: contain; display: block; }

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #0d1b1e 0%, #1a3a3a 100%);
    display: flex; align-items: center; justify-content: center; text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.title-zh { font-family: 'Noto Serif TC', serif; font-size: 2.5rem; color: #FFB300; margin-bottom: 12px; letter-spacing: 10px; }
.title-en { font-size: 1rem; color: #C0C0C0; text-transform: uppercase; letter-spacing: 3px; }

/* 導航按鈕：PC 版不再使用 Absolute */
.nav-btn {
    width: 55px; height: 55px;
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff; border-radius: 50%; font-size: 1rem; cursor: pointer;
    z-index: 100;
    opacity: 0; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.1); }

/* 下方區域 */
.bottom-controls {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    position: relative;
    opacity: 0;
}

.bottom-btn {
    padding: 12px 28px;
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px);
}
.footer-right { position: absolute; right: 0; }

/* 隱形觸控區 */
.touch-zone { position: absolute; top: 0; width: 30%; height: 100%; z-index: 5; }
.left-zone { left: 0; }
.right-zone { right: 0; }

/* --- 4. 手機版適應 --- */
@media (max-width: 768px) {
    body { overflow: hidden; }
    .main-stage { gap: 0; }
    .pc-only { display: none; }
    .card-wrapper { width: calc(100vw - 40px); }
    .bottom-controls { max-width: calc(100vw - 40px); margin-top: 30px; }
    .world-map { width: 100vw; } 
}

/* --- 5. 動態進場 --- */
.animate-in-card { animation: zoomIn 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
@keyframes zoomIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; background: rgba(0,0,0,0.95); display: none; align-items: center; justify-content: center; }
.video-container { width: 90%; max-width: 800px; position: relative; padding-bottom: 56.25%; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.close-modal { position: absolute; top: -50px; right: 0; color: #fff; font-size: 40px; cursor: pointer; }
