/* Reset & 全局 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Courier New", "Consolas", monospace;
  line-height: 1.6;
  color: #00ff00;
  background: #0a0a0a;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 容器 */
.container {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部导航 */
nav {
  background: #111;
  padding: 10px 0;
  border-bottom: 1px solid #00ff00;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

nav a {
  color: #00ff00;
  text-decoration: none;
  margin: 0 20px;
  padding: 5px 10px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav a:hover {
  border: 1px solid #00ff00;
  box-shadow: 0 0 10px #00ff00;
  text-shadow: 0 0 5px #00ff00;
}

nav a.active {
  border: 1px solid #00ff00;
  background: rgba(0, 255, 0, 0.1);
  text-shadow: 0 0 5px #00ff00;
}

/* 页眉 */
header {
  padding: 30px 0 20px;
}

header h1 {
  color: #00ff00;
  margin-bottom: 20px;
  text-align: center;
  font-size: 2em;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 10px #00ff00;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
  }
  to {
    text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00, 0 0 40px #00ff00;
  }
}

/* 文章区 */
article {
  background: #111;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid #333;
  border-left: 3px solid #00ff00;
  position: relative;
}

article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 49%, rgba(0, 255, 0, 0.03) 50%, transparent 51%);
  pointer-events: none;
}

article h2 {
  color: #00ff00;
  margin-bottom: 15px;
  font-size: 1.3em;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

article p {
  margin-bottom: 15px;
  font-size: 0.9em;
  line-height: 1.6;
  color: #ccc;
}

article ul, article ol {
  margin: 15px 0;
  padding-left: 20px;
}

article li {
  margin-bottom: 8px;
  font-size: 0.9em;
  line-height: 1.5;
  color: #ccc;
}

article ul li::marker {
  content: '> ';
  color: #00ff00;
}

article strong {
  color: #00ff00;
  font-weight: normal;
}

/* 页脚 */
footer {
  text-align: center;
  font-size: 0.8em;
  color: #666;
  margin: 30px 0;
  padding: 15px;
  border-top: 1px solid #333;
}

/* 图片画廊样式 */
.character-gallery {
  text-align: center;
  margin: 30px 0;
  padding: 20px;
  border: 2px solid #00ff00;
  border-radius: 10px;
  background: rgba(0, 255, 0, 0.05);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.gallery-image {
  max-width: 100%;
  height: auto;
  border: 2px solid #00ff00;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
  transition: all 0.3s ease;
}

.gallery-image:hover {
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.8);
  transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 0 15px;
  }
  
  nav .container {
    flex-direction: column;
    gap: 10px;
  }
  
  nav a {
    margin: 5px 10px;
  }
  
  header h1 {
    font-size: 1.5em;
    letter-spacing: 2px;
  }
  
  article {
    padding: 15px;
    margin: 15px 0;
  }
  
  article h2 {
    font-size: 1.1em;
  }
  
  .content-with-image {
    flex-direction: column;
  }
  
  .author-portrait {
    float: none;
    margin: 15px auto;
    max-width: 150px;
  }
  
  .character-gallery {
    margin: 20px 0;
    padding: 15px;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

article {
  animation: fadeInUp 0.4s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00ff00;
  box-shadow: 0 0 5px #00ff00;
}

/* 终端效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 0, 0.03) 2px,
      rgba(0, 255, 0, 0.03) 4px
    );
  pointer-events: none;
  z-index: 1000;
}

/* 选中文本效果 */
::selection {
  background: rgba(0, 255, 0, 0.3);
  color: #00ff00;
}

/* 图片样式 */
.hero-image {
  text-align: center;
  margin: 20px 0 30px;
  padding: 15px;
  border: 1px solid #333;
  background: #0f0f0f;
}

.main-image {
  max-width: 100%;
  height: auto;
  border: 2px solid #00ff00;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
  filter: brightness(0.8) contrast(1.2);
  transition: all 0.3s ease;
}

.main-image:hover {
  filter: brightness(1) contrast(1.3);
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.5);
}

.content-with-image {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  align-items: flex-start;
}

.text-content {
  flex: 2;
}

.side-image {
  flex: 1;
  text-align: center;
  padding: 10px;
  border: 1px solid #333;
  background: #0f0f0f;
}

.content-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #00ff00;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
  filter: brightness(0.8);
  transition: all 0.3s ease;
}

.content-image:hover {
  filter: brightness(1);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.image-caption {
  margin-top: 8px;
  font-size: 0.8em;
  color: #888;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.author-portrait {
  float: right;
  margin: 0 0 15px 20px;
  padding: 10px;
  border: 1px solid #333;
  background: #0f0f0f;
  text-align: center;
  max-width: 200px;
}

.portrait-image {
  width: 100%;
  height: auto;
  border: 1px solid #00ff00;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.2);
  filter: brightness(0.8);
}

.character-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.character-card {
  text-align: center;
  padding: 10px;
  border: 1px solid #333;
  background: #0f0f0f;
  transition: all 0.3s ease;
}

.character-card:hover {
  border-color: #00ff00;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.character-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border: 1px solid #555;
  filter: brightness(0.8);
  transition: all 0.3s ease;
}

.character-image:hover {
  filter: brightness(1);
  border-color: #00ff00;
}

.character-name {
  margin-top: 8px;
  font-size: 0.8em;
  color: #00ff00;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 诗词赏析样式 */
.poetry-section {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #333;
  background: #0a0a0a;
  border-left: 3px solid #00ff00;
}

.poetry-section h4 {
  color: #00ff00;
  margin-bottom: 10px;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.poetry-text {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.6;
  color: #ccc;
  background: #111;
  padding: 12px;
  border: 1px solid #333;
  margin: 10px 0;
  white-space: pre-line;
  text-align: center;
  border-radius: 3px;
}

.poetry-analysis {
  font-size: 0.85em;
  color: #888;
  font-style: italic;
  margin-top: 8px;
  padding: 8px;
  border-left: 2px solid #555;
  background: #0f0f0f;
}

/* 响应式图片 */
@media (max-width: 768px) {
  .content-with-image {
    flex-direction: column;
  }
  
  .author-portrait {
    float: none;
    margin: 15px auto;
    max-width: 150px;
  }
  
  .character-gallery {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }
  
  .character-image {
    height: 100px;
  }
  
  .poetry-section {
    padding: 10px;
  }
  
  .poetry-text {
    font-size: 0.8em;
    padding: 8px;
  }
}