/* =================
   基礎設定
   ================= */
:root {
    --bg-opacity: 1;
    --cyan: #00ffff;
    --cyan-rgb: 0, 255, 255;
    --dark-bg: rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: url("image/bg.jpg") fixed 50% !important;
}

*, :before, :after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    border: 0;
}

h4 {
    font-size: 1.2rem;
    font-weight: bold;
}

li {
    line-height: 1.7;
}

/* 顏色工具類 */
.c1 { color: #e6663e; }
.c2 { color: #00a75b; }
.c3 { color: #65679d; }

/* =================
   導航欄
   ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-scrolled {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.navbar .nav-link {
    color: var(--cyan);
    font-weight: 700;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.5);
    position: relative;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.8);
    transform: translateY(-2px);
}

.navbar .nav-link:hover::after {
    width: 100%;
}

.navbar-brand img {
    height: 30px;
    width: auto;
}

/* 漢堡選單 */
.navbar-toggler {
    border: 2px solid rgba(var(--cyan-rgb), 0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.navbar-toggler:hover,
.navbar-toggler:focus {
    border-color: var(--cyan);
    background: rgba(var(--cyan-rgb), 0.1);
    box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.3);
    outline: none;
}

.navbar-toggler-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: inline-block;
    background-image: none !important;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler .middle-line {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), #0099ff);
    border-radius: 2px;
    transition: var(--transition);
    box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.5);
}

.navbar-toggler-icon::before { top: 0; }
.navbar-toggler-icon::after { bottom: 0; }
.navbar-toggler .middle-line {
    top: 50%;
    transform: translateY(-50%);
}

/* X 動畫 */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg) translate(6px, 6px);
}
.navbar-toggler[aria-expanded="true"] .middle-line {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =================
   Landing 區
   ================= */
.title-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 100vw;
    padding: 0 20px;
    text-align: center;
    z-index: 2;
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
    will-change: opacity, transform;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: -300px !important;
    padding: 16px 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--cyan);
    border-radius: 50px;
    color: var(--cyan);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.5);
    box-shadow: 0 0 30px rgba(var(--cyan-rgb), 0.3),
                inset 0 0 20px rgba(var(--cyan-rgb), 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 50px rgba(var(--cyan-rgb), 0.8),
                inset 0 0 30px rgba(var(--cyan-rgb), 0.3);
    border-color: #ffffff;
    background: rgba(var(--cyan-rgb), 0.2);
    color: #ffffff;
}

.cta-button:active {
    transform: translateY(-1px) scale(1.02);
}

.cta-text {
    position: relative;
    z-index: 1;
    letter-spacing: 0.1em;
}

.cta-icon {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* =================
   內容區塊
   ================= */
.scroll-content {
    position: relative;
    z-index: 3;
    margin-top: 100vh;
}

.scroll-content > section {
    position: relative;
    width: 100%;
}

/* =================
   Carnival 區塊
   ================= */
#carnival {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-left: auto;
    margin-right: auto;
    max-width: 100em;
    padding-top: 100px;
}

#gem-animation-container {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    width: 30% !important;
    height: 100vh !important;
    background: transparent !important;
}

#gem-animation-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#carnival-content {
    padding: 50px;
    width: 70%;
    position: relative;
    z-index: 2;
}

/* 科技邊框 */
.corner-frame {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    width: 60px;
    height: 60px;
}

.corner-frame::before,
.corner-frame::after,
.corner-frame .outer::before,
.corner-frame .outer::after {
    content: '';
    position: absolute;
    background: var(--cyan);
    box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.8);
}

/* 四個角的位置 */
.top-left { top: 20%; left: 10%; }
.top-right { top: 20%; right: 10%; }
.bottom-left { bottom: 20%; left: 10%; }
.bottom-right { bottom: 20%; right: 10%; }

/* 上左 */
.top-left::before { 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 4px; 
    animation: fadeIn 0.8s ease-out 0s infinite;
}
.top-left::after { 
    top: 0; 
    left: 0; 
    width: 4px; 
    height: 100%; 
    animation: fadeIn 0.8s ease-out 0s infinite;
}
.top-left .outer { 
    position: absolute; 
    top: -15px; 
    left: -15px; 
    width: 90px; 
    height: 90px; 
}
.top-left .outer::before { 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 4px; 
    animation: fadeIn 0.8s ease-out 0.5s infinite;
}
.top-left .outer::after { 
    top: 0; 
    left: 0; 
    width: 4px; 
    height: 100%; 
    animation: fadeIn 0.8s ease-out 0.5s infinite;
}

