/* ============================================
   91黑料 - 网络安全情报站 主样式表
   CSS前缀: hl-
   ============================================ */

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

:root {
    --hl-primary: #000000;
    --hl-secondary: #0F0F0F;
    --hl-accent: #00FF00;
    --hl-text: #00FF00;
    --hl-link: #39FF14;
    --hl-border: #00FF00;
    --hl-dim: #005500;
    --hl-font: 'Courier New', 'Fira Code', monospace;
}

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

body {
    font-family: var(--hl-font);
    background-color: var(--hl-primary);
    color: var(--hl-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* === 扫描线效果 === */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
}

/* === 矩阵代码雨背景 === */
#hl-matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.08;
}

/* === 链接样式 === */
a {
    color: var(--hl-link);
    text-decoration: none;
    transition: opacity 0.1s;
}

a:hover {
    animation: hl-blink 0.15s infinite;
}

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

/* === 导航栏 === */
#hl-header {
    background: var(--hl-primary);
    border-bottom: 1px solid var(--hl-accent);
    padding: 12px 0;
    position: relative;
    z-index: 1000;
}

.hl-nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hl-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--hl-accent);
}

.hl-logo img {
    width: 32px;
    height: 32px;
}

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

.hl-nav-links li a {
    color: var(--hl-text);
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 4px;
}

.hl-nav-links li a::after {
    content: '_';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: hl-cursor-blink 0.8s infinite;
}

.hl-nav-links li a:hover::after {
    opacity: 1;
}

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

/* === 移动端菜单 === */
.hl-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--hl-accent);
    color: var(--hl-accent);
    font-family: var(--hl-font);
    font-size: 0.9rem;
    padding: 6px 12px;
    cursor: pointer;
}

.hl-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--hl-primary);
    border-bottom: 1px solid var(--hl-accent);
    padding: 16px 20px;
    z-index: 999;
}

.hl-mobile-menu.active {
    display: block;
}

.hl-mobile-menu a {
    display: block;
    padding: 8px 0;
    color: var(--hl-text);
    border-bottom: 1px solid var(--hl-dim);
}

/* === 主内容区 === */
.hl-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === 通用Section样式 === */
.hl-section {
    margin-bottom: 60px;
    border: 1px solid var(--hl-dim);
    padding: 30px;
    background: var(--hl-secondary);
    position: relative;
}

.hl-section-title {
    font-size: 1.4rem;
    color: var(--hl-accent);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hl-dim);
}

.hl-section-title::before {
    content: '> ';
    color: var(--hl-dim);
}

.hl-section-desc {
    color: var(--hl-dim);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* === 图片样式 === */
.hl-img-container {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--hl-dim);
    margin: 16px 0;
}

.hl-img-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* === 卡片网格 === */
.hl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.hl-card {
    border: 1px solid var(--hl-dim);
    padding: 20px;
    background: var(--hl-primary);
    transition: border-color 0.3s;
}

.hl-card:hover {
    border-color: var(--hl-accent);
}

.hl-card-title {
    font-size: 1rem;
    color: var(--hl-accent);
    margin-bottom: 10px;
}

.hl-card-meta {
    font-size: 0.75rem;
    color: var(--hl-dim);
    margin-bottom: 8px;
}

.hl-card-text {
    font-size: 0.85rem;
    color: var(--hl-text);
    opacity: 0.8;
}

/* === 数据泄露列表 === */
.hl-breach-list {
    list-style: none;
}

.hl-breach-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    font-size: 0.85rem;
}

.hl-breach-item:last-child {
    border-bottom: none;
}

.hl-breach-name {
    color: var(--hl-accent);
    flex: 1;
}

.hl-breach-count {
    color: var(--hl-link);
    margin: 0 20px;
}

.hl-breach-date {
    color: var(--hl-dim);
}

/* === 时间线 === */
.hl-timeline {
    position: relative;
    padding-left: 30px;
}

.hl-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--hl-dim);
}

.hl-timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.hl-timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 6px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--hl-accent);
    background: var(--hl-primary);
}

.hl-timeline-date {
    font-size: 0.75rem;
    color: var(--hl-dim);
}

.hl-timeline-title {
    font-size: 0.95rem;
    color: var(--hl-accent);
    margin: 4px 0;
}

.hl-timeline-desc {
    font-size: 0.8rem;
    color: var(--hl-text);
    opacity: 0.7;
}

/* === 表单样式 === */
.hl-form-group {
    margin-bottom: 20px;
}

.hl-form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--hl-accent);
    margin-bottom: 6px;
}

.hl-form-label::before {
    content: '[*] ';
    color: var(--hl-dim);
}

.hl-form-input,
.hl-form-select,
.hl-form-textarea {
    width: 100%;
    background: var(--hl-primary);
    border: 1px solid var(--hl-dim);
    color: var(--hl-text);
    font-family: var(--hl-font);
    font-size: 0.85rem;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.3s;
}

.hl-form-input:focus,
.hl-form-select:focus,
.hl-form-textarea:focus {
    border-color: var(--hl-accent);
}

.hl-form-textarea {
    min-height: 150px;
    resize: vertical;
}

