/* Custom Tactical & Glitch Styling for Clan 24365 */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,400;0,600;0,700;1,700&family=Orbitron:wght@600;800;900&family=Noto+Sans+JP:wght@400;700;900&display=swap');

:root {
  --color-bg: #09090b;
  --color-card-bg: rgba(18, 18, 24, 0.85);
  --color-primary: #ff2233;
  --color-primary-glow: rgba(255, 34, 51, 0.4);
  --color-secondary: #ff6600;
  --color-accent: #ffcc00;
  --color-text: #e4e4e7;
  --color-muted: #8e8e93;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Noto Sans JP', 'Chakra Petch', sans-serif;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.font-orbitron {
  font-family: 'Orbitron', sans-serif;
}

.font-chakra {
  font-family: 'Chakra Petch', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #09090b;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Hide scrollbar for clean horizontal scroll on mobile */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Background Canvas */
#spark-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Scanline Effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  opacity: 0.5;
}

/* Grid Overlay */
.bg-grid-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Cyber Glow Card */
.cyber-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

@media (hover: hover) {
  .cyber-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 25px var(--color-primary-glow), inset 0 0 15px rgba(255, 34, 51, 0.1);
    transform: translateY(-3px);
  }
}

/* Cyber Corner Markers */
.cyber-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 1px;
  background: var(--color-primary);
  opacity: 0.7;
}

/* Glitch Text Effect */
.glitch-text {
  position: relative;
  display: inline-block;
}

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

.glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 #ff0055;
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: -2px 0 #00e5ff;
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip: rect(10px, 9999px, 30px, 0); }
  20% { clip: rect(60px, 9999px, 80px, 0); }
  40% { clip: rect(20px, 9999px, 50px, 0); }
  60% { clip: rect(80px, 9999px, 90px, 0); }
  80% { clip: rect(40px, 9999px, 70px, 0); }
  100% { clip: rect(90px, 9999px, 100px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(50px, 9999px, 70px, 0); }
  20% { clip: rect(10px, 9999px, 40px, 0); }
  40% { clip: rect(70px, 9999px, 100px, 0); }
  60% { clip: rect(30px, 9999px, 60px, 0); }
  80% { clip: rect(90px, 9999px, 110px, 0); }
  100% { clip: rect(20px, 9999px, 50px, 0); }
}

/* Pulse Glow Button */
.btn-cyber-primary {
  background: linear-gradient(135deg, #ff2233 0%, #aa0011 100%);
  color: #fff;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(255, 34, 51, 0.4);
}

.btn-cyber-primary:active {
  transform: scale(0.97);
}

.btn-cyber-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: all 0.2s ease;
}

.btn-cyber-secondary:active {
  transform: scale(0.97);
}

/* Tactical Badge */
.tactical-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 34, 51, 0.15);
  border-left: 3px solid var(--color-primary);
  color: var(--color-primary);
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Killfeed Simulator Animation */
@keyframes slideFeed {
  0% { opacity: 0; transform: translateX(20px); }
  10% { opacity: 1; transform: translateX(0); }
  90% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

.killfeed-item {
  animation: slideFeed 4s infinite ease-in-out;
}
