:root {
  --bg-main: #06090e;
  --bg-card: #0f141f;
  --bg-card-hover: #151d2c;
  --gold-primary: #e5b95c;
  --gold-hover: #f3ce7a;
  --gold-gradient: linear-gradient(135deg, #e5b95c 0%, #aa8010 100%);
  --gold-border: rgba(229, 185, 92, 0.25);
  --text-main: #f8fafc;
  --text-muted: #8e9bb0;
  --badge-green: #10b981;
  --badge-orange: #f59e0b;
  --border-subtle: #1c2433;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: var(--bg-main); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; line-height: 1.5; overflow-x: hidden; scroll-behavior: smooth; }

/* 頂部導航 */
.site-header { background: rgba(6, 9, 14, 0.95); border-bottom: 1px solid var(--border-subtle); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); }
.header-inner { max-width: 1300px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.logo-box { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { width: 38px; height: 38px; }
.logo-text h1 { font-size: 20px; font-weight: 800; color: var(--gold-primary); letter-spacing: 2px; }
.logo-text span { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; display: block; }
.main-nav { display: flex; gap: 24px; }
.main-nav a { color: var(--text-main); text-decoration: none; font-size: 14px; transition: color 0.2s; font-weight: 500; }
.main-nav a:hover, .main-nav a.active { color: var(--gold-primary); }
.header-actions { display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 16px; cursor: pointer; }
.header-actions span:hover { color: var(--gold-primary); }

.search-input-header { background: #0b0f19; border: 1px solid var(--border-subtle); color: #fff; padding: 6px 12px; border-radius: 20px; font-size: 12px; width: 140px; transition: width 0.3s, border-color 0.3s; }
.search-input-header:focus { width: 220px; border-color: var(--gold-primary); outline: none; }

/* 容器 */
.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero-section { position: relative; padding: 70px 0 90px; overflow: hidden; }
.hero-wrapper { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.hero-content { max-width: 580px; }
.hero-title { font-size: 48px; font-weight: 900; color: var(--gold-primary); letter-spacing: 4px; margin-bottom: 4px; }
.hero-subtitle { font-family: "Georgia", serif; font-style: italic; font-size: 22px; color: #f5e7b2; margin-bottom: 12px; }
.hero-desc { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 24px; }
.hero-badges { display: flex; gap: 16px; margin-bottom: 36px; }
.h-badge { display: flex; align-items: center; gap: 6px; background: rgba(229,185,92,0.1); border: 1px solid var(--gold-border); padding: 6px 14px; border-radius: 20px; font-size: 12px; color: var(--gold-primary); }
.hero-buttons { display: flex; gap: 16px; }
.btn-primary { background: var(--gold-gradient); color: #000; border: none; padding: 12px 28px; border-radius: 6px; font-size: 14px; font-weight: bold; cursor: pointer; transition: opacity 0.2s; text-decoration: none; display: inline-block; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: rgba(15,20,31,0.8); color: #fff; border: 1px solid var(--border-subtle); padding: 12px 28px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; text-decoration: none; display: inline-block; }
.btn-secondary:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.hero-image-wrap { flex: 1; max-width: 600px; display: flex; justify-content: flex-end; }
.hero-image-wrap img { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.8)); }

/* 六大分類導航卡 */
.category-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 60px; }
.cat-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 14px 12px; text-align: center; text-decoration: none; color: inherit; transition: all 0.25s ease; cursor: pointer; }
.cat-card:hover { transform: translateY(-4px); border-color: var(--gold-primary); }
.cat-title { font-size: 14px; font-weight: bold; color: #fff; margin-bottom: 4px; }
.cat-subtitle { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.cat-img-box { height: 75px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; background: #000; }
.cat-img-box img { width: 100%; height: 100%; object-fit: cover; }
.stars { color: #f59e0b; font-size: 14px; margin-top: 24px; }

/* 雙欄主展示區 */
.main-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-bottom: 80px; }
.section-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sec-title { font-size: 22px; font-weight: 800; color: #fff; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-select { background: #0b0f19; border: 1px solid var(--border-subtle); color: var(--text-main); font-size: 12px; padding: 6px 12px; border-radius: 6px; outline: none; cursor: pointer; }
.filter-select:focus { border-color: var(--gold-primary); }

.grid-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-height: 850px; overflow-y: auto; padding-right: 4px; }
.grid-showcase::-webkit-scrollbar { width: 6px; }
.grid-showcase::-webkit-scrollbar-thumb { background: #1c2433; border-radius: 3px; }

.ray-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; transition: all 0.2s; }
.ray-card:hover, .ray-card.selected { border-color: var(--gold-primary); transform: scale(1.02); }
.card-thumb { width: 100%; height: 140px; background: #000; position: relative; }
.card-thumb img, .card-thumb video { width: 100%; height: 100%; object-fit: cover; }
.status-pill { position: absolute; top: 8px; left: 8px; font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: bold; }
.pill-avail { background: var(--badge-green); color: #000; }
.pill-reserved { background: var(--badge-orange); color: #000; }
.fav-btn { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
.fav-btn:hover { transform: scale(1.2); }
.fav-btn.active { color: #ef4444; }
.card-info { padding: 12px; }
.ray-name { font-size: 14px; font-weight: bold; color: #fff; margin-bottom: 2px; }
.ray-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.ray-price { font-size: 14px; font-weight: bold; color: var(--gold-primary); }

/* 右側個體詳情與血統樹 */
.detail-box { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 24px; position: sticky; top: 80px; }
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.detail-header { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.gallery-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 20px; }
.main-preview { height: 240px; background: #000; border-radius: 8px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.main-preview img, .main-preview video { width: 100%; height: 100%; object-fit: cover; }
.preview-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.p-thumb { flex: 1; height: 50px; background: #000; border-radius: 4px; overflow: hidden; border: 1px solid var(--border-subtle); cursor: pointer; position: relative; }
.p-thumb.active { border-color: var(--gold-primary); }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-video-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 14px; color: var(--gold-primary); }

.spec-table { width: 100%; font-size: 13px; border-collapse: collapse; margin-bottom: 16px; }
.spec-table td { padding: 5px 0; }
.spec-table td:first-child { color: var(--text-muted); width: 38%; }
.spec-price { font-size: 20px; font-weight: bold; color: var(--gold-primary); }

.detail-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-line { background: #06c755; color: #fff; font-weight: bold; text-align: center; padding: 10px; border-radius: 6px; text-decoration: none; font-size: 13px; display: block; transition: opacity 0.2s; }
.btn-line:hover { opacity: 0.9; }
.btn-outline { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-main); padding: 8px; border-radius: 6px; font-size: 12px; cursor: pointer; text-align: center; transition: all 0.2s; }
.btn-outline:hover { border-color: var(--gold-primary); color: var(--gold-primary); }

/* Tab 分頁與血統樹切換 */
.tabs-header { display: flex; border-bottom: 1px solid var(--border-subtle); gap: 20px; margin-bottom: 16px; margin-top: 16px; }
.tab-btn { background: none; border: none; color: var(--text-muted); font-size: 13px; padding: 8px 0; cursor: pointer; position: relative; }
.tab-btn.active { color: var(--gold-primary); font-weight: bold; }
.tab-btn.active::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--gold-primary); }
.tab-content-panel { display: none; min-height: 140px; font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.tab-content-panel.active { display: block; }

/* 樹狀族譜圖 */
.tree-container { background: #070a10; border: 1px solid var(--border-subtle); border-radius: 8px; padding: 20px; position: relative; display: flex; align-items: center; justify-content: center; gap: 20px; }
.tree-node { text-align: center; }
.tree-card { width: 110px; background: var(--bg-card); border: 1px solid var(--gold-border); border-radius: 6px; padding: 6px; font-size: 11px; }
.tree-card img { width: 100%; height: 60px; object-fit: cover; border-radius: 4px; margin-top: 4px; }
.tree-label { color: var(--gold-primary); font-weight: bold; margin-bottom: 4px; font-size: 11px; }
.tree-lines { flex: 1; height: 2px; background: #334155; }

/* 保障 Bar */
.guarantee-bar { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 30px 40px; display: flex; justify-content: space-between; margin-bottom: 70px; }
.g-item { display: flex; align-items: center; gap: 14px; }
.g-icon { width: 42px; height: 42px; border: 1px solid var(--gold-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gold-primary); font-size: 18px; }
.g-text h4 { font-size: 15px; color: #fff; margin-bottom: 2px; }
.g-text p { font-size: 12px; color: var(--text-muted); }

/* 養殖場環境介紹區塊 */
.farm-section { margin-bottom: 80px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 36px; display: flex; align-items: center; gap: 40px; }
.farm-text { flex: 1; }
.farm-text h3 { font-size: 24px; color: var(--gold-primary); margin-bottom: 12px; }
.farm-text p { color: var(--text-muted); font-size: 14px; line-height: 1.8; margin-bottom: 14px; }
.farm-img { width: 320px; border-radius: 12px; border: 1px solid var(--card-border); }

/* 頁尾 */
.site-footer { background: #030508; border-top: 1px solid var(--border-subtle); padding: 60px 0 30px; font-size: 13px; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr 1.2fr; gap: 30px; margin-bottom: 40px; }
.footer-logo h3 { color: var(--gold-primary); font-size: 18px; margin-bottom: 12px; }
.footer-links h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold-primary); }
.qr-box { text-align: center; border: 1px solid var(--border-subtle); padding: 14px; border-radius: 8px; background: #0a0e17; }
.qr-box img { width: 100px; height: 100px; margin-bottom: 8px; }
.copyright { text-align: center; border-top: 1px solid #141b29; padding-top: 24px; font-size: 12px; }

/* 預約賞魚 Modal 彈窗 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 200; justify-content: center; align-items: center; backdrop-filter: blur(6px); }
.modal { background: #151d2c; border: 1px solid var(--gold-primary); padding: 32px; border-radius: 14px; width: 92%; max-width: 440px; box-shadow: 0 15px 40px rgba(0,0,0,0.8); }
.modal h2 { color: var(--gold-primary); font-size: 20px; margin-bottom: 8px; }
.modal p { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; }
.modal input { width: 100%; padding: 11px 14px; background: #0b0f19; border: 1px solid #334155; border-radius: 6px; color: #fff; margin-bottom: 12px; box-sizing: border-box; font-size: 14px; }
.modal input:focus { border-color: var(--gold-primary); outline: none; }
.modal-btns { display: flex; gap: 12px; margin-top: 14px; }

@media (max-width: 1024px) {
  .category-cards { grid-template-columns: repeat(3, 1fr); }
  .main-showcase { grid-template-columns: 1fr; }
  .detail-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero-wrapper { flex-direction: column; text-align: center; }
  .hero-buttons { justify-content: center; }
  .category-cards { grid-template-columns: repeat(2, 1fr); }
  .guarantee-bar { flex-direction: column; gap: 20px; }
  .farm-section { flex-direction: column; }
  .farm-img { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
