/* ========================================
   号易号卡 - 全局样式表
   设计风格：深色太空科技感
   主色：#00d4ff | 辅色：#7b2fff | 强调金：#ffb800
   ======================================== */

/* ---- 基础重置与变量 ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00d4ff;
    --secondary: #7b2fff;
    --accent: #ffb800;
    --bg: #0a0a0f;
    --card-bg: rgba(13, 13, 26, 0.8);
    --text: #e0e0e8;
    --text-dim: #8a8a9a;
    --border: rgba(0, 212, 255, 0.15);
    --glow-primary: 0 0 20px rgba(0, 212, 255, 0.3);
    --glow-accent: 0 0 20px rgba(255, 184, 0, 0.3);
    --glow-secondary: 0 0 20px rgba(123, 47, 255, 0.3);
    --font-main: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'SF Mono', 'Consolas', monospace;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ---- 粒子背景画布 ---- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---- 扫描线叠加 ---- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 212, 255, 0.015) 2px,
        rgba(0, 212, 255, 0.015) 4px
    );
    z-index: 1;
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* ---- 网格背景 ---- */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* ---- 导航栏 ---- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.nav-brand svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 8px 18px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.2);
}

.nav-links a.active {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    box-shadow: 0 0 8px var(--primary);
}

.nav-contact {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.15);
    transition: all 0.3s ease;
    background: rgba(0, 212, 255, 0.03);
}

.nav-contact-item:hover {
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.08);
    color: var(--primary);
}

.nav-contact-item svg {
    width: 14px;
    height: 14px;
    fill: var(--primary);
}

/* ---- 汉堡菜单 ---- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- 主内容区 ---- */
main {
    position: relative;
    z-index: 10;
    padding-top: 64px;
}

/* ---- 通用卡片 ---- */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: var(--glow-primary), 0 10px 40px rgba(0, 0, 0, 0.4);
}

.glass-card-accent {
    border-color: rgba(255, 184, 0, 0.2);
}

.glass-card-accent::before {
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.glass-card-accent:hover {
    border-color: rgba(255, 184, 0, 0.4);
    box-shadow: var(--glow-accent), 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* ---- 按钮样式 ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: var(--font-main);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0099cc);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #e6a600);
    color: #000;
    box-shadow: 0 4px 20px rgba(255, 184, 0, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 184, 0, 0.5);
}

.btn-glow {
    animation: btnBreathe 3s ease-in-out infinite;
}

@keyframes btnBreathe {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(0, 212, 255, 0.6), 0 0 40px rgba(0, 212, 255, 0.2); }
}

/* ---- 脉动光点 ---- */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ---- 复制提示 ---- */
.copy-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0, 212, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- 页脚 ---- */
.site-footer {
    position: relative;
    z-index: 10;
    background: rgba(10, 10, 15, 0.9);
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copy {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.8;
}

.footer-copy a {
    color: var(--text-dim);
    text-decoration: none;
}

/* ---- 加载动画 ---- */
.loader-ring {
    width: 60px;
    height: 60px;
    position: relative;
}

.loader-ring svg {
    width: 100%;
    height: 100%;
    animation: loaderSpin 1.5s linear infinite;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

/* ---- 淡入动画 ---- */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

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

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
    .nav-contact {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 12px 16px;
        border-radius: 8px;
    }

    .hamburger {
        display: flex;
    }

    .nav-contact {
        display: none;
    }
}

/* ---- 滚动条美化 ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.4);
}

/* ========================================
   底部菜单栏（移动端）
   ======================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9998;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 56px;
    max-width: 600px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.65rem;
    transition: all 0.3s ease;
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-main);
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-dim);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active svg {
    stroke: var(--primary);
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.5));
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 0 0 2px 2px;
    box-shadow: 0 0 8px var(--primary);
}

.bottom-nav-item:active {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }
    /* 为底部菜单栏留出空间 */
    .site-footer {
        padding-bottom: 80px;
    }
}
