/* 由 includes/header.php 抽出（2026-10-23），修改樣式請改這個檔 */
    /* === Header 主體風格 === */
    .site-header {
        display: block;
        background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
        border-bottom: 4px solid #fbbf24;
        position: sticky; top: 0; z-index: 1000;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
        width: 100%;
    }
    
    .header-inner {
        width: 100%; max-width: 100%; margin: 0; padding: 0 20px;
        display: flex; align-items: center; justify-content: space-between; 
        height: 90px; /* 稍微調整高度 */
        box-sizing: border-box;
    }

    /* Logo */
    .logo-link { text-decoration: none; display: flex; align-items: center; gap: 12px; }
    .logo-link picture { display: block; line-height: 0; }
    .site-logo-img {
        height: 70px; width: auto;
        border-radius: 12px;
        border: 2px solid #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        transition: transform 0.2s;
    }
    .site-logo-img:hover { transform: scale(1.05); }
    
    .site-title { 
        font-weight: 900; font-size: 1.4rem; letter-spacing: 1px;
        color: #fff; text-shadow: 2px 2px 0px #0f172a; white-space: nowrap;
    }

    /* 主選單 */
    .main-nav { display: flex; align-items: center; gap: 5px; }
    .nav-link, .nav-dropdown-toggle {
        text-decoration: none; color: rgba(255,255,255,0.9);
        font-weight: 700; font-size: 0.95rem;
        padding: 8px 12px; border-radius: 25px; transition: all 0.2s; 
        border: 2px solid transparent; background: none; cursor: pointer;
        font-family: inherit; white-space: nowrap;
    }
    .nav-link:hover, .nav-dropdown-toggle:hover, .nav-dropdown-toggle.open { 
        background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.3);
    }
    .nav-link.active,
    .nav-dropdown-toggle.active { 
        background: #fff; color: #0284c7; box-shadow: 0 0 10px rgba(255,255,255,0.5); 
    }
    
    /* 強調連結 (揪團) */
    .highlight-link { color: #facc15; border: 2px solid #facc15; }
    .highlight-link:hover, .highlight-link.active { 
        background: #facc15; color: #1e3a8a; 
    }

    .nav-shop-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: #172554 !important;
        background: linear-gradient(135deg, #fde047 0%, #fbbf24 48%, #fb923c 100%) !important;
        border-color: rgba(255,255,255,0.92) !important;
        box-shadow: 0 5px 0 #c2410c, 0 9px 18px rgba(15,23,42,0.24);
        font-weight: 900;
        letter-spacing: 0.01em;
        transform: translateY(-2px);
    }
    .nav-shop-cta:hover,
    .nav-shop-cta.active {
        color: #172554 !important;
        background: linear-gradient(135deg, #fef08a 0%, #facc15 48%, #fb923c 100%) !important;
        border-color: #fff !important;
        box-shadow: 0 6px 0 #9a3412, 0 11px 22px rgba(15,23,42,0.32);
        transform: translateY(-3px) scale(1.02);
    }
    .nav-shop-cta-icon { font-size: 1.08rem; line-height: 1; }
    .nav-shop-cta-badge {
        display: inline-grid;
        place-items: center;
        min-height: 20px;
        padding: 1px 6px;
        border-radius: 999px;
        background: rgba(255,255,255,0.78);
        color: #9a3412;
        font-size: 0.65rem;
        font-weight: 950;
        line-height: 1;
    }

    /* NEW 標籤特效 */
    .badge-new {
        position: absolute; top: -5px; right: -5px;
        background: #ef4444; color: #fff; font-size: 0.6rem;
        padding: 2px 4px; border-radius: 4px; line-height: 1;
        animation: bounce 1s infinite alternate;
        box-shadow: 0 0 5px #ef4444;
    }
    @keyframes bounce { 0% { transform: translateY(0); } 100% { transform: translateY(-3px); } }
    .campaign-nav-badge {
        display:inline-grid; min-width:20px; height:20px; place-items:center; margin:0 3px;
        padding:0 5px; border-radius:999px; background:#fef3c7; color:#92400e;
        font-size:.65rem; font-weight:950; line-height:1;
    }
    .campaign-menu-badge {
        flex:0 0 auto; padding:3px 7px; border-radius:999px; background:#ede9fe; color:#6d28d9;
        font-size:.62rem; font-weight:950; white-space:nowrap;
    }

    /* 下拉選單 */
    .nav-dropdown { position: relative; }
    .nav-dropdown-menu {
        display: none; position: absolute; top: 120%; left: 0;
        background: #fff; border: 2px solid #e2e8f0; border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2); min-width: 180px; padding: 8px;
        z-index: 1001;
    }
    .nav-dropdown-menu.show { display: block; animation: popIn 0.2s; }
    .nav-dropdown-menu a {
        display: block; padding: 10px 15px; color: #334155; text-decoration: none;
        font-size: 0.9rem; font-weight: 700; border-radius: 8px; transition: 0.1s;
    }
    .nav-dropdown-menu a:hover { background: #eff6ff; color: #0284c7; }

    .guide-nav-dropdown .guide-menu-panel {
        width: min(760px, calc(100vw - 32px));
        max-height: min(72vh, 720px);
        overflow-y: auto;
        left: 50%;
        transform: translateX(-50%);
        padding: 12px;
        border: 1px solid rgba(147, 197, 253, 0.7);
        border-radius: 18px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        box-shadow: 0 22px 48px rgba(15, 23, 42, 0.24);
    }
    .guide-nav-dropdown .guide-menu-panel.show {
        animation: guideMenuPop 0.16s ease-out;
    }
    @keyframes guideMenuPop {
        from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
        to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }
    .guide-menu-feature {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 14px 16px !important;
        margin-bottom: 10px;
        border: 1px solid rgba(59, 130, 246, 0.22);
        border-radius: 14px !important;
        background: linear-gradient(135deg, #eff6ff, #fff7ed);
        color: #102a56 !important;
    }
    .guide-menu-feature:hover {
        background: linear-gradient(135deg, #dbeafe, #ffedd5) !important;
        color: #0f4c81 !important;
    }
    .guide-menu-feature-icon {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.82);
        font-size: 1.35rem;
        flex: 0 0 auto;
    }
    .guide-menu-feature strong,
    .guide-menu-feature small {
        display: block;
    }
    .guide-menu-feature strong {
        font-size: 1rem;
        line-height: 1.25;
    }
    .guide-menu-feature small {
        margin-top: 3px;
        color: #5b708b;
        font-size: 0.78rem;
        line-height: 1.45;
        font-weight: 700;
    }
    .guide-menu-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
    .guide-menu-group {
        min-width: 0;
        padding: 10px;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 14px;
        background: rgba(248, 250, 252, 0.86);
    }
    .guide-menu-heading {
        margin: 0 0 6px;
        padding: 0 4px 6px;
        border-bottom: 1px dashed rgba(148, 163, 184, 0.45);
        color: #0f2d5c;
        font-size: 0.82rem;
        font-weight: 900;
        line-height: 1.35;
    }
    .guide-menu-group a {
        padding: 7px 8px !important;
        color: #334155;
        font-size: 0.84rem;
        line-height: 1.25;
        white-space: normal;
    }
    .guide-menu-group a:hover {
        background: #eaf4ff !important;
        color: #075985 !important;
    }

    .utility-nav-dropdown .utility-menu-panel {
        width: min(620px, calc(100vw - 32px));
        max-height: min(72vh, 680px);
        overflow-y: auto;
        padding: 12px;
        border: 1px solid rgba(147, 197, 253, 0.62);
        border-radius: 18px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        box-shadow: 0 22px 48px rgba(15, 23, 42, 0.24);
    }
    .trade-nav-dropdown .utility-menu-panel {
        left: 50%;
        transform: translateX(-50%);
    }
    .community-nav-dropdown .utility-menu-panel {
        left: auto;
        right: 0;
    }
    .utility-nav-dropdown .utility-menu-panel.show {
        animation: utilityMenuFade 0.16s ease-out;
    }
    @keyframes utilityMenuFade {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    .utility-menu-feature {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 14px 16px !important;
        margin-bottom: 10px;
        border: 1px solid rgba(59, 130, 246, 0.22);
        border-radius: 14px !important;
        color: #102a56 !important;
        white-space: normal;
    }
    .utility-menu-feature-gold {
        background: linear-gradient(135deg, #fff7ed, #fef9c3);
    }
    .utility-menu-feature-blue {
        background: linear-gradient(135deg, #eff6ff, #ecfeff);
    }
    .utility-menu-feature:hover {
        background: linear-gradient(135deg, #dbeafe, #ffedd5) !important;
        color: #0f4c81 !important;
    }
    .utility-menu-feature-icon {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.82);
        font-size: 1.35rem;
        flex: 0 0 auto;
    }
    .utility-menu-feature strong,
    .utility-menu-feature small {
        display: block;
    }
    .utility-menu-feature strong {
        font-size: 1rem;
        line-height: 1.25;
    }
    .utility-menu-feature small {
        margin-top: 3px;
        color: #5b708b;
        font-size: 0.78rem;
        line-height: 1.45;
        font-weight: 700;
    }
    .utility-menu-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
    .utility-menu-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .utility-menu-group {
        min-width: 0;
        padding: 10px;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 14px;
        background: rgba(248, 250, 252, 0.86);
    }
    .utility-menu-heading {
        margin: 0 0 6px;
        padding: 0 4px 6px;
        border-bottom: 1px dashed rgba(148, 163, 184, 0.45);
        color: #0f2d5c;
        font-size: 0.82rem;
        font-weight: 900;
        line-height: 1.35;
    }
    .utility-menu-group a {
        padding: 7px 8px !important;
        color: #334155;
        font-size: 0.84rem;
        line-height: 1.25;
        white-space: normal;
    }
    .utility-menu-group a:hover {
        background: #eaf4ff !important;
        color: #075985 !important;
    }
    .badge-raffle.inline {
        position: static;
        display: inline-block;
        margin-left: 6px;
        vertical-align: middle;
    }
    body.dark-mode .guide-nav-dropdown .guide-menu-panel {
        background: linear-gradient(180deg, #172033 0%, #111827 100%);
        border-color: #334155;
    }
    body.dark-mode .guide-menu-feature {
        background: linear-gradient(135deg, #172554, #3b2f12);
        color: #e0f2fe !important;
        border-color: rgba(96, 165, 250, 0.35);
    }
    body.dark-mode .guide-menu-feature small {
        color: #bfdbfe;
    }
    body.dark-mode .guide-menu-group {
        background: rgba(15, 23, 42, 0.72);
        border-color: #334155;
    }
    body.dark-mode .guide-menu-heading {
        color: #dbeafe;
        border-bottom-color: #334155;
    }
    body.dark-mode .utility-nav-dropdown .utility-menu-panel {
        background: linear-gradient(180deg, #172033 0%, #111827 100%);
        border-color: #334155;
    }
    body.dark-mode .utility-menu-feature {
        background: linear-gradient(135deg, #172554, #3b2f12);
        color: #e0f2fe !important;
        border-color: rgba(96, 165, 250, 0.35);
    }
    body.dark-mode .utility-menu-feature small {
        color: #bfdbfe;
    }
    body.dark-mode .utility-menu-group {
        background: rgba(15, 23, 42, 0.72);
        border-color: #334155;
    }
    body.dark-mode .utility-menu-heading {
        color: #dbeafe;
        border-bottom-color: #334155;
    }
    
    /* 使用者按鈕 */
    .nav-user-toggle {
        display: flex; align-items: center; gap: 8px;
        background: rgba(0,0,0,0.3); border: 2px solid rgba(255,255,255,0.3); color: #fff;
        padding: 4px 12px 4px 4px; border-radius: 50px; cursor: pointer; font-weight: 700;
        font-size: 0.9rem; transition: 0.2s; font-family: inherit; position: relative; margin-left: 5px;
    }
    .nav-user-toggle:hover, .nav-user-toggle.open { background: rgba(255,255,255,0.2); border-color: #fff; }
    .nav-campaign-dot {
        position:absolute; top:-5px; right:18px; width:12px; height:12px; border:2px solid #fff;
        border-radius:50%; background:#f59e0b; box-shadow:0 0 0 3px rgba(245,158,11,.24);
        animation:campaignDotPulse 1.7s ease-in-out infinite;
    }
    @keyframes campaignDotPulse { 50% { transform:scale(1.18); box-shadow:0 0 0 6px rgba(245,158,11,0); } }
    .nav-user-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; }

.nav-user-avatar.avatar-gold {
    border-color: #fbbf24;
    box-shadow:
        0 0 0 2px rgba(250, 204, 21, 0.95),
        0 0 14px rgba(250, 204, 21, 0.98),
        0 0 32px rgba(250, 204, 21, 0.85);
    animation: avatarGoldPulse 2.4s ease-in-out infinite;
}
.nav-user-avatar.avatar-diamond {
    border-color: #38bdf8;
    box-shadow:
        0 0 0 2px rgba(56, 189, 248, 0.95),
        0 0 14px rgba(56, 189, 248, 0.98),
        0 0 32px rgba(56, 189, 248, 0.85);
    animation: avatarDiamondPulse 2.4s ease-in-out infinite;
}
.nav-user-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
}
.nav-user-name.name-fire {
    color: #fee2e2;
    text-shadow:
        0 0 4px #fecaca,
        0 0 14px rgba(248, 113, 113, 0.95);
}
.nav-user-name.name-rainbow {
    background: linear-gradient(90deg, #fee2e2, #fef3c7, #bbf7d0, #bfdbfe, #e9d5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    animation: rainbowNameWave 5s linear infinite;
}
.nav-title-badge {
    font-size: 0.8rem;
    margin-left: 2px;
}
    
    .user-menu { right: 0; left: auto; min-width: 240px; }
    .user-menu-section-title {
        padding: 6px 12px 4px;
        color: #64748b;
        font-size: 0.74rem;
        font-weight: 900;
        letter-spacing: 0.04em;
    }
    body.dark-mode .user-menu-section-title { color: #cbd5e1; }
    .menu-divider { height: 1px; background: #f1f5f9; margin: 6px 0; }
    .text-danger { color: #ef4444 !important; }
    .text-danger:hover { background: #fef2f2 !important; }

    .nav-btn-login {
        background: #10b981; color: #fff; padding: 8px 20px; border-radius: 50px;
        text-decoration: none; font-weight: bold; font-size: 0.95rem;
        box-shadow: 0 4px 0 #059669; transition: transform 0.1s; white-space: nowrap;
        border: 2px solid #34d399; margin-left: 5px;
    }
    .nav-btn-login:active { transform: translateY(2px); box-shadow: none; }

    /* 紅點 */
    .unread-badge {
        background: #ef4444; color: white; font-size: 0.7rem; 
        padding: 2px 5px; border-radius: 10px; min-width: 18px; 
        text-align: center; line-height: 1; font-weight: 800;
        box-shadow: 0 2px 4px rgba(0,0,0,0.3); border: 2px solid #fff;
    }
    #nav-unread-badge { position: absolute; top: -5px; right: -5px; }
    
    /* 手機版漢堡按鈕 */
    .nav-toggle { position:relative; display: none; background: none; border: none; cursor: pointer; padding: 5px; flex-direction: column; gap: 5px; }
    .nav-toggle-bar { width: 26px; height: 3px; background: #fff; border-radius: 3px; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
    .nav-toggle-campaign-badge { position:absolute; top:-8px; right:-9px; display:grid; min-width:20px; height:20px; place-items:center; padding:0 5px; border:2px solid #fff; border-radius:999px; background:#f59e0b; color:#172554; font-size:.62rem; font-weight:950; line-height:1; }

    /* RWD: 平板與手機 */
    @media (max-width: 1100px) {
        .header-inner { height: 70px; padding: 0 15px; }
        .site-logo-img { height: 50px; }
        .site-title { display: none; } /* 手機版隱藏文字 */
        
        .nav-toggle { display: flex; }
        .main-nav {
            display: none;
            position: fixed;
            top: 70px; left: 0; right: 0;
            width: 100vw; max-width: 100vw;
            background: #1e293b; flex-direction: column; padding: 16px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3); align-items: stretch;
            border-top: 1px solid rgba(255,255,255,0.1); gap: 10px;
            max-height: calc(100vh - 70px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            box-sizing: border-box;
        }
        .main-nav.open { display: flex; }
        
        .nav-link, .nav-dropdown-toggle { 
            color: #fff; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); 
            border-radius: 0; text-align: left; width: 100%; box-sizing: border-box;
        }
        .nav-link:hover { background: rgba(255,255,255,0.05); }
        .nav-shop-cta {
            position: relative;
            justify-content: center;
            gap: 9px;
            padding: 13px 52px;
            border: 2px solid rgba(255,255,255,0.9);
            border-radius: 14px;
            box-shadow: 0 4px 0 #c2410c, 0 8px 18px rgba(0,0,0,0.25);
            transform: none;
            text-align: center;
        }
        .nav-shop-cta:hover,
        .nav-shop-cta.active { transform: translateY(-1px); }
        .nav-shop-cta-icon {
            position: absolute;
            left: 16px;
        }
        .nav-shop-cta-badge {
            position: absolute;
            right: 14px;
            margin-left: 0;
        }
        
        .nav-dropdown-menu { 
            position: static; box-shadow: none; border: none; 
            padding-left: 20px; margin-top: 0; display: none; 
            background: rgba(0,0,0,0.2); width: 100%; box-sizing: border-box;
        }
        .nav-dropdown-menu.show { display: block; animation: none; }
        .nav-dropdown-menu a { color: #cbd5e1; }
        .guide-nav-dropdown .guide-menu-panel {
            width: 100%;
            max-height: none;
            overflow: visible;
            transform: none;
            padding: 10px;
            border-radius: 14px;
            background: rgba(15, 23, 42, 0.58);
            border: 1px solid rgba(148, 163, 184, 0.22);
        }
        .guide-nav-dropdown .guide-menu-panel.show {
            animation: none;
        }
        .guide-menu-feature {
            padding: 12px !important;
            margin-bottom: 8px;
            background: rgba(37, 99, 235, 0.16);
            border-color: rgba(147, 197, 253, 0.28);
            color: #fff !important;
        }
        .guide-menu-feature small {
            color: #cbd5e1;
        }
        .guide-menu-grid {
            grid-template-columns: 1fr;
            gap: 8px;
        }
        .guide-menu-group {
            padding: 8px;
            background: rgba(255, 255, 255, 0.045);
            border-color: rgba(255, 255, 255, 0.08);
        }
        .guide-menu-heading {
            color: #fff;
            border-bottom-color: rgba(255, 255, 255, 0.12);
        }
        .guide-menu-group a {
            color: #dbeafe !important;
            padding: 9px 10px !important;
        }
        .utility-nav-dropdown .utility-menu-panel {
            width: 100%;
            max-height: none;
            overflow: visible;
            transform: none;
            right: auto;
            padding: 10px;
            border-radius: 14px;
            background: rgba(15, 23, 42, 0.58);
            border: 1px solid rgba(148, 163, 184, 0.22);
        }
        .utility-nav-dropdown .utility-menu-panel.show {
            animation: none;
        }
        .utility-menu-feature {
            padding: 12px !important;
            margin-bottom: 8px;
            background: rgba(37, 99, 235, 0.16);
            border-color: rgba(147, 197, 253, 0.28);
            color: #fff !important;
        }
        .utility-menu-feature small {
            color: #cbd5e1;
        }
        .utility-menu-grid,
        .utility-menu-grid-two {
            grid-template-columns: 1fr;
            gap: 8px;
        }
        .utility-menu-group {
            padding: 8px;
            background: rgba(255, 255, 255, 0.045);
            border-color: rgba(255, 255, 255, 0.08);
        }
        .utility-menu-heading {
            color: #fff;
            border-bottom-color: rgba(255, 255, 255, 0.12);
        }
        .utility-menu-group a {
            color: #dbeafe !important;
            padding: 9px 10px !important;
        }
        
        .nav-user-toggle { justify-content: center; width: 100%; margin-top: 10px; background: rgba(255,255,255,0.1); }
        .nav-btn-login { display: block; text-align: center; margin-top: 15px; margin-left: 0; }
    }

    @media (max-width: 760px) {
        .header-inner { height: 60px; padding: 0 12px; }
        .site-logo-img { height: 43px; }
        .main-nav { top: 60px; max-height: calc(100vh - 60px); }
    }
    
    @media (min-width: 480px) and (max-width: 1100px) {
        .site-title { display: block; font-size: 1rem; }
    }
    @keyframes popIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

    /* 信譽指示燈 */
    .rep-light {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-left: 6px;
        padding: 2px 6px;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 700;
        background: rgba(15,23,42,0.9);
        color: #e5e7eb;
        vertical-align: middle;
        white-space: nowrap;
    }
    .rep-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #9ca3af;
        box-shadow: 0 0 0 2px rgba(148,163,184,0.5);
    }
    .rep-light-good .rep-dot {
        background: #22c55e;
        box-shadow: 0 0 0 2px rgba(34,197,94,0.5);
    }
    .rep-light-good { color: #bbf7d0; }
    .rep-light-warn .rep-dot {
        background: #eab308;
        box-shadow: 0 0 0 2px rgba(234,179,8,0.5);
    }
    .rep-light-warn { color: #fef9c3; }
    .rep-light-bad .rep-dot {
        background: #ef4444;
        box-shadow: 0 0 0 2px rgba(239,68,68,0.5);
    }
    .rep-light-bad { color: #fee2e2; }
    .rep-light-unknown .rep-dot {
        background: #6b7280;
        box-shadow: 0 0 0 2px rgba(107,114,128,0.5);
    }
    .rep-light-unknown { color: #e5e7eb; }

    @media (max-width: 480px) {
        .rep-light {
            padding: 1px 4px;
            font-size: 0.65rem;
        }
        .rep-light .rep-label {
            display: none; /* 手機版保留小圓點＋ tooltip 即可 */
        }
    }
