/* =============================================================
   ANIME THEME CSS — AOT + Lain + Cyberpunk
   21 visual effects — pure overlay
   ============================================================= */

/* =================== AOT =================== */

.aot-wing { font-size: 0.7em; opacity: 0.7; }

.aot-progress-walls {
  display: flex; gap: 4px; margin-left: auto;
}
.aot-pw {
  font-size: 0.5rem; font-weight: 700; letter-spacing: 0.1em;
  padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--c); color: var(--c);
  background: color-mix(in srgb, var(--c) 6%, transparent);
}

.aot-titan-size {
  display: inline-block; font-size: 0.55rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; margin-bottom: 8px;
  background: rgba(232,93,58,0.08); color: #e85d3a;
  border: 1px solid rgba(232,93,58,0.2);
  letter-spacing: 0.08em; text-transform: uppercase;
}

.aot-heart-burst {
  position: absolute; top: 0; right: 30px;
  font-size: 1.4rem; pointer-events: none;
  animation: aotHeartPop 0.8s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes aotHeartPop {
  0% { transform: scale(0.3) translateY(0); opacity: 1; }
  100% { transform: scale(1.5) translateY(-40px); opacity: 0; }
}

.aot-beyond-banner {
  text-align: center; padding: 20px; margin-bottom: 20px;
  border: 1px solid rgba(232,93,58,0.15); border-radius: 12px;
  background: linear-gradient(135deg, rgba(232,93,58,0.04), rgba(240,180,41,0.03));
}
.aot-beyond-jp { display: block; font-size: 1.1rem; color: #e85d3a; margin-bottom: 4px; }
.aot-beyond-en { font-size: 0.72rem; color: rgba(255,255,255,0.35); letter-spacing: 0.08em; }

.aot-rank {
  font-size: 0.65rem; padding: 3px 10px; border-radius: 6px;
  background: rgba(240,180,41,0.08); color: #f0b429;
  border: 1px solid rgba(240,180,41,0.2); margin-left: 12px;
  font-weight: 600;
}

/* =================== LAIN =================== */

/* Glitch effect on title */
.lain-glitch {
  position: relative;
  animation: lainGlitchAnim 4s infinite;
}
.lain-glitch::before,
.lain-glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.lain-glitch::before {
  color: #0ff;
  animation: lainGlitch1 3s infinite;
  clip-path: inset(0 0 80% 0);
}
.lain-glitch::after {
  color: #f0f;
  animation: lainGlitch2 2.5s infinite;
  clip-path: inset(80% 0 0 0);
}
@keyframes lainGlitch1 {
  0%,92%,100% { transform: translate(0); }
  93% { transform: translate(-2px, 1px); }
  95% { transform: translate(2px, -1px); }
  97% { transform: translate(-1px, 0); }
}
@keyframes lainGlitch2 {
  0%,90%,100% { transform: translate(0); }
  91% { transform: translate(2px, 1px); }
  94% { transform: translate(-2px, -1px); }
  96% { transform: translate(1px, 0); }
}
@keyframes lainGlitchAnim {
  0%,95%,100% { opacity: 1; }
  96% { opacity: 0.85; }
  97% { opacity: 1; }
}

.lain-layer {
  font-size: 0.55rem; font-weight: 700; opacity: 0.4;
  margin-right: 4px; font-family: monospace; letter-spacing: 0.05em;
}

/* Subtle noise overlay */
.lain-noise-overlay {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
  mix-blend-mode: overlay;
}

/* Terminal code header */
.lain-terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 0 10px; border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 10px;
}
.lain-dot { width: 8px; height: 8px; border-radius: 50%; }
.lain-dot-r { background: #e85d3a; }
.lain-dot-y { background: #f0b429; }
.lain-dot-g { background: #10b981; }
.lain-terminal-title {
  font-size: 0.55rem; color: rgba(255,255,255,0.2);
  font-family: monospace; letter-spacing: 0.08em; margin-left: auto;
}

/* "Present Day" flash */
.lain-flash {
  position: fixed; inset: 0; z-index: 99998;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.9); pointer-events: none;
  animation: lainFlashAnim 1.2s cubic-bezier(0.22,1,0.36,1) forwards;
}
.lain-flash span {
  font-size: 0.82rem; color: rgba(255,255,255,0.3);
  font-family: monospace; letter-spacing: 0.15em;
  animation: lainFlashText 1.2s forwards;
}
@keyframes lainFlashAnim {
  0% { opacity: 0; }
  15% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes lainFlashText {
  0% { opacity: 0; transform: scale(0.95); }
  20% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Wired indicator */
.lain-wired {
  display: flex; align-items: center; gap: 6px;
  margin-left: 16px; font-size: 0.55rem; font-family: monospace;
  color: rgba(16,185,129,0.5);
}
.lain-wired-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #10b981; animation: lainPulse 2s infinite;
}
@keyframes lainPulse {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 6px 2px rgba(16,185,129,0.2); }
}

/* Lain quote card */
.lain-quote-card {
  text-align: center; padding: 24px; margin-bottom: 20px;
  border: 1px solid rgba(124,106,239,0.1); border-radius: 12px;
  background: rgba(124,106,239,0.03);
}
.lain-q-text {
  font-size: 1rem; font-style: italic; color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}
.lain-q-attr { font-size: 0.68rem; color: #7c6aef; margin-bottom: 8px; font-weight: 600; }
.lain-q-lesson { font-size: 0.72rem; color: rgba(255,255,255,0.3); }

/* =================== CYBERPUNK =================== */

/* Scanline overlay */
.cyber-scanline-overlay {
  position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px
  );
  opacity: 0.4;
}

/* HUD */
.cyber-hud {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; font-size: 0.52rem; font-family: monospace;
  letter-spacing: 0.06em; color: rgba(255,255,255,0.2);
}
.cyber-hud-sep { opacity: 0.15; }
.cyber-g { color: #10b981; }
.cyber-y { color: #f0b429; }

/* Neon active nav */
.cyber-neon-active {
  text-shadow: 0 0 8px rgba(124,106,239,0.5), 0 0 16px rgba(124,106,239,0.2) !important;
}

/* Glitch on card hover */
.cyber-card { position: relative; overflow: hidden; }
.cyber-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(124,106,239,0.03) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 600ms cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
}
.cyber-card:hover::after {
  transform: translateX(100%);
}

/* Circuit banner */
.cyber-circuit-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; margin-bottom: 16px;
  border: 1px solid rgba(16,185,129,0.1); border-radius: 10px;
  background: rgba(16,185,129,0.02);
}
.cyber-circuit-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16,185,129,0.2), transparent);
}
.cyber-circuit-text {
  font-size: 0.6rem; font-family: monospace; color: rgba(16,185,129,0.4);
  letter-spacing: 0.08em; white-space: nowrap;
}

