/* ============================================
   里番动漫百科全书 - 蒸汽波复古风格样式表
   CSS前缀: ld-
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

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

/* --- CSS变量 --- */
:root {
  --ld-primary: #0D0221;
  --ld-secondary: #241734;
  --ld-accent-pink: #FF00E4;
  --ld-accent-blue: #00F2FF;
  --ld-text: #F0F0F0;
  --ld-link: #00F2FF;
  --ld-font-title: 'Press Start 2P', cursive;
  --ld-font-body: 'VT323', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--ld-primary);
  color: var(--ld-text);
  font-family: var(--ld-font-body);
  font-size: 1.2rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--ld-accent-pink);
  text-shadow: 0 0 10px var(--ld-accent-pink);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ld-font-title);
  color: var(--ld-accent-pink);
  line-height: 1.4;
}

h1 { font-size: 1.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.2rem; margin-bottom: 0.8rem; }
h3 { font-size: 1rem; margin-bottom: 0.6rem; }

/* --- Scanline Overlay --- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.05) 0px,
    rgba(0, 0, 0, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 9999;
}

/* --- Navigation --- */
#ld-header {
  background-color: var(--ld-secondary);
  padding: 1rem 2rem;
  border-bottom: 2px solid var(--ld-accent-pink);
  position: relative;
  z-index: 1000;
}

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

.ld-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ld-logo img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

.ld-logo-text {
  font-family: var(--ld-font-title);
  font-size: 0.7rem;
  color: var(--ld-accent-pink);
  text-shadow: 0 0 10px var(--ld-accent-pink);
}

.ld-nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.ld-nav-links a {
  font-family: var(--ld-font-body);
  font-size: 1.2rem;
  color: var(--ld-text);
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.ld-nav-links a:hover {
  color: var(--ld-accent-blue);
  text-shadow: 0 0 15px var(--ld-accent-blue), 0 0 30px var(--ld-accent-blue);
}

/* Hamburger Menu */
.ld-hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.ld-hamburger span {
  width: 30px;
  height: 3px;
  background: var(--ld-accent-pink);
  transition: all 0.3s ease;
}

.ld-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 2, 33, 0.97);
  z-index: 9998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.ld-mobile-menu.ld-active {
  display: flex;
}

.ld-mobile-menu a {
  font-family: var(--ld-font-title);
  font-size: 1rem;
  color: var(--ld-accent-blue);
  text-shadow: 0 0 20px var(--ld-accent-blue);
}

.ld-mobile-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--ld-accent-pink);
  cursor: pointer;
}

/* --- Hero / Timeline Section --- */
#ld-timeline-index {
  position: relative;
  padding: 4rem 2rem;
  background: url('../images/timeline-bg.webp') center/cover no-repeat;
  min-height: 400px;
  overflow: hidden;
}

#ld-timeline-index::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(13,2,33,0.7) 0%, rgba(36,23,52,0.9) 100%);
}

.ld-timeline-content {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
}

.ld-timeline-content h2 {
  color: var(--ld-accent-blue);
  text-shadow: 0 0 20px var(--ld-accent-blue);
  margin-bottom: 1rem;
}

.ld-timeline-content p {
  font-size: 1.4rem;
  color: var(--ld-text);
  opacity: 0.9;
}

.ld-timeline-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 2rem 0;
  scroll-snap-type: x mandatory;
}

.ld-timeline-scroll::-webkit-scrollbar {
  height: 6px;
}

.ld-timeline-scroll::-webkit-scrollbar-track {
  background: var(--ld-secondary);
}

.ld-timeline-scroll::-webkit-scrollbar-thumb {
  background: var(--ld-accent-pink);
  border-radius: 3px;
}

.ld-timeline-item {
  flex: 0 0 200px;
  scroll-snap-align: start;
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--ld-accent-pink);
  background: rgba(36, 23, 52, 0.8);
  transition: all 0.3s ease;
}

