/* ============================================
   ULTRAKILL WIKI — STYLES
   Красно-чёрная палитра, хардкорный дизайн
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --red-primary: #ff2222;
  --red-dark: #aa0000;
  --red-glow: #ff000088;
  --red-light: #ff4444;
  --blood-red: #8b0000;
  --text-primary: #e0e0e0;
  --text-secondary: #888888;
  --text-muted: #555555;
  --border-color: #2a2a2a;
  --border-red: #ff222244;
  --accent: #ff3333;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: 260px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-secondary);
  border-right: 2px solid var(--border-red);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.logo-ultra {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--red-primary);
  text-shadow: 0 0 20px var(--red-glow);
}

.logo-kill {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.logo-sub {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 8px;
  margin-top: 4px;
}

.nav-links {
  list-style: none;
  padding: 16px 0;
  flex: 1;
}

.nav-link {
  display: block;
  padding: 12px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,34,34,0.05);
  border-left-color: var(--red-dark);
}

.nav-link.active {
  color: var(--red-primary);
  background: rgba(255,34,34,0.1);
  border-left-color: var(--red-primary);
  text-shadow: 0 0 10px var(--red-glow);
}

.sidebar-footer {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.blood-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--red-primary);
  letter-spacing: 3px;
  text-shadow: 0 0 15px var(--red-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ============ MAIN CONTENT ============ */
.content {
  margin-left: 260px;
  flex: 1;
  padding: 32px 48px;
  max-width: 1200px;
}

/* ============ PAGES ============ */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--red-primary);
  text-shadow: 0 0 30px var(--red-glow);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 32px;
}

/* ============ HERO ============ */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero-glitch {
  font-family: 'Orbitron', sans-serif;
  font-size: 72px;
  font-weight: 900;
  color: var(--red-primary);
  text-shadow:
    0 0 40px var(--red-glow),
    0 0 80px var(--red-glow),
    3px 3px 0 #000,
    -3px -3px 0 #ff0000;
  position: relative;
  animation: glitch 3s infinite;
}

@keyframes glitch {
  0%, 90%, 100% { text-shadow: 0 0 40px var(--red-glow), 0 0 80px var(--red-glow); }
  92% { text-shadow: -5px 0 #00ffff, 5px 0 #ff0000; }
  94% { text-shadow: 5px 0 #00ffff, -5px 0 #ff0000; }
  96% { text-shadow: 0 0 40px var(--red-glow); }
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-top: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: var(--red-dark);
  box-shadow: 0 0 20px rgba(255,34,34,0.1);
}

.stat-number {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--red-primary);
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ============ SECTION TITLES ============ */
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.blood-icon {
  font-size: 24px;
}

/* ============ CONTENT CARDS ============ */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  line-height: 1.8;
}

.content-card p {
  margin-bottom: 4px;
}

.highlight {
  color: var(--red-primary);
  font-weight: 700;
  text-shadow: 0 0 8px var(--red-glow);
}

/* ============ FEATURE GRID ============ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--red-dark);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============ INFO GRID ============ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
}

.info-card.full-width {
  grid-column: 1 / -1;
}

.info-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.info-card p {
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 15px;
}

/* ============ WEAPONS ============ */
.weapon-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.weapon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.weapon-header:hover {
  background: var(--bg-card-hover);
}

.weapon-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.toggle-icon {
  color: var(--red-primary);
  font-size: 14px;
  transition: transform 0.3s;
}

.weapon-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.weapon-content.open {
  max-height: 600px;
}

.weapon-mods {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.weapon-mod {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
}

.mod-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--red-light);
  margin-bottom: 4px;
}

.mod-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  background: rgba(255,34,34,0.1);
  padding: 2px 8px;
  border-radius: 3px;
}

.weapon-mod p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* ============ ENEMIES ============ */
.enemy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.enemy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  position: relative;
  transition: all 0.3s;
}

.enemy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.enemy-card.common { border-left: 3px solid #666; }
.enemy-card.medium { border-left: 3px solid #ff8800; }
.enemy-card.hard { border-left: 3px solid var(--red-primary); }

.enemy-rank {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 900;
  color: var(--text-muted);
}

.enemy-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.enemy-card p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.enemy-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(255,255,255,0.05);
}

.enemy-tag.boss {
  color: var(--red-primary);
  background: rgba(255,34,34,0.15);
}

.enemy-legend {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.legend-item {
  padding: 4px 8px;
  border-radius: 4px;
}

.legend-item.common { color: #888; }
.legend-item.medium { color: #ff8800; }
.legend-item.hard { color: var(--red-primary); }
.legend-item.boss { color: var(--red-primary); font-weight: 700; }

/* ============ LEVELS ============ */
.act-section {
  margin-bottom: 32px;
}

.act-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--red-primary);
  text-shadow: 0 0 20px var(--red-glow);
  margin-bottom: 4px;
}

.act-desc {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 15px;
}

.layer {
  margin-bottom: 16px;
}

.layer-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--red-dark);
}

.level-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.level-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.2s;
}

.level-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--red-dark);
}

.level-item.secret {
  border-left: 3px solid #aa00ff;
}

.level-item.locked {
  opacity: 0.4;
  border-left: 3px solid var(--text-muted);
}

.level-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--red-primary);
  min-width: 40px;
}

.level-stars {
  margin-left: auto;
  font-size: 12px;
}

.secret-levels-info {
  background: var(--bg-card);
  border: 1px solid #aa00ff44;
  border-radius: 8px;
  padding: 20px;
  margin-top: 24px;
}

.secret-levels-info h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  color: #aa00ff;
  margin-bottom: 8px;
}

.secret-levels-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============ MECHANICS ============ */
.mechanic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.mechanic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s;
}

.mechanic-card:hover {
  border-color: var(--red-dark);
}

.mechanic-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.mechanic-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.mechanic-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* ============ COMBOS ============ */
.combo-section {
  margin-top: 32px;
}

.combo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.combo-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--red-dark);
  border-radius: 6px;
  padding: 16px 20px;
  transition: all 0.2s;
}

.combo-item:hover {
  border-left-color: var(--red-primary);
  background: var(--bg-card-hover);
}

.combo-item h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--red-light);
  margin-bottom: 4px;
}

.combo-item p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ============ CHARACTERS ============ */
.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.character-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}

.character-card:hover {
  border-color: var(--red-dark);
  transform: translateY(-2px);
}

.character-card.protagonist {
  border-color: var(--red-dark);
  background: linear-gradient(135deg, var(--bg-card), rgba(255,34,34,0.05));
}

.character-card.antagonist {
  border-color: #ffaa00;
  background: linear-gradient(135deg, var(--bg-card), rgba(255,170,0,0.05));
}

.character-avatar {
  font-size: 48px;
  margin-bottom: 12px;
}

.character-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.character-role {
  font-size: 12px;
  font-weight: 700;
  color: var(--red-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.character-card p:last-child {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* ============ STYLE SYSTEM ============ */
.style-ranks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s;
}

.rank-item:hover {
  transform: translateX(4px);
}

.rank-letter {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  min-width: 60px;
  text-align: center;
}

.rank-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  min-width: 120px;
}

.rank-item p {
  color: var(--text-secondary);
  font-size: 13px;
}

.rank-d { border-left: 4px solid #555; }
.rank-d .rank-letter { color: #555; }
.rank-d .rank-name { color: #777; }

.rank-c { border-left: 4px solid #4488ff; }
.rank-c .rank-letter { color: #4488ff; }
.rank-c .rank-name { color: #6699ff; }

.rank-b { border-left: 4px solid #00cc66; }
.rank-b .rank-letter { color: #00cc66; }
.rank-b .rank-name { color: #33dd88; }

.rank-a { border-left: 4px solid #ffaa00; }
.rank-a .rank-letter { color: #ffaa00; }
.rank-a .rank-name { color: #ffcc44; }

.rank-s { border-left: 4px solid #ff4444; }
.rank-s .rank-letter { color: #ff4444; }
.rank-s .rank-name { color: #ff6666; }

.rank-ss { border-left: 4px solid #ff00ff; }
.rank-ss .rank-letter { color: #ff00ff; }
.rank-ss .rank-name { color: #ff44ff; }

.rank-ultrakill {
  border-left: 4px solid #ffdd00;
  background: linear-gradient(90deg, rgba(255,221,0,0.1), transparent);
  animation: ukGlow 2s infinite;
}

@keyframes ukGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255,221,0,0.1); }
  50% { box-shadow: 0 0 25px rgba(255,221,0,0.25); }
}

.rank-ultrakill .uk-merged {
  color: #ffdd00;
  text-shadow: 0 0 20px rgba(255,221,0,0.6);
  font-size: 26px;
  letter-spacing: 4px;
  min-width: unset;
  width: unset;
  text-align: left;
  white-space: nowrap;
}

.style-tips {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
}

.style-tips h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.style-tips ul {
  list-style: none;
}

.style-tips li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: var(--text-secondary);
  font-size: 15px;
}

.style-tips li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--red-primary);
}

/* ============ TIPS ============ */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
}

.tip-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.tip-card ul {
  list-style: none;
}

.tip-card li {
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.tip-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--red-primary);
}

/* ============ FAQ ============ */
.faq-section {
  margin-top: 24px;
}

.faq-section h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 8px;
}

.faq-item h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--red-light);
  margin-bottom: 8px;
}

.faq-item p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ============ MOBILE MENU ============ */
.menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: var(--bg-secondary);
  border: 1px solid var(--border-red);
  color: var(--red-primary);
  font-size: 24px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  .weapon-mods {
    grid-template-columns: 1fr;
  }
  .enemy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .content {
    margin-left: 0;
    padding: 20px;
    padding-top: 60px;
  }
  .menu-toggle {
    display: block;
  }
  .hero-glitch {
    font-size: 42px;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .enemy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .character-grid {
    grid-template-columns: 1fr;
  }
  .tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .enemy-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--red-dark);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--red-primary);
}

/* ============ SELECTION ============ */
::selection {
  background: var(--red-primary);
  color: white;
}