/* ==========================================================================
   清茶云互联 - 顶级全栈视觉系统 (Consolidated Biotech System)
   ========================================================================== */

:root {
    --bg-base: #f8fafc;
    --bg-card: #ffffff;
    --accent-blue: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-subtle: rgba(226, 232, 240, 0.8);
    --shadow-premium: 0 20px 50px -12px rgba(15, 23, 42, 0.08);
}

/* ================= 1. 全局基础 (通用) ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* ================= 2. 前端专属 (Hero & Spotlight) ================= */
.hero-tech {
    position: relative; height: 100vh; min-height: 650px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background-size: cover; background-position: center; background-attachment: fixed;
    padding-top: 100px; /* 防止被 Header 遮挡 */
}
.hero-tech::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(248,250,252,1) 100%);
    backdrop-filter: blur(5px);
}
.hero-title {
    font-size: 5rem; font-weight: 800; letter-spacing: -2px; line-height: 1.1; margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0f172a 20%, #3b82f6 80%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    position: relative; z-index: 10;
}
.spotlight-card {
    position: relative; background: #ffffff; border-radius: 24px; padding: 2px;
    overflow: hidden; transition: transform 0.4s; box-shadow: var(--shadow-premium);
}
.spotlight-card:hover { transform: translateY(-8px); }
.spotlight-card::before {
    content: ""; position: absolute; inset: -100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 1;
}
.spotlight-card:hover::before { opacity: 1; }

/* ================= 3. 后台专属 (Admin Panels) ================= */
.admin-container { max-width: 1300px; margin: 3rem auto; padding: 0 1.5rem; }
.admin-content { background: var(--bg-card); border-radius: 24px; padding: 3.5rem; box-shadow: var(--shadow-premium); border: 1px solid #fff; }
.admin-content h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 2.5rem; display: flex; align-items: center; gap: 12px; }
.admin-content h1::before { content: ''; width: 4px; height: 32px; background: var(--accent-gradient); border-radius: 4px; }

/* 后台表单分区盒子 (解决“太素”的关键) */
.admin-form-section { background: #fbfcfd; border: 1px solid var(--border-subtle); border-radius: 20px; padding: 2.5rem; margin-bottom: 2rem; transition: 0.4s; }
.section-title { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); margin-bottom: 1.8rem; text-transform: uppercase; letter-spacing: 2px; border-left: 3px solid var(--accent-cyan); padding-left: 10px; }

/* 后台九宫格卡片 */
.admin-card-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.admin-card { background: #fff; border: 1px solid var(--border-subtle); border-radius: 20px; padding: 2.5rem 1.5rem; text-align: center; transition: 0.4s; }
.admin-card:hover { transform: translateY(-8px); border-color: var(--accent-blue); box-shadow: var(--shadow-premium); }
.card-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }

/* ================= 4. 通用组件 (按钮、输入框、表格) ================= */
.btn, .btn-primary, button[type="submit"] {
    display: inline-flex; align-items: center; justify-content: center;
    background: #0f172a; color: #fff !important; padding: 0.8rem 2.2rem;
    border-radius: 50px; font-weight: 600; cursor: pointer; border: none; transition: 0.4s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2); background: var(--accent-blue); }

input, textarea, select {
    width: 100%; background: #fff !important; border: 1.5px solid var(--border-subtle) !important;
    border-radius: 12px !important; padding: 12px 16px !important; transition: 0.3s;
}
input:focus { border-color: var(--accent-blue) !important; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important; outline: none; }

table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border-subtle); margin: 1.5rem 0; }
th { background: #f8fafc; padding: 1.2rem; text-align: left; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; }
td { padding: 1.2rem; border-bottom: 1px solid var(--border-subtle); background: #fff; }

/* ================= 5. 侧滑菜单 (Mobile Menu) ================= */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); z-index: 99998; opacity: 0; pointer-events: none; transition: 0.4s; }
.overlay.show { opacity: 1; pointer-events: auto; }
.sidebar { position: fixed; top: 0; left: -320px; width: 280px; height: 100vh; background: rgba(255, 255, 255, 0.98); z-index: 99999; transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; }
.sidebar.open { transform: translateX(320px); }

/* ================= 6. 响应式适配 ================= */
@media (max-width: 768px) {
    .hero-title { font-size: 2.8rem; }
    .admin-content { padding: 2rem; }
    .admin-card-container { grid-template-columns: 1fr 1fr; }
}
/* ================= 底部版权区域精修 (全局居中) ================= */
footer {
    text-align: center !important;     /* 强制文字居中 */
    padding: 2.5rem 1rem !important;   /* 增加上下呼吸感留白 */
    color: #94a3b8 !important;         /* 使用高级的冷灰色，避免纯黑太刺眼 */
    font-size: 0.85rem !important;     /* 字号稍微缩小，显得克制专业 */
    background-color: #f8fafc;         /* 融入全站底色 */
    border-top: 1px solid rgba(0,0,0,0.03); /* 加一条极淡的顶部分割线 */
    width: 100%;
    letter-spacing: 0.5px;             /* 稍微增加字间距 */
}
/* ================= 全局微交互与深度反馈 (Micro-interactions) ================= */

