/* ====================================
   開心水族 - 主樣式表
   基於 Logo 色彩風格設計
   ==================================== */

/* ====================================
   CSS 變數定義（基於 Logo 色彩 + Manila Ocean Park 優化）
   ==================================== */
:root {
    /* 主色調 - 清新水藍 */
    --primary-color: #87CEEB;
    --primary-light: #B0E0F5;
    --primary-dark: #5CADDB;
    --primary-medium: #0B69B7;        /* 新增 - MOP 中藍 */
    
    /* 深色調 - 穩重深藍 */
    --secondary-color: #1E3A5F;
    --secondary-light: #2E4A6F;
    --secondary-dark: #0E2A4F;
    --secondary-brand: #116999;       /* 新增 - MOP 品牌藍 */
    
    /* 輔助色 - 粉橘（孔雀魚） */
    --accent-color: #FFA07A;
    --accent-light: #FFB899;
    --accent-dark: #FF8860;
    
    /* 強調色 - MOP 活潑橙色（CTA 按鈕） */
    --orange-primary: #FF914D;        /* 新增 - MOP 主橙色 */
    --orange-hover: #EF7301;          /* 新增 - 懸停深橙 */
    --orange-light: #FFB899;          /* 新增 - 淺橙 */
    
    /* 高亮色 - 淺綠（水草） */
    --highlight-color: #90EE90;
    --highlight-light: #A8F3A8;
    --highlight-dark: #78D978;
    --highlight-lime: #DAE6A7;        /* 新增 - 萊姆綠 */
    
    /* 中性色 */
    --background-color: #F0F8FF;
    --background-light: #FFFFFF;
    --background-cyan: #E7FCFF;       /* 新增 - 淺青背景 */
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --border-color: #E0E0E0;
    --disabled-gray: #D1D1D1;         /* 新增 - 禁用狀態 */
    
    /* 陰影 - MOP 柔和風格 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-soft: 0 0 10px 0 rgba(0, 0, 0, 0.15);      /* 新增 - 柔和陰影 */
    --shadow-hover: 0 0 30px 0 rgba(0, 0, 0, 0.15);     /* 新增 - 懸停陰影 */
    --shadow-orange: 0 0 20px rgba(255, 145, 77, 0.3);  /* 新增 - 橙色光暈 */
    
    /* 間距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 5rem;
    
    /* 轉場動畫 */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --transition-smooth: all 0.3s cubic-bezier(.42, 0, .2, 1);
}

/* ====================================
   全局泡泡動畫
   ==================================== */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(135, 206, 235, 0.3));
    border-radius: 50%;
    opacity: 0.6;
    animation: bubbleRise linear infinite;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(135, 206, 235, 0.3);
}

/* 為每個泡泡設定不同的大小、位置和動畫時間 - JavaScript 控制出現時機 */
.bubble-1 { width: 38px; height: 38px; left: 7%; animation-duration: 11.3s; }
.bubble-2 { width: 22px; height: 22px; left: 18%; animation-duration: 8.7s; }
.bubble-3 { width: 16px; height: 16px; left: 31%; animation-duration: 13.5s; }
.bubble-4 { width: 42px; height: 42px; left: 43%; animation-duration: 9.2s; }
.bubble-5 { width: 19px; height: 19px; left: 52%; animation-duration: 14.8s; }
.bubble-6 { width: 35px; height: 35px; left: 64%; animation-duration: 10.6s; }
.bubble-7 { width: 27px; height: 27px; left: 73%; animation-duration: 12.1s; }
.bubble-8 { width: 14px; height: 14px; left: 83%; animation-duration: 15.4s; }
.bubble-9 { width: 31px; height: 31px; left: 91%; animation-duration: 11.9s; }
.bubble-10 { width: 25px; height: 25px; left: 3%; animation-duration: 13.2s; }
.bubble-11 { width: 20px; height: 20px; left: 12%; animation-duration: 9.8s; }
.bubble-12 { width: 33px; height: 33px; left: 23%; animation-duration: 14.1s; }
.bubble-13 { width: 17px; height: 17px; left: 37%; animation-duration: 10.4s; }
.bubble-14 { width: 29px; height: 29px; left: 46%; animation-duration: 12.7s; }
.bubble-15 { width: 40px; height: 40px; left: 58%; animation-duration: 11.5s; }
.bubble-16 { width: 24px; height: 24px; left: 67%; animation-duration: 13.9s; }
.bubble-17 { width: 18px; height: 18px; left: 77%; animation-duration: 9.3s; }
.bubble-18 { width: 36px; height: 36px; left: 88%; animation-duration: 15.1s; }
.bubble-19 { width: 21px; height: 21px; left: 95%; animation-duration: 10.9s; }
.bubble-20 { width: 28px; height: 28px; left: 8%; animation-duration: 12.4s; }

@keyframes bubbleRise {
    0% {
        bottom: -100px;
        opacity: 0;
        transform: translateX(0) scale(1);
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translateX(20px) scale(1.1);
    }
    90% {
        opacity: 0.4;
    }
    100% {
        bottom: 110vh;
        opacity: 0;
        transform: translateX(-20px) scale(0.8);
    }
}