/* 上右 */
.top-right::before { 
    top: 0; 
    right: 0; 
    width: 100%; 
    height: 4px; 
    animation: fadeIn 0.8s ease-out 3s infinite;
}
.top-right::after { 
    top: 0; 
    right: 0; 
    width: 4px; 
    height: 100%; 
    animation: fadeIn 0.8s ease-out 3s infinite;
}
.top-right .outer { 
    position: absolute; 
    top: -15px; 
    right: -15px; 
    width: 90px; 
    height: 90px; 
}
.top-right .outer::before { 
    top: 0; 
    right: 0; 
    width: 100%; 
    height: 4px; 
    animation: fadeIn 0.8s ease-out 3.5s infinite;
}
.top-right .outer::after { 
    top: 0; 
    right: 0; 
    width: 4px; 
    height: 100%; 
    animation: fadeIn 0.8s ease-out 3.5s infinite;
}

/* 下左 */
.bottom-left::before { 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 4px; 
    animation: fadeIn 0.8s ease-out 1s infinite;
}
.bottom-left::after { 
    bottom: 0; 
    left: 0; 
    width: 4px; 
    height: 100%; 
    animation: fadeIn 0.8s ease-out 1s infinite;
}
.bottom-left .outer { 
    position: absolute; 
    bottom: -15px; 
    left: -15px; 
    width: 90px; 
    height: 90px; 
}
.bottom-left .outer::before { 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 4px; 
    animation: fadeIn 0.8s ease-out 1.5s infinite;
}
.bottom-left .outer::after { 
    bottom: 0; 
    left: 0; 
    width: 4px; 
    height: 100%; 
    animation: fadeIn 0.8s ease-out 1.5s infinite;
}

/* 下右 */
.bottom-right::before { 
    bottom: 0; 
    right: 0; 
    width: 100%; 
    height: 4px; 
    animation: fadeIn 0.8s ease-out 2s infinite;
}
.bottom-right::after { 
    bottom: 0; 
    right: 0; 
    width: 4px; 
    height: 100%; 
    animation: fadeIn 0.8s ease-out 2s infinite;
}
.bottom-right .outer { 
    position: absolute; 
    bottom: -15px; 
    right: -15px; 
    width: 90px; 
    height: 90px; 
}
.bottom-right .outer::before { 
    bottom: 0; 
    right: 0; 
    width: 100%; 
    height: 4px; 
    animation: fadeIn 0.8s ease-out 2.5s infinite;
}
.bottom-right .outer::after { 
    bottom: 0; 
    right: 0; 
    width: 4px; 
    height: 100%; 
    animation: fadeIn 0.8s ease-out 2.5s infinite;
}

/* =================
   活動資訊卡片（關卡任務挑戰說明）
   ================= */
.event-info-card {
    /* background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 20, 40, 0.8) 100%); */
    border: none;
    border-radius: 0;
    padding: 40px 30px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.event-info-card:hover {
    box-shadow: 0 0 40px rgba(var(--cyan-rgb), 0.3), 
                0 0 80px rgba(var(--cyan-rgb), 0.3);
}

/* 資訊區塊 */
.info-section {
    margin-bottom: 35px;
}

.info-section:last-child {
    margin-bottom: 0;
}

/* 標題區 - icon 和標題同一列 */
.info-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

/* 圖示 */
.section-icon {
    font-size: 2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(var(--cyan-rgb), 0.5));
}

/* 小標題 */
.section-title-small {
    color: var(--cyan);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.5);
    letter-spacing: 0.05em;
}

/* 內容文字 */
.section-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 0.95rem;
    margin: 0;
}

/* 活動辦法列表 */
.method-list {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.method-list li {
    margin-bottom: 10px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.method-list li::marker {
    color: var(--cyan);
    font-weight: 700;
}

.method-list li:last-child {
    margin-bottom: 0;
}

/* 獎項列表 */
.prize-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prize-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(var(--cyan-rgb), 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.prize-item:hover {
    background: rgba(var(--cyan-rgb), 0.1);
    border-color: var(--cyan);
    transform: translateX(5px);
}

/* 獎項徽章 */
.prize-badge {
    background: linear-gradient(135deg, var(--cyan), #0099ff);
    color: #000;
    font-weight: 900;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 15px;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.5);
    flex-shrink: 0;
}

/* 特殊獎項顏色 */
.grand-prize .prize-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    animation: shimmerGold 2s ease-in-out infinite;
}

.second-prize .prize-badge {
    background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
}

.third-prize .prize-badge {
    background: linear-gradient(135deg, #CD7F32, #E5A26F);
}

/* 獎項名稱 */
.prize-name {
    flex: 1;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

/* 獎項數量 */
.prize-quantity {
    color: var(--cyan);
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 45px;
    text-align: right;
}

/* 金色閃爍動畫 */
@keyframes shimmerGold {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    }
}

/* =================
   關卡任務
   ================= */
.mission-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 20px 0;
}

.mission-intro {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-top: 15px;
    text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.3);
}

.section-title-style-2 {
    color: var(--cyan);
    padding: 15px 35px;
    border: 2px solid var(--cyan);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.6);
    animation: borderPulse 2s ease-in-out infinite;
    text-align: center;
}

.section-title-style-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.2), transparent);
    animation: shimmer 2s infinite;
}

/* 關卡卡片容器 - 流動式網格佈局 */
.route-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* 關卡卡片 */
.mission-node {
    background: var(--dark-bg);
    border: 2px solid rgba(var(--cyan-rgb), 0.3);
    border-radius: 15px;
    padding: 30px 20px 20px 20px;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.mission-node:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(var(--cyan-rgb), 0.4);
    transform: translateY(-5px);
}

/* 關卡編號 */
.node-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--cyan), #0099ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.3rem;
    color: #000;
    box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.6);
    z-index: 10;
    text-align: center;
    line-height: 1;
    padding: 0;
}

/* 標題區 - 自適應高度 */
.node-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1;
    display: flex;
    align-items: center;
    min-height: 50px;
}

/* 資訊區 - 固定在底部 */
.node-meta {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(var(--cyan-rgb), 0.2);
}

.node-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.node-info:last-child {
    margin-bottom: 0;
}

.info-icon {
    color: var(--cyan);
    min-width: 20px;
}

/* 點數標籤 */
.node-points {
    display: inline-block;
    background: rgba(var(--cyan-rgb), 0.2);
    color: var(--cyan);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 10px;
    border: 1px solid rgba(var(--cyan-rgb), 0.4);
}

/* =================
   活動區塊
   ================= */
#activities {
    position: relative;
    clear: both;
    min-height: 100vh;
    margin-bottom: 10em;
    padding: 80px 0;
}

.activities-header {
    text-align: center;
    margin-bottom: 50px;
}

.activity-card {
    background: var(--dark-bg);
    border: 2px solid rgba(var(--cyan-rgb), 0.3);
    border-radius: 15px;
    padding: 30px 25px;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 200px;
    height: 100%;
}

.activity-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(var(--cyan-rgb), 0.4);
    transform: translateY(-5px);
}

.activity-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.4;
}

.activity-card h3 .subtitle {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    font-size: 1rem;
    margin-top: 8px;
    font-weight: 500;
}

.activity-card h4 {
    color: var(--cyan);
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 12px 0;
    padding-left: 12px;
    border-left: 3px solid var(--cyan);
}

.activity-info {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.activity-info li {
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 0;
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
    font-size: 0.9rem;
}

.activity-info li i {
    color: var(--cyan);
    margin-right: 10px;
    margin-top: 3px;
    font-size: 0.85rem;
    min-width: 16px;
}

/* 好書交換 */
.exchange-section {
    margin-bottom: 20px;
}

.exchange-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(var(--cyan-rgb), 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.exchange-item:hover {
    background: rgba(var(--cyan-rgb), 0.1);
    border-color: var(--cyan);
}

.exchange-title {
    background: linear-gradient(135deg, var(--cyan), #0099ff);
    color: #000;
    font-weight: 900;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.5);
}

.exchange-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.9rem;
}

.exchange-content .info-time {
    color: rgba(255, 255, 255, 0.8);
    margin: 6px 0;
}

.exchange-content .info-place {
    color: var(--cyan);
    font-weight: 600;
    margin: 6px 0;
}

.exchange-content .info-note {
    color: #ffcc00;
    font-style: italic;
    margin: 6px 0;
}

/* 電影列表 */
.film-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.film-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 3px solid var(--cyan);
    transition: var(--transition);
}

.film-item:hover {
    background: rgba(var(--cyan-rgb), 0.1);
}

.film-name {
    color: #fff;
    font-weight: 600;
    flex: 1;
    font-size: 0.95rem;
}

