/* 基本樣式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #fdfdfd;
    font-family: 'LXGW WenKai TC', 'Noto Serif TC', serif; /* 更換為文楷體 */
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 啟動畫面 */
#startOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #2c2c2c 0%, #000 100%);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 1.5s ease;
}

#startOverlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.start-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #e0ac1c;
}

.start-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #ccc;
}

#btnStart {
    cursor: pointer;
    background: linear-gradient(45deg, #e0ac1c, #9d7c1a);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    border-radius: 50px;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(224, 172, 28, 0.4);
    transition: transform 0.3s ease;
}

#btnStart:hover {
    transform: scale(1.1);
}

/* 全域背景 */
.global-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Images/Pink%20Cute%20Happy%20Birthday%20Card%20(Presentation).png');
    background-size: cover;
    background-position: center;
    z-index: -10;
}

/* 隱藏元素 */
.hidden {
    display: none !important;
}

/* 開場照片區塊 */
#introSection {
    position: fixed;
    top: 10%;
    right: 10%;
    width: 45%;
    height: 75%; /* 對齊紅框區域 */
    z-index: 100; /* 照片在下層 */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease;
    pointer-events: none;
}

/* 移除了區塊內的背景，因為已使用 global-bg */
.intro-bg, .credits-bg {
    display: none;
}

.circle-frame {
    width: 70vh; 
    height: 70vh;
    border-radius: 50%;
    border: 12px solid #fff;
    box-shadow: 0 15px 45px rgba(0,0,0,0.4);
    overflow: hidden;
    animation: zoomIn 2s ease-out;
    background-color: #fff;
}

.circle-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* 片尾字幕區塊 */
#creditsSection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150; /* 字幕在上層 */
    overflow: hidden;
}

.credits-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Images/Pink%20Cute%20Happy%20Birthday%20Card%20(Presentation).png');
    background-size: cover;
    background-position: center;
    opacity: 1; /* 恢復亮度，直接使用原圖效果 */
    z-index: -1;
}

.credits-content {
    position: absolute;
    /* 定位在畫面右半邊，並向左偏移兩個字距 (約增加 5-6% 的 right) */
    top: 10%;
    right: 10%; /* 從 5% 改為 10% */
    bottom: 15%;
    width: 45%; 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.credits-roll {
    position: absolute;
    top: 100%;
    width: 100%;
    text-align: center;
    line-height: 1.6;
    /* 字體調整為 3rem */
    font-size: 3rem; 
    color: #432818; 
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.4);
}

.credits-roll h3 {
    font-size: 4.5rem;
    margin-bottom: 3.5rem;
    color: #99582a; 
    letter-spacing: 12px;
}

.credits-roll p {
    margin-bottom: 1.8rem;
    font-weight: 400;
}

/* 滾動動畫 */
@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.animate-scroll {
    /* 因為字體變大，路徑變長，時間要拉長才不會跑太快 */
    animation: scrollUp 90s linear forwards;
}

/* 音頻控制按鈕樣式 */
.audio-control-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1000;
    background: rgba(67, 40, 24, 0.7); /* 深褐色半透明 */
    color: #e0ac1c; /* 黃金配色 */
    border: 1px solid #e0ac1c;
    width: 60px;
    height: 60px;
    border-radius: 50%; /* 圓形按鈕 */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.audio-control-btn:hover {
    background: rgba(67, 40, 24, 0.9);
    transform: scale(1.05);
}