/* 響應式設計：在小螢幕上減少泡泡數量 */
@media (max-width: 768px) {
    .bubble:nth-child(n+11) {
        display: none;
    }
}

@media (max-width: 480px) {
    .bubble:nth-child(n+6) {
        display: none;
    }
}

/* ====================================
   Google Fonts - 超可愛圓潤字體
   已移至 header.php 以提升載入效能
   ==================================== */
/* 字體已在 header.php 中引入，無需在此重複載入 */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Varela Round', 'Nunito', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', '微軟正黑體', 'Helvetica Neue', Arial, sans-serif !important;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
    font-display: swap;
    padding-top: 80px;
}

/* 標題使用超可愛圓潤字體 */
h1, h2, h3, h4, h5, h6, .hero-title, .section-title {
    font-family: 'Fredoka', 'Nunito', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 強制所有文字元素使用新字體 */
p, span, div, a, li, button, input, textarea, select {
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

ul {
    list-style: none;
}

/* ====================================
   容器與佈局
   ==================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.site-main {
    min-height: calc(100vh - 80px - 300px);
    padding: 0;
    margin-top: 0;
}

/* ====================================
   導航列（滾動隱藏功能）
   ==================================== */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
}

/* 下滑時隱藏 header */
.site-header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

/* 上滑時顯示 header */
.site-header.header-visible {
    transform: translateY(0);
    box-shadow: var(--shadow-lg);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--background-light);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--background-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
}

.nav-menu a {
    color: var(--background-light);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 8px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 可愛漢堡選單按鈕（手機版） */
.nav-toggle {
    display: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 12px;
    width: 55px;
    height: 55px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 關閉狀態（預設藍色） - 提高優先級 */
.nav-toggle[aria-expanded="false"] {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    transform: rotate(0deg) !important;
}

.nav-toggle:hover:not([aria-expanded="true"]) {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-hover));
}

.nav-toggle:active {
    transform: scale(0.95);
}

.hamburger-icon {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* 漢堡線條 */
.hamburger-icon .line {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 小氣泡裝飾 */
.hamburger-icon .bubble {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
    animation: bubbleFloat 2s infinite ease-in-out;
}

.bubble-1 {
    top: 5px;
    left: 5px;
    animation-delay: 0s;
}

.bubble-2 {
    top: 10px;
    right: 5px;
    animation-delay: 0.5s;
}

.bubble-3 {
    bottom: 5px;
    left: 8px;
    animation-delay: 1s;
}

@keyframes bubbleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-8px) scale(1.2);
    }
}

/* 關閉狀態（預設藍色） */
.nav-toggle[aria-expanded="false"] .line {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
}

/* 打開狀態的動畫（變成橘色 X） */
.nav-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-hover)) !important;
    transform: rotate(90deg);
}

.nav-toggle[aria-expanded="true"] .line-1 {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .line-2 {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-toggle[aria-expanded="true"] .line-3 {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-toggle[aria-expanded="true"] .bubble {
    opacity: 0;
}

/* ====================================
   頁尾
   ==================================== */
.site-footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: var(--background-light);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    color: var(--primary-light);
    margin-bottom: var(--spacing-sm);
    font-size: 1.2rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-links li,
.footer-contact li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    display: inline-block;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.footer-tech {
    margin-top: var(--spacing-xs);
    font-size: 0.9rem;
}

/* ====================================
   頁面標題區塊 - MOP 優化
   ==================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 50%, var(--primary-dark) 100%);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-hover);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

.page-header h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: var(--spacing-sm);
    text-shadow: 3px 3px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    animation: fadeInDown 0.6s ease;
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.95);
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease;
}

/* ====================================
   水族卡片（品種展示） - MOP 柔和陰影
   ==================================== */
.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0;
}

.species-card {
    background: var(--background-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);  /* 柔和陰影 */
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.species-card:hover {
    transform: translateY(-10px) scale(1.02);  /* 更明顯的懸停效果 */
    box-shadow: var(--shadow-hover);  /* 懸停陰影 */
}

.species-card:active {
    transform: translateY(-5px) scale(1.01);
}

/* 媒體容器（支援多檔案輪播） */
.media-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--background-color);
}

.media-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.media-item.active {
    opacity: 1;
    visibility: visible;
}

.media-item video,
.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 輪播指示器（小圓點） */
.media-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.indicator-dot.active {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
    transform: scale(1.3);
}

/* 左右切換箭頭 */
.media-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 0;
}

.species-card:hover .media-arrow {
    opacity: 1;
}

.media-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.media-arrow.prev {
    left: 10px;
}

.media-arrow.next {
    right: 10px;
}

.media-arrow i {
    font-size: 1.2rem;
}

/* 品種名稱 */
.species-card h3 {
    padding: 1rem;
    font-size: 1.2rem;
    color: var(--secondary-color);
    text-align: center;
    background: linear-gradient(to right, var(--primary-light), var(--primary-color));
    margin: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    gap: 0.5rem;
}