/* 1. 物理按压反馈：所有按钮在点击瞬间产生 4% 的微缩回弹，模拟真实物理按键 */
.btn:active, 
.btn-primary:active, 
.btn-super:active, 
.track-btn:active, 
button[type="submit"]:active {
    transform: scale(0.96) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    /* 点击按下的瞬间极快，松开回弹稍缓，符合物理直觉 */
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.1s !important;
}

/* 2. 异步加载状态：按钮文字隐去，中心出现平滑的 Loading 旋转环 */
.btn-loading {
    position: relative;
    color: transparent !important; /* 隐藏原文字，但不改变按钮原始尺寸 */
    pointer-events: none; /* 防止用户疯狂连点提交 */
    opacity: 0.9;
}
.btn-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.2rem;
    height: 1.2rem;
    margin-left: -0.6rem;
    margin-top: -0.6rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff; /* 旋转的高亮部分 */
    border-radius: 50%;
    animation: micro-spin 0.7s infinite linear;
}
@keyframes micro-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* ================= 第 4/5/6 阶段：进阶高级交互与无障碍体验 ================= */

/* 1. 页面无缝过渡 (Page Transitions) - 消除跳转白屏的生硬感 */
body {
    animation: pageFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
body.page-exit {
    opacity: 0;
    transform: translateY(-8px) scale(0.99); /* 退出时有一点点下沉感 */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 2. 焦点无障碍访问 (Accessibility / A11y) */
/* 使用 :focus-visible 只有在用户使用键盘 (Tab) 导航时才显示蓝色光环，鼠标点击时不干扰视觉 */
*:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4) !important;
    border-radius: inherit; /* 智能继承元素的圆角 */
    transition: box-shadow 0.2s;
}

/* 3. 轻量级状态通知 (Toast Notifications) UI 框架 */
#toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 999999;
    display: flex; flex-direction: column; gap: 12px;
    pointer-events: none; /* 让鼠标可以穿透通知点击底下的东西 */
}
.premium-toast {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    color: #0f172a; padding: 14px 24px; border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.15);
    font-weight: 600; font-size: 0.9rem;
    display: flex; align-items: center; gap: 12px;
    transform: translateX(120%); /* 默认藏在屏幕右侧外 */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
    border-left: 4px solid #3b82f6;
    border-top: 1px solid rgba(255,255,255,0.5);
    border-right: 1px solid rgba(255,255,255,0.5);
}
.premium-toast.show { transform: translateX(0); } /* 飞入动画 */
.premium-toast.hide { opacity: 0; transform: translateY(-10px); } /* 向上飘散消失 */

.premium-toast.success { border-left-color: #10B981; }
.premium-toast.success i { color: #10B981; font-style: normal; font-size: 1.2rem; }
.premium-toast.error { border-left-color: #EF4444; }
.premium-toast.error i { color: #EF4444; font-style: normal; font-size: 1.2rem; }
/* ================= 全新追加：售后弹窗 & 微信客服卡片专属特效 ================= */
/* 售后弹窗：毛玻璃高阶质感 */
.policy-modal {
    display: none; position: fixed; inset: 0; z-index: 100000;
    background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); 
    align-items: center; justify-content: center; animation: modalFadeIn 0.3s ease;
}
.policy-modal-content {
    background: #ffffff; width: 90%; max-width: 550px; border-radius: 28px;
    padding: 2.5rem; position: relative; box-shadow: 0 30px 60px -12px rgba(0,0,0,0.25);
}
.policy-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.policy-header h3 { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin: 0; }
.close-modal { font-size: 2rem; color: #94a3b8; cursor: pointer; transition: 0.3s; line-height: 1; }
.close-modal:hover { color: #ef4444; }

.policy-body { max-height: 45vh; overflow-y: auto; padding-right: 10px; color: #475569; line-height: 1.8; font-size: 0.95rem; }
.policy-body h4 { color: #0f172a; margin: 1.5rem 0 0.5rem; font-weight: 700; font-size: 1.05rem; }
.policy-ver { font-size: 0.75rem; font-family: monospace; color: #3b82f6; margin-bottom: 1rem; }
.policy-body::-webkit-scrollbar { width: 4px; }
.policy-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 768px) { .policy-modal-content { padding: 2rem 1.5rem; border-radius: 24px; } }

/* 微信客服卡片：高级悬浮显影 */
.wx-support-card { position: relative; overflow: hidden; }
.wx-trigger-btn { display: inline-block; padding: 8px 18px; background: #ecfdf5; color: #059669; border-radius: 50px; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: 0.3s; margin-top: 0.5rem; }
.wx-qr-overlay {
    position: absolute; inset: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(20px); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none; border-radius: 1.5rem;
}
.wx-qr-overlay img { width: 130px; height: 130px; border-radius: 12px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); margin-bottom: 12px; border: 1px solid #e2e8f0; object-fit: cover;}
.qr-hint { font-size: 0.8rem; color: #059669; font-weight: 700; letter-spacing: 1px; }
.wx-support-card:hover .wx-qr-overlay, .wx-support-card:active .wx-qr-overlay { opacity: 1; transform: translateY(0); pointer-events: auto; }