.hl-btn {
    display: inline-block;
    background: none;
    border: 1px solid var(--hl-accent);
    color: var(--hl-accent);
    font-family: var(--hl-font);
    font-size: 0.9rem;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.hl-btn:hover {
    background: var(--hl-accent);
    color: var(--hl-primary);
}

/* === 页脚 === */
#hl-footer {
    border-top: 1px solid var(--hl-dim);
    padding: 40px 20px;
    background: var(--hl-primary);
}

.hl-footer-container {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.hl-footer-col h3 {
    color: var(--hl-accent);
    font-size: 0.9rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hl-dim);
}

.hl-footer-col ul {
    list-style: none;
}

.hl-footer-col ul li {
    margin-bottom: 8px;
}

.hl-footer-col ul li a {
    color: var(--hl-text);
    font-size: 0.8rem;
    opacity: 0.8;
}

.hl-footer-bottom {
    max-width: 1440px;
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--hl-dim);
    text-align: center;
    font-size: 0.75rem;
    color: var(--hl-dim);
}

.hl-footer-bottom a {
    color: var(--hl-dim);
}

.hl-footer-badges {
    margin-bottom: 10px;
}

.hl-footer-badges img {
    height: 20px;
    vertical-align: middle;
    margin: 0 4px;
}

/* === 打字机效果 === */
.hl-typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--hl-accent);
    animation: hl-typing 3s steps(40) 1s forwards, hl-cursor-blink 0.8s infinite;
    width: 0;
}

@keyframes hl-typing {
    from { width: 0; }
    to { width: 100%; }
}

/* === 会员区 === */
.hl-membership-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.hl-tier {
    border: 1px solid var(--hl-dim);
    padding: 24px;
    text-align: center;
}

.hl-tier-name {
    font-size: 1.1rem;
    color: var(--hl-accent);
    margin-bottom: 12px;
}

.hl-tier-features {
    list-style: none;
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.hl-tier-features li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.05);
}

.hl-tier-features li::before {
    content: '[+] ';
    color: var(--hl-dim);
}

/* === 文章页 === */
.hl-article {
    max-width: 900px;
    margin: 0 auto;
}

.hl-article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hl-dim);
}

.hl-article-title {
    font-size: 1.6rem;
    color: var(--hl-accent);
    margin-bottom: 12px;
}

.hl-article-meta {
    font-size: 0.8rem;
    color: var(--hl-dim);
}

.hl-article-content {
    font-size: 0.9rem;
    line-height: 1.8;
}

.hl-article-content h2 {
    color: var(--hl-accent);
    margin: 30px 0 15px;
    font-size: 1.2rem;
}

.hl-article-content h2::before {
    content: '## ';
    color: var(--hl-dim);
}

.hl-article-content p {
    margin-bottom: 16px;
}

.hl-article-content code {
    background: var(--hl-secondary);
    padding: 2px 6px;
    border: 1px solid var(--hl-dim);
    font-size: 0.85em;
}

.hl-article-content pre {
    background: var(--hl-secondary);
    border: 1px solid var(--hl-dim);
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 0.8rem;
}

/* === 社区讨论 === */
.hl-chat-window {
    background: var(--hl-primary);
    border: 1px solid var(--hl-dim);
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.8rem;
}

.hl-chat-msg {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.05);
}

.hl-chat-user {
    color: var(--hl-link);
}

.hl-chat-time {
    color: var(--hl-dim);
    font-size: 0.7rem;
}

.hl-chat-text {
    margin-top: 4px;
    color: var(--hl-text);
    opacity: 0.9;
}

/* === APP下载页 === */
.hl-app-page {
    text-align: center;
    padding: 60px 20px;
}

.hl-ascii-art {
    font-size: 0.5rem;
    line-height: 1;
    letter-spacing: 0;
    color: var(--hl-accent);
    margin: 30px auto;
    white-space: pre;
    overflow-x: auto;
}

.hl-download-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* === 响应式设计 === */
@media (max-width: 1024px) {
    .hl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hl-nav-links {
        display: none;
    }

    .hl-menu-btn {
        display: block;
    }

    .hl-footer-container {
        grid-template-columns: 1fr;
    }

    .hl-grid {
        grid-template-columns: 1fr;
    }

    .hl-section {
        padding: 20px 15px;
    }

    .hl-breach-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .hl-membership-tiers {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    html {
        font-size: 14px;
    }

    .hl-section-title {
        font-size: 1.1rem;
    }
}

/* === 干扰标签隐藏 === */
.matrix-jammer-block {
    display: none;
}

/* === 工具提示 === */
.hl-tooltip {
    position: relative;
}

.hl-tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--hl-secondary);
    border: 1px solid var(--hl-accent);
    padding: 4px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.hl-tooltip:hover::after {
    opacity: 1;
}

/* === 公告栏 === */
.hl-bulletin-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
}

.hl-bulletin-item:last-child {
    border-bottom: none;
}

.hl-bulletin-level {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid;
    font-size: 0.7rem;
    margin-right: 10px;
}

.hl-bulletin-level.critical {
    border-color: #ff0000;
    color: #ff0000;
}

.hl-bulletin-level.high {
    border-color: #ff8800;
    color: #ff8800;
}

.hl-bulletin-level.medium {
    border-color: #ffff00;
    color: #ffff00;
}

/* === 图表区域 === */
.hl-chart-container {
    width: 100%;
    height: 300px;
    border: 1px solid var(--hl-dim);
    padding: 15px;
    background: var(--hl-primary);
}
