
/* 定义CSS变量 */
:root {
  --dark-blue: #0A192F;
  --black: #000000;
  --electric-purple: #646FF0;
  --neon-green: #00FFA3;
  --bright-orange: #FF5722;
  --white: #FFFFFF;
  --font-title: 'Roboto Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--dark-blue);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  padding: 20px;
  background-image: radial-gradient(circle, #000000 1px, transparent 1px), 
                    radial-gradient(circle, #646FF0 1px, transparent 1px);
  background-size: 200px 200px;
  animation: stars 50s infinite linear;
}

/* 动态星空背景动画 */
@keyframes stars {
  0% { background-position: 0 0; }
  100% { background-position: 200px 200px; }
}

/* 容器布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 标题样式 */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--electric-purple);
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
}

h2 {
  font-size: 2rem;
  margin-top: 40px;
}

h3 {
  font-size: 1.5rem;
  margin-top: 30px;
}

h4 {
  font-size: 1.2rem;
  margin-top: 25px;
}

/* 段落样式 */
p {
  margin-bottom: 20px;
  font-size: 1rem;
}

/* 代码块样式 */
pre {
  background-color: #1e1e1e;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
}

code {
  font-family: 'Courier New', Courier, monospace;
  color: #00FFA3;
}

/* 按钮样式 */
button, .btn {
  background-color: var(--electric-purple);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  font-family: var(--font-title);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover, .btn:hover {
  background-color: var(--neon-green);
  transform: scale(1.05);
}

button::before, .btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: all 0.5s ease;
}

button:hover::before, .btn:hover::before {
  width: 200px;
  height: 200px;
  opacity: 1;
}

/* 卡片样式 */
.card {
  background-color: var(--black);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.card img {
  width: 100%;
  height: auto;
}

.card-content {
  padding: 15px;
  color: var(--white);
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--electric-purple);
}

.card-description {
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.card-button {
  background-color: var(--bright-orange);
  color: var(--white);
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-title);
  transition: background-color 0.3s ease;
}

.card-button:hover {
  background-color: var(--neon-green);
}

/* 布局网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

/* 图文并茂布局 */
.image-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.image-text img {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 1440px) {
  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 1200px) {
  .container {
    padding: 0 20px;
  }
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  
  .card-description {
    font-size: 0.9rem;
  }
}

@media (max-width: 320px) {
  h1 {
    font-size: 1.5rem;
  }
  
  .card-button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

/* 特殊提示样式 */
.reference-note {
  background: linear-gradient(135deg, var(--electric-purple), var(--neon-green));
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
  color: var(--black);
  margin-bottom: 30px;
}

/* 示例展示样式 */
.sample-display {
  border: 2px dashed var(--bright-orange);
  padding: 20px;
  border-radius: 10px;
  margin-top: 40px;
  background-color: rgba(255, 87, 34, 0.1);
}

.sample-display h2 {
  color: var(--bright-orange);
}

.sample-display pre {
  background-color: #1e1e1e;
  padding: 10px;
  border-radius: 5px;
}

/* 按钮涟漪效果 */
.ripple {
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.5s ease-out;
}

@keyframes ripple {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

/* 图标样式 */
.icon {
  width: 24px;
  height: 24px;
  fill: var(--electric-purple);
  transition: fill 0.3s ease;
}

.icon:hover {
  fill: var(--neon-green);
}

/* 数据可视化图表样式 */
.chart {
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 20px auto;
}

/* 个性化推荐卡片 */
.recommendation-card {
  background-color: var(--black);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.recommendation-card h4 {
  color: var(--electric-purple);
  margin-bottom: 10px;
}

.recommendation-card p {
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.recommendation-card a {
  text-decoration: none;
  color: var(--bright-orange);
  font-weight: bold;
}

.recommendation-card a:hover {
  color: var(--neon-green);
  text-decoration: underline;
}

