/* ========================================
   洪山中学神人榜 - 猎奇风格样式表
   ======================================== */

:root {
  --bg-dark: #050505;
  --bg-card: #0a0a0f;
  --bg-card-hover: #12121a;
  --text-primary: #00ff00;
  --text-secondary: #00cc00;
  --accent-magenta: #ff00ff;
  --accent-yellow: #ffff00;
  --accent-cyan: #00ffff;
  --accent-red: #ff3333;
  --border-color: #333333;
  --scanline-color: rgba(0, 255, 0, 0.03);
}

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

body {
  font-family: 'VT323', 'Courier New', monospace;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 18px;
  line-height: 1.6;
}

/* ========================================
   CRT 扫描线效果
   ======================================== */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    var(--scanline-color) 0px,
    var(--scanline-color) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scanlines 0.1s linear infinite;
}

.crt-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

@keyframes scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(3px); }
}

/* ========================================
   警告横幅
   ======================================== */
.warning-banner {
  background: repeating-linear-gradient(
    90deg,
    var(--accent-yellow),
    var(--accent-yellow) 20px,
    #000 20px,
    #000 40px
  );
  color: #000;
  text-align: center;
  padding: 8px;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 4px;
  animation: warning-flash 2s ease-in-out infinite;
}

@keyframes warning-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ========================================
   滚动字幕
   ======================================== */
.marquee-container {
  background: var(--bg-card);
  border-top: 2px solid var(--accent-magenta);
  border-bottom: 2px solid var(--accent-magenta);
  overflow: hidden;
  padding: 10px 0;
}

.marquee-content {
  display: flex;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}

.marquee-content span {
  color: var(--accent-cyan);
  font-size: 16px;
  margin-right: 100px;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   头部区域
   ======================================== */
.hero {
  text-align: center;
  padding: 60px 20px;
  position: relative;
}

.glitch-container {
  position: relative;
  display: inline-block;
}

.glitch-title {
  font-family: 'Silkscreen', cursive;
  font-size: clamp(36px, 8vw, 72px);
  color: var(--text-primary);
  text-shadow:
    3px 0 var(--accent-magenta),
    -3px 0 var(--accent-cyan),
    0 0 20px var(--text-primary);
  letter-spacing: 4px;
  animation: glitch 2s infinite;
  position: relative;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-title::before {
  animation: glitch-1 0.3s infinite;
  color: var(--accent-red);
  z-index: -1;
}

.glitch-title::after {
  animation: glitch-2 0.3s infinite;
  color: var(--accent-cyan);
  z-index: -2;
}

@keyframes glitch {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 1px); }
  94% { transform: translate(2px, -1px); }
  96% { transform: translate(-1px, 2px); }
}

@keyframes glitch-1 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 0); }
  40% { clip-path: inset(40% 0 20% 0); transform: translate(3px, 0); }
  60% { clip-path: inset(60% 0 10% 0); transform: translate(-2px, 0); }
}

@keyframes glitch-2 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(10% 0 70% 0); transform: translate(3px, 0); }
  40% { clip-path: inset(30% 0 40% 0); transform: translate(-3px, 0); }
  60% { clip-path: inset(70% 0 5% 0); transform: translate(2px, 0); }
}

.subtitle {
  font-size: 24px;
  color: var(--accent-yellow);
  margin-top: 20px;
  letter-spacing: 8px;
  animation: flicker 3s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
  52% { opacity: 1; }
  54% { opacity: 0.6; }
  56% { opacity: 1; }
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  font-size: 20px;
}

.hero-stats strong {
  color: var(--accent-magenta);
  font-size: 28px;
}

/* ========================================
   筛选栏
   ======================================== */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.filter-btn {
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 10px 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.filter-btn:hover {
  border-color: var(--accent-magenta);
  box-shadow: 0 0 10px var(--accent-magenta);
}

.filter-btn.active {
  background: var(--accent-magenta);
  color: #000;
  border-color: var(--accent-magenta);
}

/* ========================================
   神人卡片网格
   ======================================== */
.gods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.god-card {
  background: var(--bg-card);
  border: 3px solid var(--border-color);
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.god-card:hover {
  border-color: var(--accent-magenta);
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 10px 30px rgba(255, 0, 255, 0.3),
    inset 0 0 30px rgba(255, 0, 255, 0.1);
}

.god-card:hover .god-image {
  filter: grayscale(0%) contrast(1.2);
  transform: scale(1.1);
}

.god-card:hover .god-name {
  animation: shake 0.5s ease-in-out infinite;
}

.god-image-container {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
}

.god-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  transition: all 0.3s ease;
}

.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-red);
  color: #fff;
  padding: 5px 12px;
  font-size: 20px;
  font-weight: bold;
  transform: rotate(-5deg);
  z-index: 2;
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 #000;
}

.rank-badge.ss {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
}

