/* ========================================
   暗网红队攻防实验室 - 全局样式
   主色调: #FF0000 (红队攻击红)
   辅助色: #0000FF (蓝队防御蓝), #00FF00 (代码绿)
   背景色: #000000 (矩阵黑)
   卡片色: #1A0000
   正文色: #FFD700
   ======================================== */

/* === 基础重置与变量 === */
:root {
  --red-attack: #FF0000;
  --blue-defense: #0000FF;
  --code-green: #00FF00;
  --matrix-black: #000000;
  --card-dark: #1A0000;
  --text-gold: #FFD700;
  --text-light: #E0E0E0;
  --border-red: rgba(255, 0, 0, 0.3);
  --glow-red: 0 0 10px rgba(255, 0, 0, 0.5);
  --glow-green: 0 0 10px rgba(0, 255, 0, 0.5);
  --glow-blue: 0 0 10px rgba(0, 0, 255, 0.5);
  --font-mono: 'Courier New', 'Fira Code', monospace;
  --font-main: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--matrix-black);
  color: var(--text-gold);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--code-green);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--red-attack);
  text-shadow: var(--glow-red);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === 矩阵代码雨背景 === */
.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.05;
}

/* === 终端风格容器 === */
.terminal-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === 导航栏 - 仿终端标题栏 === */
.nav-terminal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 2px solid var(--red-attack);
  padding: 0;
  backdrop-filter: blur(10px);
}

.nav-terminal .nav-header {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  background: linear-gradient(90deg, #1A0000, #000);
}

.nav-terminal .nav-dots {
  display: flex;
  gap: 6px;
  margin-right: 15px;
}

.nav-terminal .nav-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.nav-terminal .nav-dots span:nth-child(1) { background: #FF5F56; }
.nav-terminal .nav-dots span:nth-child(2) { background: #FFBD2E; }
.nav-terminal .nav-dots span:nth-child(3) { background: #27C93F; }

.nav-terminal .nav-title {
  font-family: var(--font-mono);
  color: var(--code-green);
  font-size: 14px;
}

.nav-terminal .nav-title::before {
  content: 'root@';
  color: var(--red-attack);
}

.nav-terminal .nav-title::after {
  content: ':~# ';
  color: var(--text-gold);
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  flex-wrap: wrap;
}

.nav-menu .nav-brand {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--red-attack);
  font-weight: bold;
  text-shadow: var(--glow-red);
}

.nav-menu .nav-links {
  display: flex;
  list-style: none;
  gap: 5px;
  flex-wrap: wrap;
}

.nav-menu .nav-links li a {
  display: block;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--code-green);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: all 0.3s;
}

.nav-menu .nav-links li a:hover,
.nav-menu .nav-links li a.active {
  border-color: var(--red-attack);
  background: rgba(255, 0, 0, 0.1);
  color: var(--red-attack);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--red-attack);
  color: var(--red-attack);
  padding: 8px 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  font-size: 14px;
}

/* === Hero区域 === */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,0,0,0.1), rgba(0,0,0,0.9), rgba(0,0,255,0.1));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
}

.hero-content h1 {
  font-family: var(--font-mono);
  font-size: 3rem;
  color: var(--red-attack);
  text-shadow: var(--glow-red);
  margin-bottom: 20px;
  animation: glitch 3s infinite;
}

.hero-content .hero-subtitle {
  font-size: 1.2rem;
  color: var(--code-green);
  font-family: var(--font-mono);
  margin-bottom: 30px;
}

.hero-content .hero-desc {
  font-size: 1rem;
  color: var(--text-gold);
  margin-bottom: 40px;
  line-height: 2;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.hero-stats .stat-item {
  background: var(--card-dark);
  border: 1px solid var(--border-red);
  padding: 20px;
  border-radius: 5px;
}

.hero-stats .stat-item .stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--red-attack);
  display: block;
}

.hero-stats .stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* === 按钮样式 === */
.btn-attack {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--red-attack), #8B0000);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-attack:hover {
  box-shadow: var(--glow-red);
  transform: translateY(-2px);
  color: #fff;
}

.btn-defense {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--blue-defense), #00008B);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-defense:hover {
  box-shadow: var(--glow-blue);
  transform: translateY(-2px);
  color: #fff;
}