.file-count {
    font-size: 0.9rem;
    color: var(--orange-primary);
    font-weight: 700;
}

/* 懶加載骨架屏 */
.species-card.loading video {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ====================================
   Lightbox（影片播放器）
   ==================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox video,
.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    padding: var(--spacing-xs);
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

/* ====================================
   按鈕樣式 - MOP 膠囊型設計
   ==================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: 100px;  /* 膠囊型 */
    font-family: 'Fredoka', 'Nunito', 'Noto Sans TC', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

/* 主按鈕 - 橙色 CTA */
.btn-primary {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-hover));
    color: var(--background-light);
    box-shadow: var(--shadow-soft), var(--shadow-orange);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-hover), 0 0 30px rgba(255, 145, 77, 0.4);
    background: linear-gradient(135deg, var(--orange-hover), var(--orange-primary));
}

.btn-primary:active {
    transform: translateY(-1px) scale(1);
}

/* 次要按鈕 - 藍色 */
.btn-secondary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--background-light);
    box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-brand));
}

/* 灰色禁用按鈕 */
.btn-disabled {
    background: var(--disabled-gray);
    color: var(--text-light);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-disabled:hover {
    transform: none;
}

/* ====================================
   載入動畫
   ==================================== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====================================
   響應式設計 - 平板
   ==================================== */
@media (max-width: 1024px) {
    .species-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ====================================
   響應式設計 - 手機
   ==================================== */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* 導航 - 精緻毛玻璃選單 */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 320px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 0.8rem;
        transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(135, 206, 235, 0.2);
        border-radius: 25px 0 0 25px;
        z-index: 999;
        overflow: hidden;
    }
    
    /* 選單背景裝飾 */
    .nav-menu::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(135, 206, 235, 0.15) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        animation: float 6s ease-in-out infinite;
    }
    
    .nav-menu::after {
        content: '';
        position: absolute;
        bottom: -30%;
        left: -15%;
        width: 180px;
        height: 180px;
        background: radial-gradient(circle, rgba(255, 145, 77, 0.1) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        animation: float 8s ease-in-out infinite reverse;
    }
    
    /* 選單打開動畫 */
    .nav-menu.active {
        right: 0;
    }
    
    /* 選單項目樣式 */
    .nav-menu li {
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        position: relative;
        z-index: 1;
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.3s; }
    
    .nav-menu a {
        padding: 1.1rem 1.3rem;
        border-radius: 16px;
        background: linear-gradient(135deg, rgba(135, 206, 235, 0.08) 0%, rgba(176, 224, 245, 0.05) 100%);
        border: 1.5px solid rgba(135, 206, 235, 0.2);
        display: flex;
        align-items: center;
        gap: 1rem;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        position: relative;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    /* 水波紋背景效果 */
    .nav-menu a::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(135, 206, 235, 0.3) 0%, transparent 70%);
        transform: translate(-50%, -50%);
        transition: width 0.6s ease, height 0.6s ease;
    }
    
    .nav-menu a:hover::before {
        width: 300px;
        height: 300px;
    }
    
    /* 懸停效果 */
    .nav-menu a:hover {
        background: linear-gradient(135deg, rgba(135, 206, 235, 0.15) 0%, rgba(176, 224, 245, 0.12) 100%);
        border-color: var(--primary-color);
        transform: translateX(-5px) scale(1.02);
        box-shadow: 0 6px 16px rgba(135, 206, 235, 0.2);
    }
    
    /* Icon 樣式 */
    .nav-menu a i {
        font-size: 1.4rem;
        min-width: 28px;
        color: var(--primary-color);
        transition: all 0.3s ease;
        position: relative;
        z-index: 1;
    }
    
    .nav-menu a:hover i {
        transform: scale(1.15) rotate(-5deg);
        color: var(--primary-dark);
    }
    
    /* 文字樣式 */
    .nav-menu a span {
        font-weight: 600;
        font-size: 1.05rem;
        color: var(--secondary-color);
        position: relative;
        z-index: 1;
        transition: all 0.3s ease;
    }
    
    .nav-menu a:hover span {
        color: var(--primary-dark);
    }
    
    /* Active 狀態（橙色高亮） */
    .nav-menu a.active {
        background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-hover) 100%);
        border-color: var(--orange-primary);
        color: white;
        transform: translateX(-8px);
        box-shadow: 0 8px 20px rgba(255, 145, 77, 0.35), 0 0 0 3px rgba(255, 145, 77, 0.1);
    }
    
    .nav-menu a.active i,
    .nav-menu a.active span {
        color: white;
    }
    
    .nav-menu a.active i {
        animation: iconBounce 0.6s ease;
    }
    
    .nav-menu a.active::before {
        background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    }
    
    @keyframes iconBounce {
        0%, 100% { transform: scale(1) rotate(0deg); }
        50% { transform: scale(1.2) rotate(-10deg); }
    }
    
    /* 選單打開時的背景遮罩 */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Logo 調整 */
    .logo-text {
        font-size: 1.2rem;
    }
    
    .nav-logo img {
        width: 40px;
        height: 40px;
    }
    
    /* 頁面標題 */
    .page-header {
        padding: var(--spacing-lg) 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    /* 水族卡片 - 單欄 */
    .species-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .media-container {
        height: 250px;
    }
    
    .media-item video,
    .media-item img {
        height: 250px;
    }
    
    .species-card h3 {
        font-size: 1.1rem;
        padding: 0.8rem;
        min-height: 55px;
    }
    
    /* 手機版輪播控制 */
    .media-arrow {
        width: 35px;
        height: 35px;
        opacity: 0.8; /* 手機版始終顯示 */
    }
    
    .indicator-dot {
        width: 8px;
        height: 8px;
    }
    
    /* 頁尾 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-links,
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    /* LINE 聯絡卡片響應式 */
    .line-btn {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .line-btn svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Lightbox */
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-close {
        top: -35px;
        font-size: 1.5rem;
    }
}

/* ====================================
   水波背景動畫 - MOP 風格
   ==================================== */
.wave-background {
    position: relative;
    overflow: hidden;
}

.wave-background::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 100"><path fill="%2387CEEB" opacity="0.3" d="M0,50 Q300,0 600,50 T1200,50 L1200,100 L0,100 Z"></path></svg>') repeat-x;
    animation: wave 10s linear infinite;
    z-index: 0;
}

