/* ============================================================
   shared.css — SPEDMIX 全域共用樣式
   適用於全站與所有子頁面（Apple Design & skills.sh 風格系統）
   ============================================================ */

/* ── 字體 ───────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Chiron+GoRound+TC:wght@200..900&family=Noto+Sans+TC:wght@400;500;700&family=Geist+Mono:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* ── 現代化排版與全域變數 ────────────────────────────────────────── */
:root {
    --primary: #38A3A5;
    --primary-dark: #22577A;
    --accent: #80CBC4;
    --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
    --glass-bg-light: rgba(255, 255, 255, 0.75);
    --glass-bg-dark: rgba(21, 28, 44, 0.75);
    --glass-border-light: rgba(255, 255, 255, 0.45);
    --glass-border-dark: rgba(255, 255, 255, 0.08);
}

/* ── 基礎排版與平滑文字渲染 ───────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Chiron GoRound TC', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* ── Apple Fluid Motion: 觸覺回饋即時縮放 (Active Tactile Feedback) ──── */
button:active:not(:disabled),
.clickable:active,
.gradient-button:active,
.filter-btn:active,
.fav-card:active,
.tool-card:active {
    transform: scale(0.975) !important;
    transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ── Apple 晶透玻璃面板 (Glassmorphism & Hairline Border) ──────── */
.glass-panel {
    background: var(--glass-bg-light);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border-light);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03), 0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

.dark .glass-panel {
    background: var(--glass-bg-dark);
    border-color: var(--glass-border-dark);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.text-gradient-teal-blue {
    background: linear-gradient(135deg, #38A3A5 0%, #22577A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #f97316 0%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── 進階微卡片與陰影 ───────────────────────────────────────────── */
.shadow-premium {
    box-shadow: 0 4px 20px -2px rgba(56, 163, 165, 0.08), 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}
.dark .shadow-premium {
    box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── 質感 macOS 滾動條 ─────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 99px;
    transition: background 0.3s;
}
.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 163, 165, 0.5);
}

/* ── 卡片陰影與彈簧懸停 ───────────────────────────────────────── */
.card-shadow {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(56, 163, 165, 0.15);
}

/* ── 淡入上移動畫 ───────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Toast 提示 (複製成功等通知) ───────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.5rem;
    background: #38A3A5;
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: 0 12px 30px rgba(56, 163, 165, 0.35);
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ── 共用頁面頁尾 ───────────────────────────────────────────── */
.page-footer {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 3rem;
}

.dark .page-footer {
    border-top-color: rgba(255, 255, 255, 0.06);
    color: #64748b;
}

.page-footer a {
    text-decoration: underline;
}

.page-footer a:hover {
    color: #38A3A5;
}