.btn-terminal {
  display: inline-block;
  padding: 12px 30px;
  background: transparent;
  color: var(--code-green);
  font-family: var(--font-mono);
  font-size: 14px;
  border: 1px solid var(--code-green);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-terminal:hover {
  background: rgba(0, 255, 0, 0.1);
  box-shadow: var(--glow-green);
  color: var(--code-green);
}

/* === 内容区块 === */
.section-block {
  padding: 80px 0;
  position: relative;
}

.section-block::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-attack), transparent);
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--red-attack);
  margin-bottom: 10px;
  text-shadow: var(--glow-red);
}

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

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 40px;
  font-family: var(--font-mono);
}

/* === 卡片网格 === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

.attack-card {
  background: var(--card-dark);
  border: 1px solid var(--border-red);
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
}

.attack-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-attack), var(--blue-defense));
}

.attack-card:hover {
  border-color: var(--red-attack);
  box-shadow: var(--glow-red);
  transform: translateY(-5px);
}

.attack-card .card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-red);
}

.attack-card .card-body {
  padding: 20px;
}

.attack-card .card-tag {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--code-green);
  color: var(--code-green);
  border-radius: 2px;
  margin-bottom: 10px;
}

.attack-card .card-tag.red {
  border-color: var(--red-attack);
  color: var(--red-attack);
}

.attack-card .card-tag.blue {
  border-color: var(--blue-defense);
  color: var(--blue-defense);
}

.attack-card .card-title {
  font-size: 1.1rem;
  color: var(--text-gold);
  margin-bottom: 10px;
  font-weight: bold;
}

.attack-card .card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.attack-card .card-link {
  display: inline-block;
  margin-top: 15px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--code-green);
}

.attack-card .card-link::before {
  content: '$ ';
  color: var(--red-attack);
}

/* === 终端代码块 === */
.terminal-block {
  background: #0D0D0D;
  border: 1px solid var(--border-red);
  border-radius: 5px;
  overflow: hidden;
  margin: 20px 0;
}

.terminal-block .terminal-header {
  background: #1A1A1A;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-red);
}

.terminal-block .terminal-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-block .terminal-header span:nth-child(1) { background: #FF5F56; }
.terminal-block .terminal-header span:nth-child(2) { background: #FFBD2E; }
.terminal-block .terminal-header span:nth-child(3) { background: #27C93F; }

.terminal-block .terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--code-green);
  line-height: 1.8;
  overflow-x: auto;
}

.terminal-block .terminal-body .cmd-prompt::before {
  content: 'root@redteam:~# ';
  color: var(--red-attack);
}

.terminal-block .terminal-body .cmd-output {
  color: var(--text-light);
  padding-left: 20px;
}

/* === 渗透测试流程模拟器 === */
.pentest-simulator {
  background: var(--card-dark);
  border: 1px solid var(--border-red);
  border-radius: 5px;
  padding: 30px;
}

.pentest-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.pentest-step {
  flex: 1;
  min-width: 150px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-red);
  border-radius: 3px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.pentest-step:hover,
.pentest-step.active {
  border-color: var(--red-attack);
  background: rgba(255, 0, 0, 0.1);
}

.pentest-step .step-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: block;
}

.pentest-step .step-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-gold);
}

/* === 红蓝对抗沙盘 === */
.redblue-sandbox {
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  gap: 20px;
  align-items: center;
  margin: 30px 0;
}

.team-panel {
  padding: 20px;
  border-radius: 5px;
}

.team-panel.red-team {
  background: rgba(255, 0, 0, 0.05);
  border: 1px solid var(--red-attack);
}

.team-panel.blue-team {
  background: rgba(0, 0, 255, 0.05);
  border: 1px solid var(--blue-defense);
}

.team-panel .team-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.team-panel.red-team .team-title { color: var(--red-attack); }
.team-panel.blue-team .team-title { color: var(--blue-defense); }

.vs-divider {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--text-gold);
  font-weight: bold;
}

/* === 面包屑导航 === */
.breadcrumb {
  padding: 15px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--code-green);
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--red-attack);
}

/* === 页面内容区 === */
.page-content {
  padding-top: 100px;
  min-height: 80vh;
}

.page-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border-red);
  margin-bottom: 40px;
}

.page-header h1 {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  color: var(--red-attack);
  text-shadow: var(--glow-red);
  margin-bottom: 15px;
}

.page-header h1::before {
  content: '# ';
  color: var(--code-green);
}

.page-header .page-desc {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 800px;
}

.content-section {
  margin-bottom: 50px;
}

.content-section h2 {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text-gold);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.content-section h2::before {
  content: '## ';
  color: var(--red-attack);
}

.content-section h3 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--code-green);
  margin: 20px 0 10px;
}

.content-section p {
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.9;
}