/* Data corruption on wrong */
.cyber-corrupt {
  animation: cyberCorruptAnim 0.6s steps(3) !important;
}
@keyframes cyberCorruptAnim {
  0% { transform: translate(0); filter: hue-rotate(0deg); }
  20% { transform: translate(-3px,2px); filter: hue-rotate(90deg); }
  40% { transform: translate(3px,-1px); filter: hue-rotate(180deg); }
  60% { transform: translate(-2px,1px); filter: hue-rotate(270deg); }
  80% { transform: translate(2px,-2px); filter: hue-rotate(360deg); }
  100% { transform: translate(0); filter: hue-rotate(0deg); }
}

/* Netrunner code lab header */
.cyber-lab-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; margin-bottom: 16px;
  border: 1px solid rgba(124,106,239,0.1); border-radius: 10px;
  background: linear-gradient(135deg, rgba(124,106,239,0.04), rgba(14,165,233,0.03));
}
.cyber-lab-icon {
  font-size: 1.2rem; color: #7c6aef; font-family: monospace; font-weight: 700;
}
.cyber-lab-title {
  font-size: 0.72rem; font-family: monospace; font-weight: 700;
  color: rgba(255,255,255,0.5); letter-spacing: 0.08em;
}
.cyber-lab-status {
  font-size: 0.55rem; font-family: monospace; color: #10b981;
  margin-left: auto; letter-spacing: 0.06em;
}

/* =================== TOAST SYSTEM =================== */
.anime-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px; border-radius: 10px;
  font-size: 0.78rem; font-weight: 500;
  z-index: 99999; pointer-events: none;
  opacity: 0;
  transition: all 300ms cubic-bezier(0.22,1,0.36,1);
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(12px);
}
.anime-toast-show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.anime-toast-aot {
  background: rgba(232,93,58,0.15); color: #e85d3a;
  border: 1px solid rgba(232,93,58,0.3);
}
.anime-toast-aot-win {
  background: rgba(16,185,129,0.15); color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
}

/* =================== REDUCED MOTION =================== */
@media (prefers-reduced-motion: reduce) {
  .lain-glitch::before, .lain-glitch::after { animation: none !important; }
  .lain-flash { display: none !important; }
  .cyber-corrupt { animation: none !important; }
  .lain-noise-overlay { display: none !important; }
  .cyber-scanline-overlay { display: none !important; }
}

/* =================== MOBILE =================== */
@media (max-width: 768px) {
  .cyber-hud { display: none; }
  .lain-wired { display: none; }
  .aot-progress-walls { display: none; }
}
