/* ABOUTME: USDT 链上安全警示单页样式表（纯静态交付，无任何框架依赖） */
/* ABOUTME: 暗色黑客终端美学：霓虹绿 / 警示红 / 赛博蓝 */

:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.85);
    --primary-green: #00ff66;
    --alert-red: #ff334b;
    --cyber-blue: #00f0ff;
    --text-gray: #8b949e;
    --border-color: rgba(0, 255, 102, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace, system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: #f0f6fc;
    line-height: 1.6;
    padding: 20px 15px;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(0, 255, 102, 0.05) 0%, transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 20px 20px, 20px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* 顶部黑客终端日志 */
.terminal-header {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 25px;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.1);
    font-size: 0.85rem;
    color: var(--primary-green);
}

.terminal-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

/* 顶部栏：终端窗口 + 语言切换 */
.terminal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.terminal-header {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

.lang-switch {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.1);
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-gray);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lang-btn:hover {
    color: var(--primary-green);
}

.lang-btn.active {
    color: var(--bg-color);
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.typing-text {
    word-break: break-all;
    /* 预留多行空间，避免打字过程中布局大动（CLS 优化） */
    white-space: pre-wrap;
    min-height: 6.4em;
}

.typing-text::after {
    content: "▌";
    animation: blink 1s steps(1) infinite;
}

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

/* 标题部分 */
header {
    text-align: center;
    margin-bottom: 30px;
}

.badge {
    display: inline-block;
    background: rgba(255, 51, 75, 0.15);
    color: var(--alert-red);
    border: 1px solid var(--alert-red);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 12px;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

h1 {
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.3);
    margin-bottom: 10px;
}

h1 span {
    color: var(--alert-red);
}

.subtitle {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* 视频模块 */
.section-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
}

.section-title {
    font-size: 1.2rem;
    color: var(--cyber-blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding-bottom: 8px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-caption {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 8px;
    text-align: right;
}

/* 盗刷过程拆解 */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 600px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--alert-red);
    padding: 15px;
    border-radius: 6px;
}

.step-num {
    color: var(--alert-red);
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.step-title {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* 安全防护建议 */
.security-list {
    list-style: none;
}

.security-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #e6edf3;
}

.security-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-gray);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 30px;
}

.warning-text {
    color: var(--alert-red);
    margin-top: 5px;
}

/* 英文语言下长标题的排版适配 */
html[lang="en"] h1 {
    font-size: 1.55rem;
    line-height: 1.35;
}

html[lang="en"] .step-desc,
html[lang="en"] .security-list li {
    font-size: 0.82rem;
}

/* 移动端：顶部栏纵向排列 */
@media (max-width: 600px) {
    .terminal-topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .lang-switch {
        align-self: flex-end;
    }
}

/* 无障碍：减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
    .badge {
        animation: none;
    }
    .typing-text::after {
        animation: none;
    }
}