.wave-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 100"><path fill="%2387CEEB" opacity="0.2" d="M0,60 Q300,20 600,60 T1200,60 L1200,100 L0,100 Z"></path></svg>') repeat-x;
    animation: wave 15s linear infinite reverse;
    z-index: 0;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 泡泡動畫 */
.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(135,206,235,0.2));
    border-radius: 50%;
    opacity: 0.6;
    animation: rise 8s infinite ease-in;
}

.bubble:nth-child(1) { left: 10%; animation-delay: 0s; width: 30px; height: 30px; }
.bubble:nth-child(2) { left: 20%; animation-delay: 2s; width: 20px; height: 20px; }
.bubble:nth-child(3) { left: 35%; animation-delay: 4s; width: 25px; height: 25px; }
.bubble:nth-child(4) { left: 50%; animation-delay: 0s; width: 15px; height: 15px; }
.bubble:nth-child(5) { left: 65%; animation-delay: 3s; width: 28px; height: 28px; }
.bubble:nth-child(6) { left: 80%; animation-delay: 5s; width: 22px; height: 22px; }
.bubble:nth-child(7) { left: 90%; animation-delay: 1s; width: 18px; height: 18px; }

@keyframes rise {
    0% {
        bottom: -100px;
        opacity: 0;
    }
    20% {
        opacity: 0.6;
    }
    100% {
        bottom: 110%;
        opacity: 0;
    }
}

/* 閃爍光點效果 */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
    animation: sparkle 3s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

/* ====================================
   工具類別
   ==================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }
.visible { display: block; }

/* ====================================
   無障礙 & 效能優化
   ==================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ====================================
   互動特效樣式
   ==================================== */

/* 漂浮魚群容器 (已停用) */
/*
.floating-fish-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-fish {
    position: absolute;
    width: 60px;
    height: 35px;
    animation: swimAcross 15s linear infinite;
}

.fish-1 {
    top: 15%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.fish-2 {
    top: 35%;
    animation-delay: 5s;
    animation-duration: 22s;
}

.fish-3 {
    top: 55%;
    animation-delay: 10s;
    animation-duration: 20s;
}

.fish-4 {
    top: 75%;
    animation-delay: 3s;
    animation-duration: 16s;
}

@keyframes swimAcross {
    0% {
        left: -100px;
        transform: scaleX(1);
    }
    48% {
        transform: scaleX(1);
    }
    50% {
        transform: scaleX(-1);
    }
    98% {
        transform: scaleX(-1);
    }
    100% {
        left: 110%;
        transform: scaleX(1);
    }
}
*/

/* 水波紋效果 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(135,206,235,0.3) 50%, transparent 100%);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* 粒子容器 */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255,255,255,0.8), rgba(135,206,235,0.3));
    border-radius: 50%;
    bottom: -20px;
    animation: particleRise 10s linear infinite;
}

@keyframes particleRise {
    0% {
        bottom: -20px;
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        bottom: 110%;
        opacity: 0;
    }
}

/* 載入進度條 */
.loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.1);
    z-index: 9999;
    transition: opacity 0.3s;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--orange-primary));
    width: 0%;
    transition: width 0.2s ease-out;
    box-shadow: 0 0 10px var(--orange-primary);
}

/* 滾動顯示動畫 */
.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Icon 樣式增強 */
.nav-menu a i {
    margin-right: 0.5rem;
    font-size: 1.1em;
    transition: var(--transition-fast);
}

.nav-menu a:hover i {
    transform: scale(1.2) rotate(5deg);
}

.nav-menu a.active i {
    transform: scale(1.2) rotate(5deg);
}

/* 卡片 3D 傾斜效果支持 */
.species-card,
.news-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
}

/* 導航連結懸停光暈 */
.nav-menu a {
    position: relative;
    transition: all 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--orange-primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 80%;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .floating-fish,
    .particle,
    .bubble {
        display: none;
    }
}


/* ====================================
   載入狀態優化
   ==================================== */
/* 載入中動畫 */
.species-card.loading-media::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px; /* 扣除標題高度 */
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: pulse 1.5s ease-in-out infinite;
}

.species-card.loading-media::after {
    content: '載入中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    z-index: 3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 載入成功 */
.species-card.loaded video,
.species-card.loaded img {
    animation: fadeIn 0.5s ease-in;
}

/* 載入失敗 */
.species-card.load-error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    opacity: 0.9;
    z-index: 2;
}

.species-card.load-error::after {
    content: '❌ 載入失敗';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    z-index: 3;
}

/* 重試按鈕 */
.retry-button {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--orange-primary);
    border: 2px solid white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 4;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.retry-button:hover {
    background: var(--orange-primary);
    color: white;
    transform: translateX(-50%) scale(1.05);
}

.retry-button i {
    margin-right: 0.4rem;
}

