@charset "UTF-8";

/* ==========================================================================
   V-CORE 系統樣式定義庫
   版本: 24.1.7 (PRO Edition)
   架構: 模組化玻璃擬態 (Glassmorphism) & 賽博霓虹主題
   維護者: V-CORE 前端工程團隊
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 設計變數 (CSS Variables)
   -------------------------------------------------------------------------- */
:root {
    /* 色彩計畫：深邃宇宙與賽博青藍 */
    --color-bg-deep: #020617;
    --color-primary-cyan: #38bdf8;
    --color-primary-blue: #0ea5e9;
    --color-accent-purple: #a855f7;
    --color-accent-amber: #fbbf24;
    
    /* 玻璃擬態系統參數 */
    --glass-bg-base: rgba(15, 23, 42, 0.65);
    --glass-bg-hover: rgba(15, 23, 42, 0.85);
    --glass-border-light: rgba(56, 189, 248, 0.15);
    --glass-border-strong: rgba(56, 189, 248, 0.4);
    --glass-highlight-inner: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    
    /* 排行榜階級色彩 */
    --rank-gold: #fbbf24;
    --rank-silver: #94a3b8;
    --rank-bronze: #b45309;
    
    /* 互動狀態與轉場曲線 */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* 動態邏輯變數 (由 JS 操控) */
    --beam-progress: 0%;
}

/* --------------------------------------------------------------------------
   2. 基礎設定與重置 (Base & Resets)
   -------------------------------------------------------------------------- */
html {
    background-color: var(--color-bg-deep) !important;
    -webkit-tap-highlight-color: transparent; /* 移除行動端點擊高光 */
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    background-color: var(--color-bg-deep) !important;
    color: #f8fafc;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior-y: none; /* 防止 Safari 彈性滾動造成的版面破圖 */
}

/* 自訂全域捲軸設定 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.8);
}
::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    transition: var(--transition-smooth);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

/* 隱藏捲軸工具類別 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --------------------------------------------------------------------------
   3. 全域佈局與環境背景 (Global Layout & Ambient Backgrounds)
   -------------------------------------------------------------------------- */
/* 動態環境光效容器 */
.liquid-bg-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s infinite ease-in-out alternate;
    mix-blend-mode: screen;
}

.orb-1 {
    top: -10%; left: -10%; width: 40vw; height: 40vw;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15), transparent);
    animation-delay: 0s;
}

.orb-2 {
    bottom: -20%; right: -10%; width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1), transparent);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%; left: 60%; width: 30vw; height: 30vw;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.12), transparent);
    animation-delay: -10s;
}