.film-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-align: right;
    margin-left: 15px;
}

/* 按鈕 */
.activity-card .btn-details {
    display: inline-block;
    background: rgba(var(--cyan-rgb), 0.2);
    color: var(--cyan);
    padding: 8px 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: auto;
    border: 1px solid rgba(var(--cyan-rgb), 0.4);
    transition: var(--transition);
    cursor: pointer;
    align-self: flex-end;
}

.activity-card .btn-details:hover {
    background: rgba(var(--cyan-rgb), 0.3);
    box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.5);
    transform: scale(1.05);
}

.activity-card .btn-details:disabled,
.activity-card .btn-details.disabled {
    background: rgba(100, 100, 100, 0.2);
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(100, 100, 100, 0.4);
    cursor: not-allowed;
    opacity: 0.5;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.button-group .btn-details {
    margin-top: 0;
    flex: 0 1 auto;
}

/* =================
   Modal 彈窗
   ================= */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-backdrop.show {
    opacity: 0.85;
}

.modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(var(--cyan-rgb), 0.4);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 40px rgba(var(--cyan-rgb), 0.3);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(var(--cyan-rgb), 0.3);
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
}

.modal-title {
    color: var(--cyan);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.5);
}

.modal-header .btn-close {
    background: transparent;
    opacity: 1;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(var(--cyan-rgb), 0.5);
    border-radius: 50%;
    position: relative;
    transition: var(--transition);
    filter: none;
}

.modal-header .btn-close::before,
.modal-header .btn-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), #0099ff);
    box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.5);
}

.modal-header .btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal-header .btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-header .btn-close:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.5);
    transform: scale(1.1) rotate(90deg);
}

.modal-body {
    padding: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Nav Tabs in Modal */
.modal-body .nav-tabs {
    border-bottom: 2px solid rgba(var(--cyan-rgb), 0.3);
    margin-bottom: 2rem;
}

.modal-body .nav-tabs .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.5rem;
    transition: var(--transition);
    background: transparent;
}

.modal-body .nav-tabs .nav-link:hover {
    color: var(--cyan);
    border-bottom-color: rgba(var(--cyan-rgb), 0.5);
}

.modal-body .nav-tabs .nav-link.active {
    color: var(--cyan);
    background: rgba(var(--cyan-rgb), 0.1);
    border-bottom-color: var(--cyan);
    font-weight: 700;
}

/* =================
   動畫
   ================= */
@keyframes borderPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.5);
        border-color: var(--cyan);
    }
    50% {
        box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.8);
        border-color: #00d4ff;
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* =================
   響應式設計
   ================= */
@media (max-width: 991px) {
    /* 導航欄 */
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(15px);
        border-radius: 15px;
        margin-top: 1rem;
        border: 2px solid rgba(var(--cyan-rgb), 0.3);
        box-shadow: 0 0 30px rgba(var(--cyan-rgb), 0.2);
        padding: 1.5rem;
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .navbar .nav-link {
        padding: 0.8rem 1rem !important;
        border-radius: 10px;
        border: 1px solid rgba(var(--cyan-rgb), 0.2);
        background: rgba(0, 20, 40, 0.6);
        text-align: center;
    }
    
    .navbar .nav-link:hover {
        background: rgba(var(--cyan-rgb), 0.15);
        border-color: var(--cyan);
        transform: translateY(0) scale(1.02);
    }
    
    .navbar .nav-link::after {
        display: none;
    }
    
    /* Carnival */
    #carnival {
        flex-direction: column;
    }
    
    #gem-animation-container {
        width: 100% !important;
        height: 50vh !important;
        position: relative !important;
    }
    
    #carnival-content {
        padding: 20px;
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .route-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .route-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .mission-header {
        margin-bottom: 30px;
    }
    
    .section-title-style-2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        padding: 8px 20px;
    }
    
    .mission-intro {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .route-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .mission-node {
        min-height: 180px;
    }
    
    .cta-button {
        font-size: 1rem;
        padding: 12px 30px;
    }
    
    .film-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .film-time {
        text-align: left;
        margin-left: 0;
    }
}

/* =================
   總圖 & 分館區塊
   ================= */
#main,
#branch {
    scroll-margin-top: 80px;
    padding-top: 100px;
    margin-bottom: 50px;
    min-height: 100vh;
}

.main-header,
.branch-header {
    text-align: center;
    margin-bottom: 50px;
}

