/* 
 * 英雄協會 - 主視覺樣式表 (main.css)
 * 設計風格：優雅奢華與現代極簡的融合。使用象牙白與香檳色作為基調，搭配細膩的金屬色系（金色、古銅色）框線與漸層。
 * 強調視覺層次感、柔和的陰影效果，以及流暢的微互動體驗，營造出一種高質感且內斂的「英雄」氣息。
 */

:root {
    /* 顏色變數 */
    --color-ivory: #FFFBF7;
    --color-champagne: #F8F5F0;
    --color-navy: #1A2332;
    --color-gold: #D4AF37;
    --color-gold-light: #F8ECC0;
    --color-bronze: #9E9877;
    --color-text-dark: #2D2D2D;
    --color-text-muted: #8A8A8A;
    --color-border: #E8E3DC;
    --color-white: #FFFFFF;
    
    /* 漸層變數 */
    --bg-gradient: linear-gradient(135deg, var(--color-ivory) 0%, var(--color-champagne) 100%);
    --gold-gradient: linear-gradient(135deg, var(--color-gold) 0%, #B8860B 100%);
    --bronze-gradient: linear-gradient(135deg, var(--color-bronze) 0%, #7A7459 100%);
    --line-gradient: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    
    /* 陰影與動畫變數 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-gold: 0 4px 12px rgba(212, 175, 55, 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全域基礎樣式 */
body { background: var(--bg-gradient); color: var(--color-text-dark); font-family: 'Noto Sans TC', sans-serif; margin: 0; padding: 0; line-height: 1.8; }
.section-top { height: 80px; }
.container-threads { max-width: 1100px; margin: 0 auto; padding: 40px 20px; position: relative; z-index: 1; }

/* 區塊標題 - 使用更高權重確保覆蓋 mainnav.css */
body .section-title { font-size: 32px !important; font-weight: 300 !important; color: var(--color-navy) !important; margin-bottom: 40px !important; text-align: center !important; position: relative !important; letter-spacing: 3px !important; text-shadow: none !important; padding-bottom: 0 !important; border-bottom: none !important; }
body .section-title::after { content: '' !important; display: block !important; width: 60px !important; height: 3px !important; background: var(--color-gold) !important; margin: 15px auto 0 !important; border-radius: 0 !important; position: static !important; transform: none !important; }

/* 文章與區塊卡片 */
.hero-section, .unity-section, .article-card, .group-item, .card, .principle-card { background: var(--color-white); border-radius: 20px; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 40px; transition: var(--transition-smooth); position: relative; overflow: hidden; }
.hero-section:hover, .article-card:hover, .group-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--color-gold-light); }

/* 文字強調 */
.hero-description { font-size: 19px; color: var(--color-text-dark); border-left: 5px solid var(--color-gold); padding: 5px 0 5px 25px; margin-bottom: 35px; font-weight: 300; }
.hero-highlight { background: rgba(255, 255, 255, 0.5); border: 1px solid var(--color-gold-light); border-radius: 12px; padding: 24px; margin-bottom: 24px; color: var(--color-text-dark); font-size: 15px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.hero-highlight strong { color: var(--color-gold); display: block; margin-bottom: 12px; font-size: 18px; font-weight: 600; }
.hero-highlight li { margin-bottom: 8px; }

/* 表格樣式優化 */
.table-container { border-radius: 20px; overflow: hidden; border: 1px solid var(--color-border); background: var(--color-white); box-shadow: var(--shadow-md); margin-bottom: 50px; }
.table-threads { width: 100%; border-collapse: collapse; margin: 0; background: white; }
.table-threads thead th { background: var(--color-navy) !important; color: var(--color-ivory) !important; font-weight: 500 !important; padding: 22px 15px !important; text-align: center !important; border: none !important; font-size: 13px !important; text-transform: uppercase !important; letter-spacing: 2px !important; }
.table-threads td { padding: 20px 15px; border-bottom: 1px solid var(--color-champagne); vertical-align: middle; text-align: center; font-size: 15px; color: var(--color-text-dark); }
.table-threads tr:last-child td { border-bottom: none; }
.table-threads tr:nth-child(even) { background-color: rgba(248, 245, 240, 0.4); }
.table-threads tr:hover td { background-color: var(--color-gold-light) !important; color: var(--color-navy); transition: all 0.2s ease; }
.cell-left { text-align: left !important; padding-left: 25px !important; }

/* 按鈕樣式 */
.goto-btn, .copy-btn, .group-link, .btn-prompt { display: inline-flex; align-items: center; justify-content: center; padding: 10px 24px; border-radius: 50px; border: 1px solid var(--color-gold); background: white; color: var(--color-gold); font-size: 13px; font-weight: 600; text-decoration: none; transition: var(--transition-smooth); cursor: pointer; letter-spacing: 1px; }
.goto-btn:hover, .copy-btn:hover, .group-link:hover { background: var(--gold-gradient); color: white; border-color: transparent; box-shadow: var(--shadow-gold); transform: translateY(-2px); }
.btn-prompt-play { background: var(--gold-gradient); color: white; border: none; padding: 12px 30px; }
.btn-prompt-play:hover { opacity: 0.9; transform: scale(1.05); box-shadow: var(--shadow-gold); }
.btn-prompt-skip { background: transparent; color: var(--color-text-muted); border: 1px solid var(--color-border); margin-left: 10px; }

/* 下拉標記與徽章 */
.table-type-badge { padding: 5px 14px; border-radius: 50px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; display: inline-block; }
.table-type-badge.website { background: #E1F5FE; color: #0288D1; }
.table-type-badge.platform { background: #E8F5E9; color: #2E7D32; }
.table-type-badge.page { background: #FFF3E0; color: #E65100; }

/* 音樂提示條 - 移除灰色，改為奢華香檳金漸層 */
.music-prompt-banner { background: linear-gradient(135deg, #FFFDFB 0%, var(--color-champagne) 100%); border: 2px solid var(--color-gold); border-radius: 100px; padding: 18px 40px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 50px; box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15); animation: slideDown 1s cubic-bezier(0.16, 1, 0.3, 1); border-left: 8px solid var(--color-gold); }
.music-prompt-text { display: flex; align-items: center; gap: 15px; font-size: 17px; color: var(--color-navy); font-weight: 600; }
.music-prompt-text i { font-size: 24px; color: var(--color-gold); filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.3)); }

/* 社群連結項 - 參考 main2.css 改為垂直列表排列 */
.group-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 50px; }
.group-item { display: flex; align-items: center; padding: 20px 30px; margin-bottom: 0; background: white; border: 1px solid var(--color-border); border-radius: 15px; transition: var(--transition-smooth); }
.group-item:hover { transform: translateX(8px); box-shadow: var(--shadow-md); border-color: var(--color-gold); }
.group-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--color-champagne); flex-shrink: 0; margin-right: 20px; transition: var(--transition-smooth); }
.group-item:hover .group-icon { transform: rotate(5deg) scale(1.1); }
.icon-tg { color: #0088cc !important; }
.icon-line { color: #00b900 !important; }
.icon-fb { color: #1877f2 !important; }
.group-content { flex: 1; }
.group-name { font-size: 18px; font-weight: 600; color: var(--color-navy); margin-bottom: 4px; }
.group-description { font-size: 14px; color: var(--color-text-muted); line-height: 1.5; }
.group-link { margin-left: auto; flex-shrink: 0; }

/* 導覽規則區塊 - 加入更明顯的旋轉漸層背景動畫與金色流光 */
.unity-section { background: var(--color-navy); color: var(--color-ivory); border: 2px solid var(--color-gold); padding: 40px; border-radius: 20px; position: relative; overflow: hidden; background: linear-gradient(135deg, #1A2332 0%, #2D1A05 50%, #0D131D 100%); box-shadow: inset 0 0 50px rgba(212, 175, 55, 0.15), var(--shadow-lg); }
.unity-section::before { content: ''; position: absolute; top: -50%; right: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%); animation: rotate-bg 10s linear infinite; pointer-events: none; z-index: 0; }
.unity-section::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent); animation: shine-gold 4s infinite linear; z-index: 1; pointer-events: none; }
@keyframes rotate-bg { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shine-gold { 0% { left: -100%; } 100% { left: 200%; } }
.unity-title { font-size: 26px; font-weight: 600; margin-bottom: 25px; color: #FFD700; display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--color-gold); padding-bottom: 15px; position: relative; z-index: 2; text-shadow: 0 0 15px rgba(212, 175, 55, 0.6); }
.unity-content { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 2; }
.unity-item { display: flex; align-items: center; gap: 12px; font-size: 17px; color: rgba(255,251,247,1); transition: var(--transition-smooth); font-weight: 400; }
.unity-item:hover { transform: translateX(12px); color: #FFD700; text-shadow: 0 0 8px rgba(212, 175, 55, 0.4); }
.unity-item i { color: #FFD700; font-size: 20px; filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5)); }

/* 手風琴優化 */
.custom-accordion .accordion-item { border: 1px solid var(--color-border); border-radius: 15px !important; margin-bottom: 20px; overflow: hidden; background: white; box-shadow: var(--shadow-sm); }
.custom-accordion .accordion-button { background: white; color: var(--color-navy); font-weight: 600; border: none; padding: 25px; font-size: 18px; }
.custom-accordion .accordion-button:not(.collapsed) { background: var(--color-ivory); color: var(--color-gold); box-shadow: inset 0 -1px 0 var(--color-border); }
.custom-accordion .accordion-body { padding: 30px; background: #FFFDFB; }

/* 最新文章區塊樣式優化 */
.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; margin-bottom: 50px; }
.article-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: 20px; padding: 25px; transition: var(--transition-smooth); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.article-title { font-weight: 700; font-size: 18px; color: var(--color-navy) !important; line-height: 1.5; margin-bottom: 5px; }
.article-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--color-champagne); }
.article-meta { display: flex; gap: 15px; font-size: 13px; color: var(--color-text-muted); }
.article-meta span i { margin-right: 5px; color: var(--color-gold); }
.article-link { color: var(--color-gold) !important; font-weight: 600; text-decoration: none; font-size: 14px; transition: var(--transition-smooth); display: flex; align-items: center; gap: 5px; }
.article-link:hover { transform: translateX(5px); color: #B8860B !important; }

/* 頁尾樣式 - 參考 main2.css 優化 排版 (左右對稱) */
.footer { border-top: 1px solid var(--color-border); padding: 40px 0 100px; background: var(--color-champagne); color: var(--color-text-muted); margin-top: 80px; position: relative; }
.footer::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: var(--line-gradient); }
.footer-top { margin-bottom: 15px; text-align: center; font-size: 14px; color: var(--color-navy); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-left { font-size: 13px; line-height: 1.6; }
.footer-right { display: flex; gap: 25px; align-items: center; }
.footer-right a { font-size: 14px; color: var(--color-text-muted); text-decoration: none; transition: var(--transition-smooth); font-weight: 500; }
.footer-right a:hover { color: var(--color-gold); text-decoration: underline; }
.visitor-link { color: var(--color-navy); text-decoration: none; font-weight: 600; }
.visitor-link:hover { text-decoration: underline; color: var(--color-gold); }

/* 響應式優化 */
@media (max-width: 768px) {
    body .section-title { font-size: 26px !important; letter-spacing: 1px !important; }
    .hero-section, .article-card, .group-item { padding: 25px; }
    .music-prompt-banner { border-radius: 30px; padding: 20px; }
    .music-prompt-text { font-size: 15px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-right { justify-content: center; width: 100%; }
}


/* 音樂區塊特效 */
.waveform-wrapper { background: #080815; border-radius: 24px; padding: 12px; border: 2px solid var(--color-gold); box-shadow: var(--shadow-lg), inset 0 0 20px rgba(212, 175, 55, 0.1); overflow: hidden; position: relative; }
.story-playlist.card { border-color: var(--color-gold); background: #1a2332; color: white; margin-top: 120px !important; box-shadow: var(--shadow-lg); }
.story-playlist .card-header { background: var(--gold-gradient); border: none; font-weight: 600; padding: 15px 20px; }
.list-group-item { background: transparent !important; color: #A0A0C0 !important; border-color: rgba(255,255,255,0.05) !important; padding: 12px 20px !important; transition: all 0.2s ease; }
.list-group-item:hover { background: rgba(212, 175, 55, 0.1) !important; color: white !important; }
.list-group-item.active { background: var(--color-gold) !important; color: white !important; border-color: var(--color-gold) !important; font-weight: 600; }

.waveform-controls-overlay .wave-btn { background: rgba(26, 35, 50, 0.6) !important; border: 1px solid rgba(212, 175, 55, 0.4) !important; width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; }
.waveform-controls-overlay .wave-btn.active { background: var(--color-gold) !important; border-color: var(--color-gold) !important; }


/* ----- 回到頂端按鈕相關樣式 ----- */
.floating-buttons { position: fixed; bottom: 80px; right: 2rem; display: flex; flex-direction: column; gap: 1rem; z-index: 1000; }
.btn-floating { width: 50px; height: 50px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; cursor: pointer; transition: var(--transition-smooth); box-shadow: var(--shadow-lg); }
.btn-scroll-top { background: var(--gold-gradient); color: var(--color-white); opacity: 0; visibility: hidden; transform: translateY(20px); }
.btn-scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.btn-scroll-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-gold); }

/* 人民英雄協會圖片區塊 */
.promo-image-container { text-align: center; margin-bottom: 50px; }
.promo-image-link { display: block; overflow: hidden; border-radius: 20px; border: 2px solid var(--color-gold); box-shadow: var(--shadow-md); transition: var(--transition-smooth); position: relative; max-width: 800px; margin: 0 auto; }
.promo-image-link:hover { transform: translateY(-5px); box-shadow: var(--shadow-gold); border-color: var(--color-gold-light); }
.promo-image { width: 100%; height: auto; display: block; transition: var(--transition-smooth); }
.promo-image-link:hover .promo-image { transform: scale(1.02); }
.promo-caption { margin-top: 15px; font-size: 16px; color: var(--color-text-muted); font-weight: 500; letter-spacing: 1px; }
@media (max-width: 768px) { .promo-image-link { border-radius: 0; border-left: none; border-right: none; max-width: 100%; } }