/* 頁面視圖控制器 (App 級流暢切換) */
.page {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    /* 退出時的柔和過渡 */
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}
.page.active {
    display: block;
    /* 進入時的絲滑浮現 (使用 Apple 常用曲線) */
    animation: appPageReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes appPageReveal {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   4. UI 元件 (Cards, Buttons, Badges)
   -------------------------------------------------------------------------- */
/* 高階玻璃擬態卡片 */
.premium-card {
    background: var(--glass-bg-base);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border-light);
    border-radius: 32px;
    box-shadow: 
        0 10px 30px -10px rgba(0, 0, 0, 0.5),
        var(--glass-highlight-inner);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* 基礎玻璃元件 (適用於按鈕與標籤) */
.glass-element {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 社群媒體互動按鈕 (完美還原 App 品牌色動態特效) */
.btn-social {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    color: #e2e8f0;
    z-index: 1;
}

.btn-social::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.btn-social:hover {
    transform: translateY(-3px);
    border-color: transparent;
    color: #fff;
}
.btn-social:hover::before {
    opacity: 1;
}

/* TikTok (抖音黑 + 藍紅霓虹疊影) */
.btn-tiktok::before { background: #010101; }
.btn-tiktok:hover { box-shadow: -3px 3px 0 rgba(37,244,238,0.8), 3px -3px 0 rgba(254,44,85,0.8); }
.btn-tiktok:hover i { color: #fff; filter: drop-shadow(2px 2px 0px #fe2c55) drop-shadow(-2px -2px 0px #25f4ee); }

/* Instagram (經典彩色放射漸層) */
.btn-ig::before { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.btn-ig:hover { box-shadow: 0 10px 20px rgba(214, 36, 159, 0.4); }
.btn-ig:hover i { color: #fff; }

/* Twitch (專屬紫) */
.btn-twitch::before { background: #9146ff; }
.btn-twitch:hover { box-shadow: 0 10px 20px rgba(145, 70, 255, 0.4); }
.btn-twitch:hover i { color: #fff; }

/* Discord (專屬藍) */
.btn-discord::before { background: #5865F2; }
.btn-discord:hover { box-shadow: 0 10px 20px rgba(88, 101, 242, 0.4); }
.btn-discord:hover i { color: #fff; }

/* 底部導航列 (iOS/macOS 風格) */
.nav-dock {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: rgba(2, 6, 23, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item {
    color: #64748b;
    transition: var(--transition-bounce);
    position: relative;
}
.nav-item:hover {
    color: var(--color-primary-cyan);
    transform: translateY(-2px);
}
.nav-item.active {
    color: var(--color-primary-cyan);
    background: rgba(56, 189, 248, 0.15);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* 成就徽章階級 */
.badge-tier-bronze { background: linear-gradient(135deg, rgba(180,83,9,0.2), rgba(180,83,9,0.05)); }
.badge-tier-silver { background: linear-gradient(135deg, rgba(148,163,184,0.2), rgba(148,163,184,0.05)); }
.badge-tier-gold { background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(251,191,36,0.05)); }
.badge-tier-legendary {
    background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(168,85,247,0.2));
    animation: legendaryPulse 2s infinite alternate;
}

/* --------------------------------------------------------------------------
   5. 特定功能模組 (Specific Modules)
   -------------------------------------------------------------------------- */
/* --- 認證表單輸入框樣式 --- */
.auth-input-group {
    position: relative;
    margin-bottom: 1rem;
}
.auth-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition-smooth);
}
.auth-input:focus {
    border-color: var(--color-primary-cyan);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
    background: rgba(0, 0, 0, 0.6);
}
.auth-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    transition: color 0.3s ease;
}
.auth-input:focus + .auth-icon {
    color: var(--color-primary-cyan);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0;
    color: #64748b;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: var(--transition-smooth);
    z-index: 10;
}
.auth-tab.active {
    color: #fff;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* --- 排行榜名次樣式 --- */
.rank-1 { border-left: 4px solid var(--rank-gold); background: linear-gradient(90deg, rgba(251,191,36,0.1), transparent); }
.rank-2 { border-left: 4px solid var(--rank-silver); background: linear-gradient(90deg, rgba(148,163,184,0.1), transparent); }
.rank-3 { border-left: 4px solid var(--rank-bronze); background: linear-gradient(90deg, rgba(180,83,9,0.1), transparent); }

/* --- Markdown 解析 (AI 聊天終端機風格) --- */
.markdown-body {
    font-size: 14.5px;
    line-height: 1.7;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}
.markdown-body p { margin-bottom: 1em; }
.markdown-body p:last-child { margin-bottom: 0; }

.markdown-body strong {
    color: var(--color-primary-cyan);
    font-weight: 900;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}
.markdown-body ul { list-style-type: disc; }
.markdown-body ol { list-style-type: decimal; }
.markdown-body li { margin-bottom: 0.5em; }
.markdown-body li::marker { color: var(--color-primary-cyan); }

.markdown-body pre {
    background: #0d1117;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1em;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
.markdown-body code {
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 13px;
    background: rgba(56, 189, 248, 0.1);
    color: #7dd3fc;
    padding: 0.2em 0.4em;
    border-radius: 6px;
}
.markdown-body pre code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
}

.markdown-body blockquote {
    border-left: 3px solid var(--color-accent-purple);
    background: rgba(168, 85, 247, 0.05);
    padding: 0.75em 1em;
    margin-bottom: 1em;
    border-radius: 0 12px 12px 0;
    color: #cbd5e1;
    font-style: italic;
}

.markdown-body table {
    width: 100%; border-collapse: collapse; margin-bottom: 1em;
    border-radius: 12px; overflow: hidden;
}
.markdown-body th, .markdown-body td {
    border: 1px solid rgba(255,255,255,0.1); padding: 0.75em; text-align: left;
}
.markdown-body th {
    background: rgba(56, 189, 248, 0.1); color: var(--color-primary-cyan); font-weight: bold;
}

/* --- 電商與促銷活動功能 --- */
.promo-slide-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
}
.promo-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.3); 
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.promo-dot.active {
    background: var(--color-primary-cyan); 
    width: 24px; border-radius: 4px;
    box-shadow: 0 0 10px rgba(34,211,238,0.8);
}

.promo-qa-item {
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px; 
    overflow: hidden; 
    transition: var(--transition-smooth);
}
.promo-qa-item.active {
    background: rgba(14, 165, 233, 0.1); 
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.15);
}
.promo-qa-content {
    max-height: 0; opacity: 0;
    padding: 0 1rem; transition: var(--transition-smooth);
}
.promo-qa-item.active .promo-qa-content {
    max-height: 500px; opacity: 1; padding: 0 1rem 1rem 1rem;
}
.promo-qa-icon {
    transition: transform 0.3s ease;
}
.promo-qa-item.active .promo-qa-icon {
    transform: rotate(180deg);
    color: var(--color-primary-cyan);
}

/* --------------------------------------------------------------------------
   6. 動畫關鍵影格 (效能最佳化)
   -------------------------------------------------------------------------- */
@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.05); }
    100% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes legendaryPulse {
    0% { box-shadow: 0 0 10px rgba(239,68,68,0.5); border-color: rgba(239,68,68,0.5); }
    100% { box-shadow: 0 0 25px rgba(168,85,247,0.8); border-color: rgba(168,85,247,0.8); }
}

@keyframes smoothReveal {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 動畫工具類別 */
.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 效能優先模式 (配合 JS 使用者設定) */
.perf-mode .ambient-orb { display: none !important; }
.perf-mode * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }