/* =========================================
   Global Fonts & Base Styles
   ========================================= */
body {
    font-family: 'Rajdhani', sans-serif;
    background-color: #050505;
    color: #e2e8f0;
    overflow-x: hidden;
    /* 强制隐藏横向滚动条 */
    width: 100%;
    max-width: 100%;
}

h1,
h2,
h3,
h4,
.sci-fi-font {
    font-family: 'Orbitron', sans-serif;
}

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

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}

/* =========================================
   Index Page Effects (Cyberpunk)
   ========================================= */

/* 霓虹光效工具类 */
.neon-text-cyan {
    text-shadow: 0 0 5px #06b6d4, 0 0 10px #06b6d4;
}

.neon-text-pink {
    text-shadow: 0 0 5px #d946ef, 0 0 10px #d946ef;
}

.neon-text-green {
    text-shadow: 0 0 5px #22c55e, 0 0 10px #22c55e;
}

/* 动态背景网格 (修复移动端溢出问题) */
.cyber-grid-fixed {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200vw;
    height: 200vh;
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    z-index: -1;
    transform: perspective(1000px) rotateX(60deg) scale(1);
    animation: moveGrid 20s linear infinite;
    pointer-events: none;
}

@keyframes moveGrid {
    0% {
        transform: perspective(1000px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(1000px) rotateX(60deg) translateY(40px);
    }
}

/* 故障文字效果 */
.glitch-wrapper {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    /* 背景色遮挡 */
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(14px, 9999px, 12px, 0);
    }

    5% {
        clip: rect(84px, 9999px, 32px, 0);
    }

    100% {
        clip: rect(4px, 9999px, 96px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(64px, 9999px, 82px, 0);
    }

    5% {
        clip: rect(4px, 9999px, 12px, 0);
    }

    100% {
        clip: rect(24px, 9999px, 16px, 0);
    }
}

/* 扫描线动画 */
.scanline {
    width: 100%;
    height: 2px;
    background: rgba(6, 182, 212, 0.5);
    position: absolute;
    z-index: 10;
    animation: scan 3s linear infinite;
    opacity: 0.3;
}

@keyframes scan {
    0% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}

/* =========================================
   Privacy & Terms Page Styles (Prose)
   ========================================= */

/* 文章样式重置 (Privacy/Terms) */
.prose-custom h2 {
    color: #fff;
    margin-top: 2.5em;
    margin-bottom: 1em;
    font-size: 1.5rem;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 0.5rem;
}

.prose-custom h3 {
    color: #a855f7;
    /* 默认紫色，Terms 用 */
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 1.25rem;
}

/* Privacy 页面特殊的 H3 颜色 (需要在 HTML 中通过 class 覆盖或此处通用) 
   由于目前结构简单，我们让所有 H3 都带点颜色，具体颜色由 Tailwind 类控制更灵活。
   这里保留基础排版 */

.prose-custom p {
    margin-bottom: 1.25em;
    line-height: 1.8;
    color: #94a3b8;
}

.prose-custom ul {
    list-style-type: square;
    /* Terms 默认方形 */
    padding-left: 1.5em;
    margin-bottom: 1.25em;
    color: #94a3b8;
}

/* Privacy 页面使用的是 disc，我们可以在这里定义一个子类，
   或者让 HTML 的 inline class 决定。
   为了通用，我们设置基础 li 间距 */
.prose-custom li {
    margin-bottom: 0.5em;
}

.prose-custom strong {
    color: #e2e8f0;
}

/* 针对 Privacy 页面的特殊覆盖 (如果需要) */
.privacy-mode .prose-custom h3 {
    color: #22d3ee;
}

/* 青色 */
.privacy-mode .prose-custom ul {
    list-style-type: disc;
}