.main-header .section-title,
.branch-header .section-title {
    display: inline-block;
    margin: 0 auto;
}

/* =================
   Section Title 樣式
   ================= */
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--cyan);
    position: relative;
    display: inline-block;
    margin: 40px 0 30px 0;
    padding: 15px 30px;
    letter-spacing: 0.1em;
}

/* 漸變效果 */
.section-title-style-1 {
    background: linear-gradient(90deg, var(--cyan), #00d4ff, var(--cyan));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientSlide 3s ease infinite;
}

.section-title-style-1::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.8);
}

/* 科技線條 */
.section-title-style-3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--cyan);
    border-right: none;
    border-bottom: none;
    box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.5);
}

/* =================
   Modal 滾動條
   ================= */
.modal-body {
    max-height: 80vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(var(--cyan-rgb), 0.3);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--cyan-rgb), 0.5);
}

/* Modal 圖片 */
.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(var(--cyan-rgb), 0.2);
    box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.1);
}

/* Modal 表格 */
.modal-body table {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(var(--cyan-rgb), 0.2);
}

.modal-body table thead {
    background: rgba(var(--cyan-rgb), 0.1);
    border-bottom: 2px solid rgba(var(--cyan-rgb), 0.3);
}

.modal-body table th {
    color: var(--cyan);
    font-weight: 700;
    border-color: rgba(var(--cyan-rgb), 0.2);
}

.modal-body table td {
    border-color: rgba(var(--cyan-rgb), 0.1);
}

.modal-body table tbody tr:hover {
    background: rgba(var(--cyan-rgb), 0.05);
}

.modal-body table a {
    color: var(--cyan);
    text-decoration: none;
    transition: var(--transition);
}

.modal-body table a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.5);
}

/* Tab 內容 */
.modal-body .tab-content {
    color: rgba(255, 255, 255, 0.85);
}

/* =================
   視覺容器 (SVG/圖片)
   ================= */
.visual-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

#svgContent {
    width: 100%;
    height: auto;
}

#svgContent.loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 1.2rem;
}

/* =================
   更多動畫
   ================= */
@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* =================
   輔助類別
   ================= */
.text-cyan {
    color: var(--cyan) !important;
}

.bg-dark-transparent {
    background: rgba(0, 0, 0, 0.6) !important;
}

.border-cyan {
    border-color: var(--cyan) !important;
}

/* =================
   額外響應式調整
   ================= */
@media (max-width: 768px) {
    #activities {
        padding: 60px 0;
    }
    
    .activities-header,
    .main-header,
    .branch-header {
        margin-bottom: 35px;
    }
    
    .activity-card {
        padding: 25px 20px;
        min-height: 180px;
    }
    
    .activity-card h3 {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin: 30px 0 20px 0;
    }
    
    /* 活動資訊卡片響應式 */
    .event-info-card {
        padding: 30px 20px;
        margin-bottom: 40px;
    }
    
    .info-section {
        margin-bottom: 30px;
    }
    
    .section-icon {
        font-size: 1.8rem;
    }
    
    .section-title-small {
        font-size: 1.2rem;
    }
    
    .section-text,
    .method-list li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .activity-card {
        padding: 20px 15px;
    }
    
    .activity-card h3 {
        font-size: 1rem;
    }
    
    .exchange-item {
        padding: 12px;
    }
    
    .prize-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .prize-badge {
        font-size: 0.8rem;
        padding: 5px 10px;
        min-width: 45px;
    }
    
    .prize-name {
        font-size: 0.85rem;
    }
    
    .prize-quantity {
        font-size: 0.8rem;
        min-width: 40px;
    }
    
    /* 活動資訊卡片 - 小手機 */
    .event-info-card {
        padding: 25px 15px;
        margin-bottom: 30px;
    }
    
    .info-section {
        margin-bottom: 25px;
    }
    
    .section-icon {
        font-size: 1.6rem;
    }
    
    .section-title-small {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .method-list {
        padding-left: 18px;
    }
    
    .method-list li {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
}

/* =================
   Footer 頁尾
   ================= */
footer {
    position: relative;
    z-index: 4;
    text-align: center;
    padding-top: 1em;
    background-size: contain;
    min-height: 300px;
}

/* 電話連結樣式 */
.phone-link {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
}

.phone-link:hover {
    color: #fff;
    background: rgba(var(--cyan-rgb), 0.2);
    box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.5);
    transform: scale(1.05);
}