/* ==========================================================================
   德力科技 Deelie Tech - 全站核心樣式表 (style.css)
   包含：現代科技視覺、問題頁卡片特效、站內閱讀彈窗、右下角智慧客服 (Seasalt.ai + 站內連動)
   ========================================================================== */

:root {
    --deelie-primary: #0284c7;
    --deelie-cyan: #00b4d8;
    --deelie-indigo: #4f46e5;
    --deelie-dark: #0f172a;
    --deelie-gold: #f59e0b;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #0f172a;
    overflow-x: hidden;
}

/* 玻璃擬態導覽與卡片 */
.glass-header {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(2, 132, 199, 0.16);
    border-color: rgba(0, 180, 216, 0.5);
}

/* 頂部下拉選單 */
.nav-dropdown-group:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.22s ease;
}

/* 問題圖卡圖片縮放特效 */
.question-card-img-wrap {
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.question-card-img-wrap img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover .question-card-img-wrap img {
    transform: scale(1.05);
}

/* ==========================================================================
   右下角智慧客服系統 (Seasalt.ai 原生按鈕 + 智慧客服視窗整合)
   ========================================================================== */

/* LINE 懸浮按鈕 (對應原官網 #sui-Line-btn) */
#sui-Line-btn {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    right: 20px;
    bottom: 92px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(6, 199, 85, 0.38);
    border: 2px solid #ffffff;
    z-index: 9997;
    background: 50%/28px no-repeat url(https://seasalt-cdn.s3.us-west-2.amazonaws.com/f2e/icon-line.svg) #06c755;
    background-size: cover;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#sui-Line-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 28px rgba(6, 199, 85, 0.55);
}

/* 右下角智慧客服主按鈕 (對應原官網 #sui-webchat-btn) */
#sui-webchat-btn {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 18px;
    padding: 0;
    background: 50%/28px no-repeat url(https://chat.seasalt.ai/api/v1/conversations/async/config/855d7d6908ca468283c8f79b7f2e3003/webchat_widget_icon?1730099425188) #0044ff;
    background-size: cover;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 10px 28px rgba(0, 68, 255, 0.45);
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#sui-webchat-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 68, 255, 0.65);
}

/* 客服按鈕呼吸燈外圈 */
#sui-webchat-btn::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(0, 180, 216, 0.65);
    animation: suiPulse 2.2s infinite;
    pointer-events: none;
}

@keyframes suiPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.9;
    }

    70% {
        transform: scale(1.22);
        opacity: 0;
    }

    100% {
        transform: scale(1.22);
        opacity: 0;
    }
}

/* 右下角智慧客服提示氣泡 */
#deelie-chat-tooltip {
    position: fixed;
    right: 88px;
    bottom: 28px;
    z-index: 9996;
    background: #ffffff;
    color: #0f172a;
    padding: 10px 16px;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18);
    border: 1px solid #bae6fd;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

#deelie-chat-tooltip:hover {
    border-color: #0284c7;
    transform: translateX(-3px);
}

/* 右下角智慧客服整合視窗 */
#deelie-smart-chat-window {
    position: fixed;
    right: 24px;
    bottom: 92px;
    width: 400px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(14, 165, 233, 0.25);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#deelie-smart-chat-window.active {
    display: flex;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    #deelie-chat-tooltip {
        display: none !important;
    }

    #deelie-smart-chat-window {
        right: 12px;
        left: 12px;
        bottom: 88px;
        width: auto;
        height: 75vh;
    }
}

/* 自訂捲軸美化 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}