/* 
  独立牛马 - 全局样式 (Style)
  融合 Apple 极简与极客风格
*/

:root {
    --geek-black: #000000;
    --geek-green: #32D74B;
    --geek-blue: #64D2FF;
    --geek-gray: #1D1D1F; /* Apple-style dark gray */
    --text-primary: #F5F5F7;
    --text-secondary: #86868B;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent; /* 消除手机端点击高亮 */
}

/* 锚点滚动边距修正，防止被固定导航栏遮挡 */
section[id] {
    scroll-margin-top: 80px;
}

body {
    background-color: var(--geek-black);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* 字符下落背景画布 - 固定定位以实现全屏覆盖 */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0; /* 提升至 0，确保在 body 背景色之上 */
    display: block;
    pointer-events: none; /* 防止干扰点击 */
}

/* 确保所有内容容器在 Canvas 之上且背景透明 */
nav, main, footer, section {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* 极客等宽字体用于代码和特定标题 */
.font-mono {
    font-family: "JetBrains Mono", "Fira Code", monospace;
}

/* Apple 风格的容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero 区域大字体，改为等宽字体增强极客感 */
.hero-title {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    /* 使用 clamp 确保在任何屏幕下都有一致的响应式体验 */
    font-size: clamp(1.8rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-align: center;
}

.hero-title .block {
    white-space: nowrap; /* 核心：全平台强制内部单行显示 */
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(to right, var(--geek-green), var(--geek-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Apple 风格毛玻璃卡片 */
.apple-card {
    background: rgba(255, 255, 255, 0.01); /* 极低透明度白色 */
    backdrop-filter: blur(12px) saturate(180%); /* 降低模糊度以看清背景代码 */
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1); /* 增强边缘高光 */
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02); /* 增加玻璃厚度感 */
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* “关于我”大卡片特化样式 */
.about-card {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.02);
    border-radius: 40px;
    padding: 80px 40px;
    width: 100%;
    margin: 0 auto;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(50, 215, 75, 0.5); /* 悬停时增强绿光 */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
                inset 0 0 20px rgba(50, 215, 75, 0.1);
}

.apple-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(50, 215, 75, 0.4); /* 悬停时透出绿光 */
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3),
                inset 0 0 15px rgba(50, 215, 75, 0.05);
}

/* 导航栏毛玻璃 */
nav {
    background: rgba(0, 0, 0, 0.5); /* 黑色半透明 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 矩阵绿发光按钮 */
.btn-primary {
    background-color: var(--geek-green);
    color: black;
    padding: 12px 28px;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(50, 215, 75, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: scale(0.95);
    opacity: 0.9;
}

/* 导航链接动效 */
nav a {
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--geek-green) !important;
    transform: translateY(-1px);
}

nav a:active {
    opacity: 0.6;
}

/* 隐藏滚动条但保持滚动 */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Slogan 闪烁光标 */
.blinking-cursor {
    display: inline-block;
    width: 12px;            /* 进一步加粗，显著提升终端质感 */
    height: 1.1em;          /* 保持略高于文字 */
    background-color: var(--geek-green);
    margin-left: 4px;       /* 稍微拉开一点点间距，避免太厚重导致视觉拥挤 */
    vertical-align: middle;
    margin-top: -0.15em;    /* 微调重心 */
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 8px rgba(50, 215, 75, 0.5); /* 增加微弱发光感 */
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* Slogan 优化 */
#hero-title {
    line-height: 1.4;
}

/* 产品多图幻灯组 */
.product-gallery {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: rgba(50, 215, 75, 0.8);
    color: black;
    border-color: transparent;
}

.gallery-nav-btn.prev { left: 16px; }
.gallery-nav-btn.next { right: 16px; }

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: var(--geek-green);
    width: 18px;
    border-radius: 4px;
}

/* 社交媒体卡片毛玻璃 */
.social-card {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
}

.social-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(50, 215, 75, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2),
                inset 0 0 10px rgba(50, 215, 75, 0.05);
}

/* 二维码容器样式优化 */
.qr-container {
    /* background: white; 保持白色底座以确保扫码成功率 - 已根据需求移除 */
    /* padding: 12px; */
    border-radius: 16px;
    display: inline-block;
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
}

.qr-code-img {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 8px;
}

/* 页脚毛玻璃横条 */
footer {
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 0;
}

/* 方案 3: 滚动进入动效样式 */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    filter: blur(10px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
    #hero-title {
        padding: 0 1rem;
    }
    
    .slogan-text {
        display: inline-block;
        vertical-align: middle;
        width: 100%;
    }

    .blinking-cursor {
        display: inline-block;
        vertical-align: middle;
        margin-left: 2px;
    }

    .apple-card {
        padding: 24px;
        border-radius: 20px;
    }
}