.ld-timeline-item:hover {
  box-shadow: 0 0 20px var(--ld-accent-pink);
  transform: translateY(-5px);
}

.ld-timeline-item .ld-year {
  font-family: var(--ld-font-title);
  font-size: 0.8rem;
  color: var(--ld-accent-blue);
  display: block;
  margin-bottom: 0.5rem;
}

.ld-timeline-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 1px solid var(--ld-accent-blue);
}

/* --- Section Common --- */
.ld-section {
  padding: 4rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

.ld-section-title {
  font-family: var(--ld-font-title);
  font-size: 1.1rem;
  color: var(--ld-accent-pink);
  text-shadow: 0 0 10px var(--ld-accent-pink);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ld-accent-pink);
  display: inline-block;
}

.ld-section-desc {
  font-size: 1.3rem;
  color: var(--ld-text);
  opacity: 0.85;
  margin-bottom: 2rem;
}

/* --- Today's Archive Cards --- */
.ld-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.ld-archive-card {
  background: var(--ld-secondary);
  border: 2px solid var(--ld-accent-pink);
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.ld-archive-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 0, 228, 0.03) 0px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 1;
}

.ld-archive-card:hover {
  box-shadow: 0 0 25px rgba(255, 0, 228, 0.5), 0 0 50px rgba(0, 242, 255, 0.2);
  transform: scale(1.02);
}

.ld-archive-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.ld-archive-card-info {
  padding: 1rem;
}

.ld-archive-card-info h3 {
  font-family: var(--ld-font-body);
  font-size: 1.3rem;
  color: var(--ld-accent-blue);
  margin-bottom: 0.3rem;
}

.ld-archive-card-info .ld-card-meta {
  font-size: 1rem;
  color: rgba(240, 240, 240, 0.6);
}

/* --- Random Entry Section --- */
#ld-random-entry {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--ld-secondary);
}

.ld-random-btn {
  display: inline-block;
  padding: 1.5rem 3rem;
  font-family: var(--ld-font-title);
  font-size: 0.9rem;
  color: var(--ld-primary);
  background: var(--ld-accent-blue);
  border: 3px solid var(--ld-accent-pink);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.ld-random-btn:hover {
  background: var(--ld-accent-pink);
  color: var(--ld-text);
  box-shadow: 0 0 30px var(--ld-accent-pink);
}

/* --- Thematic Labs --- */
.ld-labs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.ld-lab-card {
  background: var(--ld-secondary);
  border: 1px solid var(--ld-accent-blue);
  overflow: hidden;
  transition: all 0.3s ease;
}

.ld-lab-card:hover {
  border-color: var(--ld-accent-pink);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.ld-lab-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.ld-lab-card-body {
  padding: 1.5rem;
}

.ld-lab-card-body h3 {
  font-family: var(--ld-font-title);
  font-size: 0.7rem;
  color: var(--ld-accent-pink);
  margin-bottom: 0.8rem;
}

.ld-lab-card-body p {
  font-size: 1.2rem;
  color: var(--ld-text);
  opacity: 0.8;
}

/* --- Studio Archaeology --- */
.ld-studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.ld-studio-item {
  background: var(--ld-secondary);
  border: 1px solid var(--ld-accent-blue);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ld-studio-item:hover {
  border-color: var(--ld-accent-pink);
  box-shadow: 0 0 15px var(--ld-accent-pink);
}

.ld-studio-item img {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  image-rendering: pixelated;
}

.ld-studio-item span {
  font-family: var(--ld-font-body);
  font-size: 1.1rem;
  color: var(--ld-accent-blue);
}

/* --- Glossary --- */
.ld-glossary-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ld-glossary-item {
  background: var(--ld-secondary);
  border-left: 4px solid var(--ld-accent-pink);
  padding: 1.5rem;
}

.ld-glossary-item h3 {
  font-family: var(--ld-font-title);
  font-size: 0.7rem;
  color: var(--ld-accent-blue);
  margin-bottom: 0.5rem;
}

.ld-glossary-item p {
  font-size: 1.1rem;
  color: var(--ld-text);
  opacity: 0.85;
}

/* --- Data Viz --- */
#ld-data-viz {
  background: var(--ld-secondary);
  padding: 4rem 2rem;
}

.ld-chart-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--ld-primary);
  border: 2px solid var(--ld-accent-blue);
  padding: 2rem;
}

