/* ===== 經濟部 iPAS AI 解析班 — Tech Cyan Theme ===== */
:root {
    --primary:   #0B1120;
    --secondary: #0F172A;
    --tertiary:  #1E293B;
    --accent:    #0EA5E9;
    --surface:   #334155;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--primary); color: #cbd5e1; overflow-x: hidden; font-family: 'Noto Sans TC', sans-serif; }

/* Canvas 背景 */
#particle-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.6; }
.mobile-particles { background-image: radial-gradient(circle at 50% 50%, rgba(14,165,233,0.1) 0%, transparent 60%); }

/* Glassmorphism */
.glass { background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ✅ 全新 Magic Button：提升質感，改為沉穩漸層與頂部內發光，去除廉價跑馬燈 */
.btn-magic {
    position: relative; 
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 0.875rem; overflow: hidden; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    cursor: pointer; text-decoration: none;
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    border: 1px solid rgba(56,189,248,0.4);
    box-shadow: 0 4px 15px rgba(14,165,233,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-magic:hover { 
    transform: translateY(-2px); 
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
    border-color: rgba(125,211,252,0.8);
    box-shadow: 0 8px 25px rgba(14,165,233,0.4), inset 0 1px 0 rgba(255,255,255,0.3); 
}

/* ✅ 頂級流光掃過特效 (降低頻率至 7 秒一次，僅作優雅點綴) */
.btn-shine::after {
    content: ''; position: absolute; top: 0; left: -150%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); 
    animation: premium-shine 7s cubic-bezier(0.4, 0, 0.2, 1) infinite; 
    z-index: 10; pointer-events: none;
}
@keyframes premium-shine { 
    0%, 70% { left: -150%; } 
    100% { left: 200%; } 
}

/* Reveal Animation */
.reveal-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.reveal-up.visible { opacity: 1; transform: translateY(0); }

/* Hero Image Float */
.hero-image-wrapper { perspective: 1000px; }
.img-float { animation: float-img 6s ease-in-out infinite; transform: rotateY(-5deg) rotateX(5deg); }
@keyframes float-img {
    0%, 100% { transform: translateY(0) rotateY(-5deg) rotateX(5deg); }
    50% { transform: translateY(-15px) rotateY(-5deg) rotateX(5deg); }
}

/* Swipe Unlock */
#swipe-container { touch-action: none; }
#swipe-handle { transition: background-color 0.3s; }
#swipe-handle:active, #swipe-handle.grabbed { cursor: grabbing; background-color: #f0f9ff; }
#swipe-bg { transition: width 0.05s linear; border-radius: 9999px; }

/* Sticky CTA */
#sticky-cta.visible { transform: translateY(0); }
#sticky-coupon-badge.show { display: inline-block; animation: pop 0.3s ease-out; }
@keyframes pop { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* AI Toast */
#ai-toast { pointer-events: auto; }
#ai-toast.show { transform: translateX(0); }

/* Flip Card Utility (3D) */
.perspective-1000 { perspective: 1000px; }
.preserve-3d { transform-style: preserve-3d; }
.backface-hidden { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rotate-y-180 { transform: rotateY(180deg); }
.group:hover .group-hover\:rotate-y-180 { transform: rotateY(180deg); }

/* FAQ Details marker hidden */
details summary::-webkit-details-marker { display: none; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary); }
::-webkit-scrollbar-thumb { background: rgba(14,165,233,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(14,165,233,0.6); }
::selection { background: rgba(14,165,233,0.4); color: white; }