.rank-badge.s-plus {
  background: linear-gradient(135deg, #ff00ff, #ff3333);
}

.rank-badge.s {
  background: linear-gradient(135deg, #00ff00, #00ffff);
  color: #000;
}

.rank-badge.a-plus,
.rank-badge.a {
  background: #333;
}

.god-info {
  padding: 20px;
}

.god-name {
  font-family: 'Silkscreen', cursive;
  font-size: 24px;
  color: var(--accent-yellow);
  margin-bottom: 5px;
  position: relative;
}

.god-title {
  color: var(--accent-cyan);
  font-size: 16px;
  margin-bottom: 10px;
}

.god-class {
  display: inline-block;
  background: var(--border-color);
  padding: 3px 10px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.god-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.stat-item {
  font-size: 12px;
  padding: 2px 8px;
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
}

.worship-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 14px;
  color: var(--accent-magenta);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px) rotate(-1deg); }
  75% { transform: translateX(2px) rotate(1deg); }
}

/* ========================================
   膜拜按钮
   ======================================== */
.worship-section {
  text-align: center;
  padding: 40px 20px;
}

.worship-btn {
  font-family: 'Silkscreen', cursive;
  font-size: 24px;
  padding: 20px 50px;
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-red));
  color: #fff;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.worship-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255, 0, 255, 0.8);
}

.worship-btn .btn-icon {
  margin-left: 10px;
}

.worship-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

/* ========================================
   底部
   ======================================== */
.footer {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border-top: 2px solid var(--border-color);
}

.footer p {
  margin: 10px 0;
  color: var(--text-secondary);
}

.easter-egg {
  font-size: 12px;
  color: #444 !important;
}

/* ========================================
   弹窗
   ======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: modal-fade-in 0.3s ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: var(--bg-card);
  border: 4px solid var(--accent-red);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modal-slide-in 0.3s ease;
}

@keyframes modal-slide-in {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--accent-red);
  position: sticky;
  top: 0;
}

.secret-tape {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-content {
  padding: 30px;
}

.modal-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  filter: grayscale(100%);
  margin-bottom: 20px;
  border: 2px solid var(--accent-magenta);
}

.modal-rank {
  display: inline-block;
  background: var(--accent-magenta);
  color: #fff;
  padding: 5px 15px;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
}

.modal-name {
  font-family: 'Silkscreen', cursive;
  font-size: 36px;
  color: var(--accent-yellow);
  margin-bottom: 5px;
}

.modal-title {
  font-size: 20px;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}

.modal-description {
  background: rgba(0, 255, 0, 0.05);
  border-left: 4px solid var(--text-primary);
  padding: 15px;
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.8;
}

.modal-stats {
  margin-top: 20px;
}

.modal-stats h3 {
  color: var(--accent-magenta);
  margin-bottom: 15px;
  font-size: 20px;
}

.modal-stat-bar {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.modal-stat-label {
  width: 60px;
  font-size: 14px;
  color: var(--text-secondary);
}

.modal-stat-track {
  flex: 1;
  height: 20px;
  background: var(--border-color);
  margin: 0 10px;
  position: relative;
}

.modal-stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--text-primary), var(--accent-cyan));
  transition: width 0.5s ease;
}

.modal-stat-value {
  width: 30px;
  font-size: 14px;
  color: var(--accent-yellow);
}

.modal-worship {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px dashed var(--border-color);
}

.modal-worship-btn {
  font-family: 'VT323', monospace;
  font-size: 20px;
  padding: 15px 40px;
  background: var(--accent-magenta);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-worship-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--accent-magenta);
}

/* ========================================
   粒子效果
   ======================================== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

.particle {
  position: absolute;
  font-size: 30px;
  animation: particle-rise 2s ease-out forwards;
}

@keyframes particle-rise {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) rotate(360deg);
  }
}

/* ========================================
   隐藏模式（复活节彩蛋）
   ======================================== */
body.meltdown-mode {
  animation: meltdown 0.5s ease-in-out infinite;
}

body.meltdown-mode .crt-overlay {
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 0, 0, 0.1) 0px,
    rgba(255, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 3px
  );
}

@keyframes meltdown {
  0%, 100% { transform: rotate(0deg); filter: hue-rotate(0deg); }
  25% { transform: rotate(1deg) scale(1.01); filter: hue-rotate(90deg); }
  50% { transform: rotate(-1deg) scale(0.99); filter: hue-rotate(180deg); }
  75% { transform: rotate(0.5deg); filter: hue-rotate(270deg); }
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
  .hero {
    padding: 40px 15px;
  }

  .glitch-title {
    font-size: 32px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 15px;
  }

  .filter-bar {
    padding: 15px;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 14px;
  }

  .gods-grid {
    grid-template-columns: 1fr;
    padding: 20px 15px;
    gap: 20px;
  }

  .modal-container {
    margin: 10px;
  }

  .modal-name {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .glitch-title {
    font-size: 28px;
    letter-spacing: 2px;
  }

  .subtitle {
    font-size: 16px;
    letter-spacing: 4px;
  }

  .worship-btn {
    font-size: 18px;
    padding: 15px 30px;
  }
}
