@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Epilogue:wght@400;600;700&family=Geist:wght@400;500&display=swap');

/* 全域背景設定 */
.fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuDoGyFieMSPFtx5b-xcEgGQ0vHzHJGk6z0f4Y9EQSI2938gQ35lkqza0ye0tk3Rw6Etuifjq_2KyEQG0E65jwBUSTJUpyQ7WhvZcplExAyMj3TbA5SVW1aaoh_9EmmR-Dsj_x_VlfsPfgzPcvyFzSV7sRIwFWTtLNcNAHUHzXHlBq6wUgJiC0t2ahSkRvanrBDs0y8AZ51CREYgrS-7bAJfxCinLaG2jmU91TZF20osWHjjAbfA3lgBJitQgsVbyoecdH0SnmgaBys');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 20, 36, 0.85), rgba(11, 19, 38, 0.98));
    z-index: -1;
}

/* main 頁面的高級魔幻毛玻璃面板 */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* main 頁面的角色卡片懸停動畫 */
.character-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.character-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* main 頁面的色彩發光特效 */
.glow-primary { box-shadow: 0 0 15px rgba(168, 85, 247, 0.2); }
.glow-secondary { box-shadow: 0 0 15px rgba(6, 182, 212, 0.2); }
.glow-tertiary { box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }

/* result 頁面的大劇本發光與側邊欄指示線 */
.script-glow {
    box-shadow: 0 0 40px rgba(183, 109, 255, 0.1);
}
.character-indicator {
    width: 4px;
    height: 100%;
    border-radius: 2px;
    position: absolute;
    left: 0;
}

/* 經典的幻彩漸層按鈕 */
.enchanted-gradient {
    background: linear-gradient(135deg, #A855F7 0%, #7C3AED 50%, #06b6d4 100%);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
}

/* 呼吸動畫 */
.pulse-soft {
    animation: pulse 4s infinite ease-in-out;
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.sparkle {
    position: absolute;
    pointer-events: none;
    opacity: 0.6;
    animation: twinkle 3s infinite ease-in-out;
}
@keyframes twinkle {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 0.9; }
}

/* result 頁面專用的舒適劇本滾動軸 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.2);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.4);
}
/* 追加於 style.css 底部 */

/* 封面的標題漸層動畫 */
.animate-text-shimmer {
    background-size: 200% auto;
    animation: textShimmer 4s linear infinite;
}
@keyframes textShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* 契合劇本編織的漂浮粒子 */
.floating-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(6, 182, 212, 0) 70%);
    filter: blur(40px);
    animation: floatAround 12s infinite ease-in-out;
    pointer-events: none;
}
.orb-2 {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(245, 158, 11, 0) 70%);
    animation-delay: -4s;
    animation-duration: 16s;
}

@keyframes floatAround {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 40px) scale(0.9); }
}

/* 頁面流暢切換過場 */
.page-transition {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}