/**
 * 北斗數位科技 - 增強視覺效果
 * Enhanced Visual Effects v2.0
 * 
 * 包含：
 * - 進階動畫系統
 * - Ripple 點擊效果
 * - 高級光暈效果
 * - 卡片懸停動效
 * - 滾動視差
 * - 骨架載入
 */

/* ============================================
   進階 CSS 變數擴展
   ============================================ */
:root {
    /* 進階動畫曲線 */
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* 光暈效果顏色 */
    --glow-gold: rgba(255, 193, 7, 0.4);
    --glow-blue: rgba(59, 130, 246, 0.4);
    --glow-cyan: rgba(34, 211, 238, 0.4);
    --glow-purple: rgba(168, 85, 247, 0.4);
    --glow-green: rgba(34, 197, 94, 0.4);
    --glow-red: rgba(239, 68, 68, 0.4);
    
    /* 粒子效果 */
    --particle-color: rgba(255, 193, 7, 0.3);
}

/* ============================================
   Ripple 點擊效果（Material Design 風格）
   ============================================ */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s var(--ease-out-expo), opacity 0.6s;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
}

.btn-ripple:active::after {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 1;
    transition: transform 0s, opacity 0s;
}

/* ============================================
   高級光暈效果卡片
   ============================================ */
.card-glow {
    position: relative;
    z-index: 1;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--primary), 
        var(--accent-blue), 
        var(--accent-purple), 
        var(--primary));
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s var(--ease-smooth);
    filter: blur(8px);
}

.card-glow:hover::before {
    opacity: 0.6;
    animation: gradientRotate 3s linear infinite;
}

@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 金色邊框光暈 */
.card-glow-gold {
    position: relative;
}

.card-glow-gold::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--primary));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
}

.card-glow-gold:hover::before {
    opacity: 1;
}

.card-glow-gold::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    border-radius: inherit;
    z-index: 0;
}

/* ============================================
   進階懸停動效
   ============================================ */
/* 3D 傾斜效果 */
.card-tilt {
    transform-style: preserve-3d;
    transition: transform 0.4s var(--ease-smooth);
}

.card-tilt:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateZ(10px);
}

/* 放大縮小效果 */
.hover-scale {
    transition: transform 0.3s var(--ease-spring);
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* 上浮效果 */
.hover-lift {
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}

.hover-lift:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--glow-gold);
}

/* 邊框動畫 */
.hover-border-animate {
    position: relative;
}

.hover-border-animate::before,
.hover-border-animate::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.4s var(--ease-out-expo);
}

.hover-border-animate::before {
    top: 0;
    left: 0;
}

.hover-border-animate::after {
    bottom: 0;
    right: 0;
}

.hover-border-animate:hover::before,
.hover-border-animate:hover::after {
    width: 100%;
}

/* ============================================
   滾動觸發動畫（Reveal 系統）
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 從左側滑入 */
.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* 從右側滑入 */
.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* 縮放進入 */
.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* 旋轉進入 */
.reveal-rotate {
    opacity: 0;
    transform: rotate(-5deg) translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-rotate.active {
    opacity: 1;
    transform: rotate(0) translateY(0);
}

/* 延遲類別 */
.delay-100 { transition-delay: 0.1s !important; }
.delay-200 { transition-delay: 0.2s !important; }
.delay-300 { transition-delay: 0.3s !important; }
.delay-400 { transition-delay: 0.4s !important; }
.delay-500 { transition-delay: 0.5s !important; }
.delay-600 { transition-delay: 0.6s !important; }
.delay-700 { transition-delay: 0.7s !important; }
.delay-800 { transition-delay: 0.8s !important; }

/* ============================================
   圖標動畫效果
   ============================================ */
/* 脈衝光暈 */
.icon-pulse-glow {
    animation: iconPulseGlow 2s ease-in-out infinite;
}

@keyframes iconPulseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--glow-gold));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 20px var(--glow-gold));
        transform: scale(1.1);
    }
}