.content-section ul,
.content-section ol {
  color: var(--text-light);
  padding-left: 25px;
  margin-bottom: 15px;
}

.content-section li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* === FAQ区域 === */
.faq-list {
  margin-top: 20px;
}

.faq-item {
  border: 1px solid var(--border-red);
  border-radius: 3px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item .faq-question {
  padding: 15px 20px;
  background: var(--card-dark);
  cursor: pointer;
  font-family: var(--font-mono);
  color: var(--text-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item .faq-question::after {
  content: '+';
  color: var(--red-attack);
  font-size: 1.2rem;
}

.faq-item.active .faq-question::after {
  content: '-';
}

.faq-item .faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s;
  color: var(--text-light);
}

.faq-item.active .faq-answer {
  padding: 15px 20px;
  max-height: 500px;
}

/* === 页脚 === */
.footer-terminal {
  background: #0A0A0A;
  border-top: 2px solid var(--red-attack);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  color: var(--red-attack);
  margin-bottom: 15px;
  font-size: 1rem;
}

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

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

.footer-col ul li a {
  color: var(--text-light);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

.footer-col ul li a::before {
  content: '> ';
  color: var(--code-green);
}

.footer-bottom {
  border-top: 1px solid var(--border-red);
  padding-top: 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-light);
}

/* === 搜索页 === */
.search-box {
  display: flex;
  gap: 10px;
  margin: 30px 0;
}

.search-box input {
  flex: 1;
  padding: 12px 20px;
  background: var(--card-dark);
  border: 1px solid var(--border-red);
  color: var(--code-green);
  font-family: var(--font-mono);
  font-size: 14px;
  border-radius: 3px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--red-attack);
  box-shadow: var(--glow-red);
}

.search-box button {
  padding: 12px 25px;
  background: var(--red-attack);
  color: #fff;
  border: none;
  font-family: var(--font-mono);
  cursor: pointer;
  border-radius: 3px;
}

.search-results {
  margin-top: 30px;
}

.search-result-item {
  padding: 20px;
  border: 1px solid var(--border-red);
  border-radius: 3px;
  margin-bottom: 15px;
  background: var(--card-dark);
}

.search-result-item h3 a {
  color: var(--text-gold);
  font-family: var(--font-mono);
}

.search-result-item p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* === 404页面 === */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 20px;
}

.error-page .error-code {
  font-family: var(--font-mono);
  font-size: 8rem;
  color: var(--red-attack);
  text-shadow: var(--glow-red);
  line-height: 1;
}

.error-page .error-msg {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--code-green);
  margin: 20px 0;
}

/* === Glitch动画 === */
@keyframes glitch {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 2px); }
  94% { transform: translate(2px, -2px); }
  96% { transform: translate(-1px, -1px); }
  98% { transform: translate(1px, 1px); }
}

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

@keyframes blink {
  50% { border-color: transparent; }
}

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

/* === 响应式设计 === */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 2.2rem; }
  .redblue-sandbox { grid-template-columns: 1fr; }
  .vs-divider { transform: rotate(90deg); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 10px 0;
  }
  .nav-menu .nav-links.active { display: flex; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 1.4rem; }
  .card-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.6rem; }
  .pentest-steps { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.4rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .terminal-block .terminal-body { font-size: 11px; }
}

/* === 表格样式 === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 13px;
}

.data-table th {
  background: var(--card-dark);
  color: var(--red-attack);
  padding: 12px 15px;
  text-align: left;
  border: 1px solid var(--border-red);
}

.data-table td {
  padding: 10px 15px;
  border: 1px solid var(--border-red);
  color: var(--text-light);
}

.data-table tr:hover td {
  background: rgba(255, 0, 0, 0.05);
}

/* === 内链网络样式 === */
.related-links {
  margin-top: 40px;
  padding: 20px;
  background: var(--card-dark);
  border: 1px solid var(--border-red);
  border-radius: 5px;
}

.related-links h4 {
  font-family: var(--font-mono);
  color: var(--text-gold);
  margin-bottom: 15px;
}

.related-links ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.related-links ul li a {
  font-family: var(--font-mono);
  font-size: 13px;
}

.related-links ul li a::before {
  content: '├── ';
  color: var(--red-attack);
}

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

.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.app-feature-item {
  padding: 30px;
  background: var(--card-dark);
  border: 1px solid var(--border-red);
  border-radius: 5px;
}

.app-feature-item h3 {
  color: var(--text-gold);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

.app-feature-item p {
  color: var(--text-light);
  font-size: 0.9rem;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--red-attack);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #CC0000;
}