/* --- Bounty Board --- */
.ld-bounty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ld-bounty-card {
  background: var(--ld-secondary);
  border: 2px dashed var(--ld-accent-pink);
  padding: 1.5rem;
  position: relative;
}

.ld-bounty-card::after {
  content: '📌';
  position: absolute;
  top: -10px;
  right: 10px;
  font-size: 1.5rem;
}

.ld-bounty-card h3 {
  font-family: var(--ld-font-body);
  font-size: 1.3rem;
  color: var(--ld-accent-pink);
  margin-bottom: 0.5rem;
}

.ld-bounty-card p {
  font-size: 1.1rem;
  opacity: 0.8;
}

.ld-bounty-card .ld-bounty-status {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  border: 1px solid var(--ld-accent-blue);
  color: var(--ld-accent-blue);
}

/* --- Affiliates --- */
.ld-affiliates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.ld-affiliate-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--ld-accent-blue);
  background: var(--ld-secondary);
  transition: all 0.3s ease;
}

.ld-affiliate-link:hover {
  border-color: var(--ld-accent-pink);
  box-shadow: 0 0 10px var(--ld-accent-pink);
}

/* --- Support Section --- */
#ld-support {
  background: url('../images/support-bg.webp') center/cover no-repeat;
  position: relative;
  padding: 4rem 2rem;
  text-align: center;
}

#ld-support::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 2, 33, 0.85);
}

#ld-support .ld-section {
  position: relative;
  z-index: 1;
}

.ld-support-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.ld-support-card {
  background: var(--ld-secondary);
  border: 2px solid var(--ld-accent-blue);
  padding: 2rem;
  min-width: 200px;
  text-align: center;
}

.ld-support-card h3 {
  font-family: var(--ld-font-body);
  font-size: 1.4rem;
  color: var(--ld-accent-blue);
  margin-bottom: 0.5rem;
}

.ld-support-card p {
  font-size: 1rem;
  color: var(--ld-text);
  opacity: 0.8;
  word-break: break-all;
}

/* --- Footer --- */
#ld-footer {
  background: var(--ld-secondary);
  border-top: 2px solid var(--ld-accent-pink);
  padding: 3rem 2rem 1.5rem;
}

.ld-footer-grid {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.ld-footer-col h4 {
  font-family: var(--ld-font-title);
  font-size: 0.6rem;
  color: var(--ld-accent-blue);
  margin-bottom: 1rem;
}

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

.ld-footer-col ul li {
  margin-bottom: 0.5rem;
}

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

.ld-footer-col ul li a:hover {
  color: var(--ld-accent-pink);
  opacity: 1;
}

.ld-footer-bottom {
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 0, 228, 0.3);
}

.ld-footer-bottom .ld-cert-badge {
  display: inline-block;
  margin-bottom: 1rem;
}

.ld-footer-bottom .ld-cert-badge img {
  width: 60px;
  height: 60px;
  display: inline-block;
  margin: 0 auto;
}