/* 旋轉效果 */
.icon-spin-hover {
    transition: transform 0.5s var(--ease-spring);
}

.icon-spin-hover:hover {
    transform: rotate(360deg);
}

/* 彈跳效果 */
.icon-bounce {
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================
   按鈕進階效果
   ============================================ */
/* 漸層邊框按鈕 */
.btn-gradient-border {
    position: relative;
    background: transparent;
    border: none;
    padding: 0.875rem 2rem;
    color: var(--text-primary);
    font-weight: 600;
    border-radius: var(--radius-full);
    z-index: 1;
    overflow: hidden;
}

.btn-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
}

.btn-gradient-border::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-primary);
    border-radius: inherit;
    z-index: -1;
    transition: background 0.3s var(--ease-smooth);
}

.btn-gradient-border:hover::after {
    background: rgba(255, 193, 7, 0.1);
}

/* 發光脈衝按鈕 */
.btn-glow-pulse {
    animation: btnGlowPulse 2.5s ease-in-out infinite;
}

@keyframes btnGlowPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 193, 7, 0.3), 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 6px 30px rgba(255, 193, 7, 0.5), 0 0 0 10px rgba(255, 193, 7, 0);
    }
}

/* 金色填充按鈕 */
.btn-gold {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 50%, #ffc107 100%);
    background-size: 200% auto;
    border: none;
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.35);
    transition: all 0.4s var(--ease-smooth);
}

.btn-gold:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(255, 193, 7, 0.5);
    color: #000;
}

/* ============================================
   表格增強樣式
   ============================================ */
.table-modern {
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-modern thead {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
}

.table-modern thead th {
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--border-accent);
    white-space: nowrap;
}

.table-modern tbody tr {
    transition: all 0.2s var(--ease-smooth);
}

.table-modern tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.table-modern tbody tr:hover {
    background: rgba(255, 193, 7, 0.08);
}

.table-modern tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   表單增強樣式
   ============================================ */
/* 浮動標籤輸入框 */
.form-floating-modern {
    position: relative;
}

.form-floating-modern input,
.form-floating-modern textarea {
    width: 100%;
    padding: 1.25rem 1rem 0.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s var(--ease-smooth);
}

.form-floating-modern label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s var(--ease-spring);
}

.form-floating-modern input:focus,
.form-floating-modern textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15);
    outline: none;
}

.form-floating-modern input:focus + label,
.form-floating-modern input:not(:placeholder-shown) + label,
.form-floating-modern textarea:focus + label,
.form-floating-modern textarea:not(:placeholder-shown) + label {
    top: 0.5rem;
    transform: translateY(0);
    font-size: 0.75rem;
    color: var(--primary);
}

/* 成功/錯誤狀態 */
.form-floating-modern.is-valid input {
    border-color: var(--accent-green);
}

.form-floating-modern.is-invalid input {
    border-color: var(--accent-red);
}

/* ============================================
   骨架載入動畫
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-card) 25%, 
        rgba(255, 255, 255, 0.05) 50%, 
        var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
}

/* ============================================
   價格卡片特效
   ============================================ */
.pricing-card {
    position: relative;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out-expo);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 50px rgba(255, 193, 7, 0.1);
    border-color: var(--border-accent);
}

.pricing-card:hover::before {
    transform: scaleX(1);
}

/* 推薦標籤 */
.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.15);
}

.pricing-card.featured::after {
    content: '推薦';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--gradient-primary);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 2rem;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ============================================
   統計數字動畫
   ============================================ */
.stat-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-counter {
    transition: all 0.5s var(--ease-out-expo);
}

/* ============================================
   服務 Hero 區塊增強
   ============================================ */
.service-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
}

.service-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

/* 服務徽章 */
.service-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-smooth);
}

.service-section-badge:hover {
    transform: translateY(-2px);
}

.service-section-badge i {
    font-size: 0.9rem;
}

/* ============================================
   麵包屑增強
   ============================================ */
.breadcrumb-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}