/* 首頁影片優化 */
.species-card > video,
.species-card > img {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

/* 確保媒體容器有最小高度 */
.media-container {
    min-height: 300px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

/* 手機版調整 */
@media (max-width: 767px) {
    .media-container {
        min-height: 250px;
    }
    
    .species-card.loading-media::after,
    .species-card.load-error::after {
        font-size: 0.9rem;
    }
    
    .retry-button {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* ====================================
   統一縮圖樣式（影片+圖片）
   ==================================== */

/* 影片縮圖容器 */
.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

/* 播放按鈕覆蓋層（預設隱藏，hover 才顯示） */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 0;
}

.play-overlay i {
    font-size: 4rem;
    color: white;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Hover 效果（只在滑鼠移上去時顯示） */
.video-thumbnail-wrapper:hover .play-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.video-thumbnail-wrapper:hover .play-overlay i {
    transform: scale(1.1);
}

.species-card:hover .video-thumbnail-wrapper video {
    transform: scale(1.02);
}

/* 播放圖示脈動動畫（已停用） */
@keyframes pulse-play-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

/* 圖片懶加載優化 */
.species-card img[data-src] {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    min-height: 300px;
}

/* 手機版調整 */
@media (max-width: 767px) {
    .video-thumbnail-wrapper {
        height: 250px;
    }
    
    .video-thumbnail-wrapper video {
        height: 250px;
    }
    
    .play-overlay i {
        font-size: 3rem;
    }
    
    .species-card img[data-src] {
        min-height: 250px;
    }
}

/* ====================================
   免費 SVG 裝飾元素
   ==================================== */

/* 所有裝飾元素的基礎設定（支援視差滾動） */
.fish-decoration, .fish-small-decoration, .turtle-decoration,
.jellyfish-decoration, .octopus-decoration,
.starfish-decoration, .shell-decoration, .coral-decoration,
.seaweed-decoration, .anchor-decoration, .crab-decoration,
.bubbles-small-decoration, .seashell-pearl-decoration {
    will-change: transform, opacity;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    cursor: pointer;
}

/* 裝飾元素懸停效果 */
.fish-decoration:hover, .fish-small-decoration:hover, .turtle-decoration:hover {
    transform: scale(1.15) !important;
    filter: brightness(1.2);
}

.jellyfish-decoration:hover, .octopus-decoration:hover {
    transform: scale(1.1) rotate(5deg) !important;
    filter: brightness(1.1);
}

.starfish-decoration:hover, .shell-decoration:hover, .seashell-pearl-decoration:hover {
    transform: scale(1.2) rotate(15deg) !important;
    filter: drop-shadow(0 0 10px rgba(255, 145, 77, 0.6));
}

.coral-decoration:hover, .seaweed-decoration:hover {
    transform: scale(1.1) !important;
    filter: brightness(1.15);
}

.anchor-decoration:hover, .crab-decoration:hover {
    transform: scale(1.15) rotate(-5deg) !important;
    filter: brightness(1.2);
}

/* 波浪裝飾 */
.wave-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: url('../images/decorations/wave.svg') no-repeat bottom center;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

/* 氣泡裝飾背景 */
.bubbles-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 600px;
    background: url('../images/decorations/bubbles.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}

/* 珊瑚裝飾 */
.coral-decoration {
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 150px;
    height: 200px;
    background: url('../images/decorations/coral.svg') no-repeat bottom center;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

.coral-decoration.right {
    left: auto;
    right: 5%;
}

/* 海草裝飾 */
.seaweed-decoration {
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 80px;
    height: 180px;
    background: url('../images/decorations/seaweed.svg') no-repeat bottom center;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

/* 魚圖示裝飾 */
.fish-decoration {
    position: absolute;
    top: 30%;
    right: 10%;
    width: 100px;
    height: 100px;
    background: url('../images/decorations/fish.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
    animation: swim 20s linear infinite;
}

@keyframes swim {
    0% {
        transform: translateX(0) scaleX(1);
    }
    48% {
        transform: translateX(-200px) scaleX(1);
    }
    50% {
        transform: translateX(-200px) scaleX(-1);
    }
    98% {
        transform: translateX(0) scaleX(-1);
    }
    100% {
        transform: translateX(0) scaleX(1);
    }
}

/* 海星裝飾 */
.starfish-decoration {
    position: absolute;
    width: 80px;
    height: 80px;
    background: url('../images/decorations/starfish.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.7;
    z-index: 0;
}

/* 貝殼裝飾 */
.shell-decoration {
    position: absolute;
    width: 70px;
    height: 70px;
    background: url('../images/decorations/shell.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}

/* 水母裝飾 */
.jellyfish-decoration {
    position: absolute;
    width: 100px;
    height: 150px;
    background: url('../images/decorations/jellyfish.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.5;
    z-index: 0;
}


/* 海龜裝飾 */
.turtle-decoration {
    position: absolute;
    width: 120px;
    height: 80px;
    background: url('../images/decorations/turtle.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.5;
    z-index: 0;
    animation: swim-slow 25s linear infinite;
}

@keyframes swim-slow {
    0% { transform: translateX(0); }
    50% { transform: translateX(-150px); }
    100% { transform: translateX(0); }
}

/* 船錨裝飾 */
.anchor-decoration {
    position: absolute;
    width: 60px;
    height: 75px;
    background: url('../images/decorations/anchor.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.4;
    z-index: 0;
}

/* 小魚裝飾 */
.fish-small-decoration {
    position: absolute;
    width: 60px;
    height: 40px;
    background: url('../images/decorations/fish-small.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
    animation: swim-fast 15s linear infinite;
}

@keyframes swim-fast {
    0% { transform: translateX(0) scaleX(1); }
    48% { transform: translateX(-300px) scaleX(1); }
    50% { transform: translateX(-300px) scaleX(-1); }
    98% { transform: translateX(0) scaleX(-1); }
    100% { transform: translateX(0) scaleX(1); }
}

/* 章魚裝飾 */
.octopus-decoration {
    position: absolute;
    width: 100px;
    height: 125px;
    background: url('../images/decorations/octopus.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.5;
    z-index: 0;
}

/* 螃蟹裝飾 */
.crab-decoration {
    position: absolute;
    width: 90px;
    height: 70px;
    background: url('../images/decorations/crab.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}

/* 小氣泡裝飾 */
.bubbles-small-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    background: url('../images/decorations/bubbles-small.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.4;
    z-index: 0;
}

/* 珍珠貝殼裝飾 */
.seashell-pearl-decoration {
    position: absolute;
    width: 80px;
    height: 60px;
    background: url('../images/decorations/seashell-pearl.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.7;
    z-index: 0;
}

/* 手機版隱藏裝飾 */
@media (max-width: 767px) {
    .bubbles-decoration {
        width: 250px;
        height: 400px;
    }
    
    .coral-decoration,
    .seaweed-decoration,
    .fish-decoration,
    .starfish-decoration,
    .jellyfish-decoration,
    .turtle-decoration,
    .anchor-decoration,
    .octopus-decoration,
    .crab-decoration,
    .seashell-pearl-decoration {
        display: none;
    }
    
    .wave-decoration {
        height: 80px;
    }
    
    .shell-decoration,
    .fish-small-decoration,
    .bubbles-small-decoration {
        opacity: 0.3;
    }
}

/* ====================================
   回到頂部按鈕
   ==================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: var(--shadow-lg), 0 0 20px rgba(135, 206, 235, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.3);
    padding: 8px;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(135, 206, 235, 0.8);
}

.back-to-top-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.back-to-top:hover .back-to-top-icon {
    animation: swim-up 0.6s ease-in-out infinite;
}

@keyframes swim-up {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-3px) rotate(2deg);
    }
}

/* 手機版調整 */
@media (max-width: 767px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 55px;
        height: 55px;
    }
}

/* ====================================
   首頁 Hero Section - 響應式設計 (Apple 大氣風格)
   ==================================== */
.hero-section {
    background: linear-gradient(180deg, #B0E0F5 0%, #87CEEB 50%, #5CADDB 100%);
    padding: 7rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 0 0 50px 50px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    min-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

/* Hero Logo */
.hero-logo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    box-shadow: 0 0 30px rgba(255,255,255,0.5), 0 10px 40px rgba(0,0,0,0.2);
    border: 6px solid white;
    animation: float 3s ease-in-out infinite;
    display: block;
}

/* Hero 標題 */
.hero-title {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.3), 0 0 20px rgba(135,206,235,0.5);
    animation: fadeInDown 0.8s ease;
    line-height: 1.2;
}

/* Hero 副標題 */
.hero-subtitle {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    line-height: 1.8;
    animation: fadeInUp 1s ease;
}

/* Hero 按鈕區域 */
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease;
}

.btn-hero {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    min-width: 180px;
}

/* ====================================
   響應式設計 - 平板
   ==================================== */
@media (max-width: 1024px) and (min-width: 768px) {
    .hero-section {
        padding: 6rem 2rem;
        min-height: 700px;
    }
    
    .hero-logo {
        width: 160px;
        height: 160px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
        max-width: 600px;
    }
    
    .btn-hero {
        font-size: 1.1rem;
        min-width: 160px;
    }
}

/* ====================================
   響應式設計 - 手機
   ==================================== */
@media (max-width: 767px) {
    .hero-section {
        padding: 5rem 1.5rem;
        min-height: 650px;
        border-radius: 0 0 30px 30px;
        margin-bottom: 2rem;
    }
    
    .hero-logo {
        width: 120px;
        height: 120px;
        border: 4px solid white;
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
        text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        max-width: 100%;
        padding: 0 1rem;
        line-height: 1.6;
    }
    
    .hero-subtitle br {
        display: block;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .btn-hero {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
        min-width: 200px;
        width: 100%;
        max-width: 280px;
    }
}

/* ====================================
   動畫效果
   ==================================== */
@keyframes float {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-15px); 
    }
}

@keyframes fadeInDown {
    from { 
        opacity: 0; 
        transform: translateY(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ====================================
   關於我們頁面專用樣式
   ==================================== */
.about-article {
    transition: var(--transition-smooth);
}

.about-article:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

/* ====================================
   新聞頁面專用樣式 - 列表設計
   ==================================== */
.news-header {
    position: relative;
    overflow: hidden;
}

/* 統計橫幅 */
.news-stats-banner {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #B0E0F5 0%, #87CEEB 100%);
    border-radius: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    animation: fadeInDown 0.8s ease;
}

.stats-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.badge-number {
    font-size: 4rem;
    font-weight: 800;
    color: #FF914D;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-text {
    font-size: 2rem;
    color: #1E3A5F;
    font-weight: 700;
}

.stats-subtitle {
    font-size: 1.1rem;
    color: #2E4A6F;
    margin: 0;
    opacity: 0.9;
}

/* 新聞列表區域 */
.news-list-section {
    position: relative;
    margin-bottom: 4rem;
}

/* 新聞文章容器 */
.news-articles {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* 新聞文章卡片 */
.news-article {
    opacity: 0;
    animation: articleSlideIn 0.5s ease forwards;
    animation-delay: var(--article-delay, 0s);
}

@keyframes articleSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.article-link {
    display: block;
    background: white;
    border-radius: 18px;
    padding: 1.8rem 2rem;
    text-decoration: none;
    border: 2px solid rgba(135, 206, 235, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

/* 編號標籤 */
.article-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #87CEEB, #5CADDB);
    color: white;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(135, 206, 235, 0.3);
}

.badge-hash {
    opacity: 0.8;
    margin-right: 2px;
}

/* 媒體資訊 */
.article-media {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.media-icon {
    font-size: 2rem;
    display: inline-block;
}

.media-name {
    font-size: 1.1rem;
    color: #1E3A5F;
    font-weight: 600;
}

/* 報導標題 */
.article-title {
    font-size: 1.3rem;
    color: #1E3A5F;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    transition: color 0.3s ease;
}

/* 底部資訊 */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px dashed rgba(135, 206, 235, 0.3);
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #666;
}

.article-date i {
    color: #87CEEB;
}

.article-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #87CEEB;
    font-weight: 600;
    transition: all 0.3s ease;
}

.article-action i {
    transition: transform 0.3s ease;
}

/* Hover 裝飾線 */
.article-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #87CEEB 0%, #5CADDB 50%, #87CEEB 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* Hover 效果 */
.article-link:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(135, 206, 235, 0.25);
    border-color: #87CEEB;
}

.article-link:hover .article-title {
    color: #FF914D;
}

.article-link:hover .article-action {
    color: #FF914D;
}

.article-link:hover .article-action i {
    transform: translateX(5px);
}

.article-link:hover .article-highlight {
    transform: scaleX(1);
}

/* 底部感謝區塊 */
.news-thanks-section {
    text-align: center;
    padding: 3rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, #1E3A5F, #0E2A4F);
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    color: white;
}

.thanks-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.thanks-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.thanks-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.95;
}

/* 響應式設計 */
@media (max-width: 767px) {
    .news-stats-banner {
        padding: 2rem 1.5rem;
        margin-bottom: 2.5rem;
    }
    
    .badge-number {
        font-size: 3rem;
    }
    
    .badge-text {
        font-size: 1.5rem;
    }
    
    .stats-subtitle {
        font-size: 1rem;
    }
    
    .news-articles {
        gap: 1rem;
    }
    
    .article-link {
        padding: 1.5rem 1.2rem;
    }
    
    .article-badge {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }
    
    .media-icon {
        font-size: 1.8rem;
    }
    
    .media-name {
        font-size: 1rem;
    }
    
    .article-title {
        font-size: 1.15rem;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .article-date,
    .article-action {
        font-size: 0.9rem;
    }
    
    .thanks-title {
        font-size: 1.5rem;
    }
    
    .thanks-desc {
        font-size: 1rem;
    }
}

/* ====================================
   聯絡頁面專用樣式
   ==================================== */
.contact-card {
    animation: slideInUp 0.6s ease forwards;
    animation-delay: calc(var(--index) * 0.2s);
    opacity: 0;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.social-btn:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: translateY(-3px);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   水族展示頁面專用樣式
   ==================================== */
/* 篩選按鈕懸停效果 */
.filter-btn:hover {
    background: var(--primary-light) !important;
    color: white !important;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color) !important;
    color: white !important;
}

/* 品種卡片進入動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.species-card {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: calc(var(--index, 0) * 0.05s);
}

/* 圖片載入優化 */
.lazy-image {
    will-change: opacity;
}

.lazy-image.loaded {
    opacity: 1 !important;
}

/* 小型載入動畫（用於圖片） */
.spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(135, 206, 235, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.image-loader {
    pointer-events: none;
}

/* 圖片懸停效果優化 */
.image-thumbnail-wrapper:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.image-thumbnail-wrapper img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ====================================
   水族展示頁面 - 搜尋與篩選區域
   ==================================== */
.search-filter-section {
    margin-bottom: 2.5rem;
}

/* 搜尋框樣式 */
.search-box {
    margin-bottom: 1.5rem;
}

.search-box-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

#speciesSearch {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid var(--primary-light);
    border-radius: 50px;
    font-size: 1rem;
    background: var(--background-light);
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

#speciesSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

#clearSearch {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    padding: 0.5rem;
    line-height: 1;
    transition: var(--transition);
}

/* 分類篩選區域 */
.filter-section {
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.filter-section h3 {
    margin-bottom: 1.2rem;
    color: var(--secondary-color);
    text-align: center;
    font-size: 1.3rem;
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.filter-btn {
    padding: 1rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.filter-btn span {
    position: relative;
    z-index: 1;
}

.filter-btn.category-all {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-brand));
    color: white;
}

.filter-btn:not(.active) {
    background: var(--background-color);
    color: var(--text-color);
    border: 2px solid var(--primary-light);
}

.category-count {
    font-size: 0.85rem;
    margin-left: 0.3rem;
}

.filter-btn:not(.active) .category-count {
    opacity: 0.7;
}

.filter-btn.active .category-count {
    opacity: 0.9;
}

/* 品種網格 */
.aquarium-species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 品種卡片顯示/隱藏動畫 */
.species-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.species-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* 載入與提示區域 */
.loading-indicator {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    gap: 1rem;
}

.loading-indicator p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.all-loaded {
    display: none;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 20px;
    color: white;
    margin: 2rem 0;
}

.all-loaded p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#loadMoreContainer {
    text-align: center;
    margin: 2rem 0;
    display: none;
}

#loadMoreBtn {
    padding: 1rem 3rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-brand));
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

#noResults {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--background-light);
    border-radius: 20px;
    margin: 2rem 0;
}

#noResults p {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

#noResults small {
    color: var(--text-light);
    font-size: 1rem;
}

/* 清除搜尋按鈕 hover */
#clearSearch:hover {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.2);
}

/* 裝飾元素定位 */
.page-header .fish-small-decoration {
    position: absolute;
}

.page-header .fish-small-decoration:nth-of-type(1) {
    top: 20%;
    left: 8%;
}

.page-header .fish-small-decoration:nth-of-type(2) {
    top: 50%;
    right: 12%;
    animation-delay: -5s;
}

.page-header .bubbles-small-decoration {
    position: absolute;
    top: 10%;
    right: 5%;
}

.aquarium-container {
    position: relative;
}

.aquarium-container .starfish-decoration {
    position: absolute;
    top: 100px;
    right: 2%;
}

.aquarium-container .shell-decoration {
    position: absolute;
    top: 300px;
    left: 3%;
}


/* 頁面標題內容 */
.page-header .container {
    position: relative;
    z-index: 1;
}

/* 無品種提示 */
.no-species-message {
    text-align: center;
    padding: 4rem 2rem;
}

.no-species-message .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-species-message p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* 無結果訊息內部樣式 */
#noResults .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#noResults h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

#noResults .message {
    color: var(--text-light);
}

/* 載入指示器內部 */
.loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .filter-buttons {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }
    
    .filter-btn {
        padding: 0.8rem !important;
        font-size: 0.9rem !important;
    }
    
    .species-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    .filter-buttons {
        grid-template-columns: 1fr !important;
    }
    
    #speciesSearch {
        font-size: 0.9rem !important;
        padding: 0.8rem 2.5rem 0.8rem 1rem !important;
    }
    
    .species-grid {
        grid-template-columns: 1fr !important;
    }
}