.ld-footer-certs {
  font-size: 1rem;
  color: var(--ld-text);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.ld-footer-certs a {
  color: var(--ld-accent-blue);
}

.ld-footer-copyright {
  font-size: 0.9rem;
  color: var(--ld-text);
  opacity: 0.5;
}

/* --- Inner Pages --- */
.ld-page-header {
  background: var(--ld-secondary);
  padding: 3rem 2rem;
  text-align: center;
  border-bottom: 2px solid var(--ld-accent-pink);
}

.ld-page-header h1 {
  text-shadow: 0 0 20px var(--ld-accent-pink);
}

.ld-page-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.ld-page-content p {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  line-height: 1.8;
}

/* --- Voice Actor Page --- */
.ld-search-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ld-search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.8rem 1.2rem;
  background: var(--ld-primary);
  border: 2px solid var(--ld-accent-blue);
  color: var(--ld-text);
  font-family: var(--ld-font-body);
  font-size: 1.2rem;
}

.ld-search-input:focus {
  outline: none;
  border-color: var(--ld-accent-pink);
  box-shadow: 0 0 10px var(--ld-accent-pink);
}

.ld-search-btn {
  padding: 0.8rem 2rem;
  background: var(--ld-accent-pink);
  color: var(--ld-primary);
  border: none;
  font-family: var(--ld-font-title);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ld-search-btn:hover {
  background: var(--ld-accent-blue);
  box-shadow: 0 0 15px var(--ld-accent-blue);
}

.ld-filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ld-filter-select {
  padding: 0.6rem 1rem;
  background: var(--ld-primary);
  border: 1px solid var(--ld-accent-blue);
  color: var(--ld-text);
  font-family: var(--ld-font-body);
  font-size: 1.1rem;
}

.ld-actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.ld-actor-card {
  background: var(--ld-secondary);
  border: 1px solid var(--ld-accent-blue);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.ld-actor-card:hover {
  border-color: var(--ld-accent-pink);
  box-shadow: 0 0 20px rgba(255, 0, 228, 0.4);
}

.ld-actor-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 2px solid var(--ld-accent-pink);
  object-fit: cover;
}

.ld-actor-card h3 {
  font-family: var(--ld-font-body);
  font-size: 1.4rem;
  color: var(--ld-accent-blue);
  margin-bottom: 0.3rem;
}

.ld-actor-card .ld-actor-meta {
  font-size: 1rem;
  color: var(--ld-text);
  opacity: 0.7;
}

/* --- APP Easter Egg Page --- */
.ld-app-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: var(--ld-primary);
}

.ld-app-page img {
  max-width: 600px;
  width: 100%;
  margin-bottom: 2rem;
  border: 2px solid var(--ld-accent-blue);
}

.ld-app-page h1 {
  margin-bottom: 1rem;
}

.ld-app-page p {
  font-size: 1.3rem;
  max-width: 600px;
  opacity: 0.85;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1440px) {
  .ld-section {
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 1024px) {
  .ld-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ld-labs-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .ld-nav-links {
    display: none;
  }
  
  .ld-hamburger {
    display: flex;
  }
  
  h1 { font-size: 1.1rem; }
  h2 { font-size: 0.9rem; }
  
  .ld-footer-grid {
    grid-template-columns: 1fr;
  }
  
  .ld-archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  .ld-archive-card img {
    height: 200px;
  }
  
  .ld-timeline-scroll {
    gap: 1rem;
  }
  
  .ld-timeline-item {
    flex: 0 0 160px;
  }
  
  .ld-search-bar {
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  body {
    font-size: 1rem;
  }
  
  #ld-header {
    padding: 0.8rem 1rem;
  }
  
  .ld-section {
    padding: 2rem 1rem;
  }
  
  .ld-archive-grid {
    grid-template-columns: 1fr;
  }
  
  h1 { font-size: 0.9rem; }
}

/* --- Animations --- */
@keyframes ld-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes ld-glow {
  0%, 100% { text-shadow: 0 0 10px var(--ld-accent-pink); }
  50% { text-shadow: 0 0 20px var(--ld-accent-pink), 0 0 40px var(--ld-accent-pink); }
}

.ld-flicker {
  animation: ld-flicker 3s infinite;
}

.ld-glow {
  animation: ld-glow 2s infinite;
}
