:root {
  --primary: #2A2A72;
  --secondary: #009FFD;
  --text: #444;
}

/* 通用样式 */
body {
  font-family: 'Segoe UI', system-ui;
  line-height: 1.6;
  margin: 0;
  background: #f8f9fa;
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 主页卡片样式 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.tag {
  display: inline-block;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.9em;
  margin: 0.5rem 0.2rem;
}

/* 详情页样式 */
.article-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 4rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.architecture-img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 备案信息 */
.footer {
  text-align: center;
  padding: 2rem;
  background: #1a1a1a;
  color: white;
  margin-top: 3rem;
}

.footer a {
  color: #00b4ff;
  text-decoration: none;
}

/* 新增标题样式重置 */
a {
  color: inherit;
  text-decoration: none;
}

.article-header h1 {
  color: white !important;
  font-size: 2.8rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  margin-bottom: 1rem;
}


/* 新增卡片动画 */
.card {
  transition: 
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* 步骤指示器 */
.steps {
  counter-reset: step;
  margin: 2rem 0;
}

.step {
  position: relative;
  padding-left: 50px;
  margin: 2rem 0;
}

.step h3::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* 内存分析专用样式 */
.text-analysis {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.leak-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.leak-table th,
.leak-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.leak-table th {
    background-color: var(--primary);
    color: white;
}

.leak-table tr:nth-child(even) {
    background-color: #f2f2f2;
}