:root {
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #00f2ff;
    /* 两种光晕颜色定义 */
    --glow-safechat: rgba(0, 242, 255, 0.6);
    --glow-telegram: rgba(36, 161, 222, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow: hidden; 
}

/* 动态背景 Canvas */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 120%);
}

/* 导航栏 */
nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    background: linear-gradient(135deg, #00f2ff 0%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 核心内容区 */
.hero-content {
    text-align: center;
    max-width: 800px;
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

h1 .highlight {
    color: transparent;
    background: linear-gradient(90deg, #fff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
}

p.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 按钮组：iOS 26 液态玻璃统一风格 --- */
.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

.btn {
    position: relative;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 500; /* 更轻盈的字重 */
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    
    /* 玻璃态核心：极致通透 */
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    /* 极细微的边框，像切割的水晶边缘 */
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    
    /* 物理光影 */
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); /* 仿 iOS 物理回弹 */
    z-index: 1;
}

/* 内部流光层 (液态光泽) */
.btn::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s ease;
    /* 默认是一个中心扩散的柔光 */
    background: radial-gradient(80% 80% at center, rgba(255,255,255,0.1) 0%, transparent 100%);
}

/* 按钮悬停通用状态 */
.btn:hover {
    transform: translateY(-2px) scale(1.02); /* 悬浮感 */
    background: rgba(255, 255, 255, 0.06); /* 玻璃变亮 */
    border-color: rgba(255, 255, 255, 0.3); /* 边缘高亮 */
    color: #fff;
}

/* --- 差异化交互：虽然外观统一，但光韵颜色不同 --- */

/* 1. 在线客服：激发青色液态光 */
.btn-primary:hover {
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.3), inset 0 0 10px rgba(0, 242, 255, 0.1);
    text-shadow: 0 0 15px var(--glow-safechat);
}

/* 2. Telegram：激发蓝色液态光 */
.btn-telegram:hover {
    box-shadow: 0 0 40px rgba(36, 161, 222, 0.3), inset 0 0 10px rgba(36, 161, 222, 0.1);
    text-shadow: 0 0 15px var(--glow-telegram);
}

/* 悬停时，内部流光层显现 */
.btn-primary:hover::before {
    opacity: 1;
    background: radial-gradient(60% 60% at center, rgba(0, 242, 255, 0.15) 0%, transparent 100%);
}

.btn-telegram:hover::before {
    opacity: 1;
    background: radial-gradient(60% 60% at center, rgba(36, 161, 222, 0.15) 0%, transparent 100%);
}

/* 图标处理 */
.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

/* 悬停时图标微动，增加灵动感 */
.btn:hover svg {
    transform: scale(1.1);
    opacity: 1;
}

/* 全屏客服容器 */
#chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#chat-overlay.active {
    display: block;
    opacity: 1;
}

/* --- [Start] 修改区域：Loading 动画样式与层级 --- */

/* 加载动画容器：绝对居中，层级最高 */
#chat-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20000; /* 极高层级，确保浮动在 iframe 之上 */
    pointer-events: none; /* 确保不阻挡底层交互 */
    transition: opacity 0.5s ease; /* 淡出效果 */
}

/* 呼吸灯 Logo */
.loading-logo {
    stroke: var(--accent-color);
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.3));
    animation: cyber-breath 2s infinite ease-in-out;
}

/* 加载提示文字 */
.loading-text {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--accent-color);
    letter-spacing: 2px;
    opacity: 0.8;
    text-transform: uppercase;
    font-family: Consolas, "Andale Mono", "Lucida Console", "Courier New", monospace; /* 科技感等宽字体 */
    animation: text-pulse 2s infinite ease-in-out;
}

/* 关键帧：赛博呼吸特效 */
@keyframes cyber-breath {
    0%, 100% {
        opacity: 0.5;
        filter: drop-shadow(0 0 5px rgba(0, 242, 255, 0.2));
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 30px rgba(0, 242, 255, 0.9)); /* 强烈光晕爆发 */
        transform: scale(1.05);
    }
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --- [End] 修改区域 --- */

#chat-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 10; /* iframe 层级较低 */
    opacity: 0; /* 默认隐藏，由 JS 控制淡入 */
    transition: opacity 0.5s ease;
}

.close-chat {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1.5rem;
    }
    .hero-content {
        padding: 0 1.5rem;
    }
    .cta-group {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
}