.breadcrumb-modern a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.breadcrumb-modern a:hover {
    color: var(--primary-light);
}

.breadcrumb-modern .separator {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.breadcrumb-modern .current {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   載入動畫
   ============================================ */
/* 旋轉載入器 */
.loader-spin {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 脈衝點載入器 */
.loader-dots {
    display: flex;
    gap: 8px;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }
.loader-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   文字漸層與特效
   ============================================ */
.text-gradient-gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-shimmer {
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        #fff 25%, 
        var(--primary) 50%, 
        #fff 75%, 
        var(--primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 3s linear infinite;
}

@keyframes shimmerText {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ============================================
   滾動指示器
   ============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: fadeInUp 1s ease-out 1s both;
}

.scroll-indicator::after {
    content: '';
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, var(--primary), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   減少動畫偏好支援
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-rotate {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .btn-ripple::after,
    .card-glow::before,
    .icon-pulse-glow,
    .icon-bounce,
    .btn-glow-pulse,
    .skeleton,
    .loader-spin,
    .loader-dots span,
    .text-gradient-shimmer,
    .scroll-indicator::after {
        animation: none;
    }
    
    .hover-lift:hover,
    .hover-scale:hover,
    .card-tilt:hover {
        transform: none;
    }
}

/* ============================================
   觸控優化
   ============================================ */
@media (hover: none) {
    .card-glow:hover::before,
    .hover-lift:hover,
    .hover-scale:hover,
    .card-tilt:hover {
        transform: none;
        box-shadow: inherit;
    }
    
    .btn-ripple:active {
        transform: scale(0.98);
    }
}

/* ============================================
   服務頁面專用樣式
   ============================================ */

/* 服務 Hero 區塊標準化 */
.service-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: center;
    padding: 5rem 0 4rem;
    overflow: hidden;
}

.service-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 1;
}

.service-hero .container {
    position: relative;
    z-index: 5;
}

/* 服務頁面麵包屑 */
.service-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin-bottom: 1.5rem;
    list-style: none;
    background: transparent;
}

.service-breadcrumb a {
    color: var(--gold, #d4a853);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.service-breadcrumb a:hover {
    color: var(--gold-light, #f5d787);
}

.service-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.3);
}

.service-breadcrumb .current {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* 服務特色徽章 */
.service-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full, 9999px);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary, #9ca3af);
    transition: all 0.3s var(--ease-smooth, ease);
}

.service-feature-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.service-feature-badge i {
    font-size: 0.9rem;
}

/* 方案卡片增強 */
.plan-card {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-2xl, 32px);
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary, linear-gradient(135deg, #ffc107 0%, #ff9800 100%));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out-expo);
}

.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(212, 168, 83, 0.08);
    border-color: rgba(212, 168, 83, 0.2);
}

.plan-card:hover::before {
    transform: scaleX(1);
}

/* 推薦方案高亮 */
.plan-card.recommended {
    border: 2px solid rgba(212, 168, 83, 0.4);
    box-shadow: 0 0 30px rgba(212, 168, 83, 0.15);
}

.plan-card.recommended::after {
    content: '推薦';
    position: absolute;
    top: 1.5rem;
    right: -2rem;
    background: var(--gradient-primary);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 2.5rem;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* 方案價格顯示 */
.plan-price {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.plan-price-suffix {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted, #64748b);
    -webkit-text-fill-color: var(--text-muted);
}

/* 規格列表 */
.spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spec-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary, #9ca3af);
    font-size: 0.95rem;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-list li i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.spec-list li strong {
    color: var(--text-primary, #ffffff);
    font-weight: 600;
}

/* 特色列表（帶勾選） */
.feature-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.9rem;
    line-height: 1.5;
}

.feature-check-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================
   表格增強樣式（全站統一）
   ============================================ */
.table-enhanced {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card, #1a2340);
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-enhanced thead {
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.1) 0%, rgba(212, 168, 83, 0.05) 100%);
}

.table-enhanced thead th {
    padding: 1rem 1.25rem;
    color: var(--text-primary, #ffffff);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(212, 168, 83, 0.2);
    text-align: left;
    white-space: nowrap;
}

.table-enhanced tbody tr {
    transition: all 0.2s var(--ease-smooth);
}

.table-enhanced tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.table-enhanced tbody tr:hover {
    background: rgba(212, 168, 83, 0.08);
}

.table-enhanced tbody td {
    padding: 1rem 1.25rem;
    color: var(--text-secondary, #9ca3af);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.table-enhanced tbody tr:last-child td {
    border-bottom: none;
}

/* 表格響應式 */
@media (max-width: 768px) {
    .table-responsive-enhanced {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-enhanced thead th,
    .table-enhanced tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   表單增強樣式
   ============================================ */
.form-enhanced {
    --input-bg: rgba(30, 41, 59, 0.8);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-border-focus: var(--gold, #d4a853);
    --input-text: var(--text-primary, #ffffff);
    --input-placeholder: var(--text-muted, #64748b);
}

.form-enhanced .form-control,
.form-enhanced .form-select {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--radius-md, 12px);
    color: var(--input-text);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s var(--ease-smooth);
}

.form-enhanced .form-control:focus,
.form-enhanced .form-select:focus {
    background: rgba(30, 41, 59, 1);
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.15);
    outline: none;
}

.form-enhanced .form-control::placeholder {
    color: var(--input-placeholder);
}

.form-enhanced .form-label {
    color: var(--text-secondary, #9ca3af);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-enhanced .form-label .required {
    color: #ef4444;
    font-size: 0.8rem;
}

/* 表單驗證狀態 */
.form-enhanced .form-control.is-valid {
    border-color: #22c55e;
    background-image: none;
}

.form-enhanced .form-control.is-invalid {
    border-color: #ef4444;
    background-image: none;
}

.form-enhanced .invalid-feedback {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-enhanced .invalid-feedback::before {
    content: '⚠';
    font-size: 0.9rem;
}

/* 選擇框增強 */
.form-enhanced .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* 核取方塊和單選按鈕 */
.form-enhanced .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-enhanced .form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

.form-enhanced .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.2);
}

.form-enhanced .form-check-label {
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

/* ============================================
   Alert 訊息增強
   ============================================ */
.alert-enhanced {
    border: none;
    border-radius: var(--radius-lg, 16px);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
}

.alert-enhanced.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.alert-enhanced.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.alert-enhanced.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.alert-enhanced.alert-info {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: #38bdf8;
}

.alert-enhanced i {
    font-size: 1.25rem;
    margin-top: 0.15rem;
}

/* ============================================
   分頁器增強
   ============================================ */
.pagination-enhanced {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination-enhanced .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md, 12px);
    color: var(--text-secondary, #9ca3af);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s var(--ease-smooth);
}

.pagination-enhanced .page-link:hover {
    background: rgba(212, 168, 83, 0.15);
    border-color: rgba(212, 168, 83, 0.3);
    color: var(--gold, #d4a853);
}

.pagination-enhanced .page-link.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #000;
    font-weight: 700;
}

.pagination-enhanced .page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================
   工具提示增強
   ============================================ */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-sm, 8px);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s var(--ease-smooth);
    z-index: 1000;
    pointer-events: none;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s var(--ease-smooth);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   進度條增強
   ============================================ */
.progress-enhanced {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-enhanced .progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.6s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.progress-enhanced .progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   標籤頁增強
   ============================================ */
.tabs-enhanced {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(30, 41, 59, 0.6);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.tabs-enhanced .tab-item {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}

.tabs-enhanced .tab-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tabs-enhanced .tab-item.active {
    background: var(--gradient-primary);
    color: #000;
    font-weight: 600;
}

/* ============================================
   手風琴增強
   ============================================ */
.accordion-enhanced .accordion-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg) !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-enhanced .accordion-button {
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    box-shadow: none;
}

.accordion-enhanced .accordion-button:not(.collapsed) {
    background: rgba(212, 168, 83, 0.08);
    color: var(--gold);
}

.accordion-enhanced .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239ca3af'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transition: transform 0.3s var(--ease-smooth);
}

.accordion-enhanced .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23d4a853'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-enhanced .accordion-body {
    padding: 1rem 1.5rem 1.5rem;
    color: var(--text-secondary);
}

/* ============================================
   移動端優化樣式
   ============================================ */

/* 觸控目標最小尺寸 */
@media (max-width: 767.98px) {
    /* 確保按鈕和連結有足夠的觸控區域 */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    /* 導航連結觸控區域 */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* 下拉選單項目 */
    .dropdown-item {
        padding: 0.875rem 1.25rem !important;
        min-height: 44px;
    }
    
    /* 表單元素 */
    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 16px; /* 防止 iOS 縮放 */
    }
    
    /* 卡片內容間距 */
    .card-body {
        padding: 1.25rem !important;
    }
    
    /* Hero 區塊調整 */
    .hero-section {
        padding: 3rem 0 2rem;
        min-height: auto;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-section .lead {
        font-size: 0.95rem;
    }
    
    /* 區塊間距調整 */
    section {
        padding: 2.5rem 0;
    }
    
    /* 隱藏不必要的裝飾元素 */
    .hero-glow,
    .floating-particle,
    .deco-ring {
        display: none;
    }
    
    /* 簡化卡片動效 */
    .card:hover,
    .service-card:hover,
    .service-feature-card:hover,
    .service-plan-card:hover {
        transform: none;
    }
    
    /* 網格間距調整 */
    .row.g-4 {
        --bs-gutter-y: 1rem;
    }
    
    .row.g-5 {
        --bs-gutter-y: 1.25rem;
    }
}

/* 小手機優化 */
@media (max-width: 375px) {
    body {
        font-size: 0.9rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1.1rem; }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* 徽章和標籤縮小 */
    .badge,
    .service-section-badge,
    .service-feature-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.75rem;
    }
}

/* 平板優化 */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 60vh;
    }
    
    /* 兩欄佈局優化 */
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* 卡片網格 */
    .service-feature-card,
    .service-plan-card {
        margin-bottom: 1.5rem;
    }
}

/* 橫向模式優化 */
@media (max-width: 991.98px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
}

/* 底部導航安全區域（iOS） */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }
    
    .fixed-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 隱藏桌面專用元素 */
@media (max-width: 991.98px) {
    .desktop-only {
        display: none !important;
    }
}

/* 隱藏移動端專用元素 */
@media (min-width: 992px) {
    .mobile-only {
        display: none !important;
    }
}

/* 觸控反饋 */
@media (hover: none) and (pointer: coarse) {
    .btn:active,
    .card:active,
    .nav-link:active,
    .dropdown-item:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
    
    /* 禁用 hover 狀態 */
    .btn:hover,
    .card:hover {
        transform: none;
        box-shadow: inherit;
    }
}

/* 高對比度模式支援 */
@media (prefers-contrast: high) {
    .card,
    .service-feature-card,
    .service-plan-card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
    
    a {
        text-decoration: underline;
    }
}

/* 深色模式優化（系統級） */
@media (prefers-color-scheme: dark) {
    /* 網站已是深色主題，保持一致 */
}

/* 列印樣式 */
@media print {
    .navbar,
    footer,
    .btn,
    .hero-section::before,
    .hero-section::after,
    .floating-particle,
    .card-glow::before,
    .reveal:not(.active) {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }
    
    .card,
    .service-feature-card,
    .service-plan-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        background: #fff !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
    }
    
    p, li {
        color: #333 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline;
    }
}

/* ============================================
   效能優化
   ============================================ */
/* 使用 GPU 加速的屬性 */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale,
.card:hover,
.btn:hover {
    will-change: transform, opacity;
}

/* 減少重繪 */
.floating-particle,
.hero-glow {
    contain: layout style;
}

/* 滾動效能優化 */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
