/* Cyberpunk Theme CSS */
:root {
  /* Color Palette */
  --cyber-primary: #00ffff;
  --cyber-secondary: #ff00ff;
  --cyber-accent: #ffff00;
  --cyber-warning: #ff6600;
  --cyber-danger: #ff0066;
  --cyber-success: #00ff66;
  
  /* Background Colors */
  --cyber-bg-primary: #0a0a0a;
  --cyber-bg-secondary: #1a1a2e;
  --cyber-bg-tertiary: #16213e;
  --cyber-bg-card: rgba(26, 26, 46, 0.8);
  
  /* Text Colors */
  --cyber-text-primary: #ffffff;
  --cyber-text-secondary: #b0b0b0;
  --cyber-text-muted: #666666;
  
  /* Border Colors */
  --cyber-border: #333366;
  --cyber-border-glow: #00ffff;
  
  /* Shadows */
  --cyber-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  --cyber-shadow-strong: 0 0 30px rgba(0, 255, 255, 0.6);
  
  /* Fonts */
  --cyber-font-mono: 'Courier New', 'Monaco', 'Menlo', monospace;
  --cyber-font-display: 'Orbitron', 'Arial', sans-serif;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  background: var(--cyber-bg-primary);
  color: var(--cyber-text-primary);
  font-family: var(--cyber-font-mono);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: 
    linear-gradient(45deg, transparent 25%, rgba(0, 255, 255, 0.02) 25%, rgba(0, 255, 255, 0.02) 50%, transparent 50%, transparent 75%, rgba(0, 255, 255, 0.02) 75%),
    linear-gradient(-45deg, transparent 25%, rgba(255, 0, 255, 0.02) 25%, rgba(255, 0, 255, 0.02) 50%, transparent 50%, transparent 75%, rgba(255, 0, 255, 0.02) 75%);
  background-size: 60px 60px;
  animation: scanlines 20s linear infinite;
}

@keyframes scanlines {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, -60px 60px; }
}

/* Glow Effects */
.cyber-glow {
  box-shadow: var(--cyber-shadow);
  transition: box-shadow 0.3s ease;
}

.cyber-glow:hover {
  box-shadow: var(--cyber-shadow-strong);
}

.cyber-text-glow {
  text-shadow: 0 0 10px currentColor;
}

/* Buttons */
.cyber-btn {
  background: linear-gradient(45deg, var(--cyber-bg-secondary), var(--cyber-bg-tertiary));
  border: 1px solid var(--cyber-border);
  color: var(--cyber-text-primary);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.cyber-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.cyber-btn:hover::before {
  left: 100%;
}

.cyber-btn:hover {
  border-color: var(--cyber-border-glow);
  box-shadow: var(--cyber-shadow);
  transform: translateY(-2px);
}

.cyber-btn-primary {
  border-color: var(--cyber-primary);
  color: var(--cyber-primary);
}

.cyber-btn-secondary {
  border-color: var(--cyber-secondary);
  color: var(--cyber-secondary);
}

/* Cards */
.cyber-card {
  background: var(--cyber-bg-card);
  border: 1px solid var(--cyber-border);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.cyber-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyber-primary), transparent);
  animation: scan 3s linear infinite;
}

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

/* Navigation */
.cyber-nav {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cyber-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.cyber-nav-link {
  color: var(--cyber-text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.cyber-nav-link:hover {
  color: var(--cyber-primary);
  text-shadow: 0 0 10px var(--cyber-primary);
}

.cyber-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyber-primary);
  transition: width 0.3s ease;
}

.cyber-nav-link:hover::after {
  width: 100%;
}

/* Forms */
.cyber-input {
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid var(--cyber-border);
  color: var(--cyber-text-primary);
  padding: 0.5rem;
  font-family: var(--cyber-font-mono);
  transition: all 0.3s ease;
}

.cyber-input:focus {
  outline: none;
  border-color: var(--cyber-primary);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Tables */
.cyber-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cyber-bg-card);
}

.cyber-table th,
.cyber-table td {
  border: 1px solid var(--cyber-border);
  padding: 0.5rem;
  text-align: left;
}

.cyber-table th {
  background: var(--cyber-bg-secondary);
  color: var(--cyber-primary);
  font-weight: bold;
}

.cyber-table tr:hover {
  background: rgba(0, 255, 255, 0.1);
}

/* Progress Bars */
.cyber-progress {
  background: var(--cyber-bg-secondary);
  border: 1px solid var(--cyber-border);
  height: 20px;
  overflow: hidden;
  position: relative;
}

.cyber-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cyber-primary), var(--cyber-secondary));
  transition: width 0.3s ease;
  position: relative;
}

.cyber-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shine 2s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .cyber-nav {
    padding: 0.5rem;
  }
  
  .cyber-nav-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--cyber-border);
  }
  
  .cyber-btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Utility Classes */
.cyber-text-primary { color: var(--cyber-primary); }
.cyber-text-secondary { color: var(--cyber-secondary); }
.cyber-text-accent { color: var(--cyber-accent); }
.cyber-text-warning { color: var(--cyber-warning); }
.cyber-text-danger { color: var(--cyber-danger); }
.cyber-text-success { color: var(--cyber-success); }

.cyber-bg-primary { background: var(--cyber-bg-primary); }
.cyber-bg-secondary { background: var(--cyber-bg-secondary); }
.cyber-bg-tertiary { background: var(--cyber-bg-tertiary); }

.cyber-border { border: 1px solid var(--cyber-border); }
.cyber-border-glow { border: 1px solid var(--cyber-border-glow); }

/* Animation Classes */
.cyber-fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.cyber-pulse {
  animation: pulse 2s infinite;
}

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

/* Terminal Effect */
.cyber-terminal {
  background: #000;
  color: var(--cyber-primary);
  font-family: var(--cyber-font-mono);
  padding: 1rem;
  border: 1px solid var(--cyber-primary);
  position: relative;
}

.cyber-terminal::before {
  content: '> ';
  color: var(--cyber-secondary);
}

/* Hologram Effect */
.cyber-hologram {
  position: relative;
  background: linear-gradient(45deg, transparent 30%, rgba(0, 255, 255, 0.1) 50%, transparent 70%);
  animation: hologram 3s linear infinite;
}

@keyframes hologram {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ===== FALLBACK STYLES FOR MISSING IMAGES ===== */

/* Status effect fallbacks using emoji */
.status-icon-fallback {
  display: inline-block;
  width: 20px;
  height: 16px;
  text-align: center;
  line-height: 16px;
  font-size: 12px;
  border: 1px solid var(--cyber-border);
  border-radius: 2px;
  background: var(--cyber-bg-secondary);
}

.status-poisoned::before { content: "🟣"; }
.status-burned::before { content: "🔥"; }
.status-frozen::before { content: "🧊"; }
.status-paralyzed::before { content: "⚡"; }
.status-confused::before { content: "💫"; }
.status-injured::before { content: "🩸"; }
.status-dead::before { content: "💀"; }
.status-danger::before { content: "⚠️"; }
.status-caution::before { content: "⚠️"; }
.status-fine::before { content: "✅"; }

/* Avatar fallbacks */
.avatar-fallback {
  width: 64px;
  height: 40px;
  background: linear-gradient(135deg, var(--cyber-bg-secondary), var(--cyber-bg-tertiary));
  border: 2px solid var(--cyber-primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
  overflow: hidden;
}

.avatar-fallback::before {
  content: "👤";
  filter: hue-rotate(var(--cyber-hue, 0deg));
}

.avatar-fallback.male::before { content: "👨"; }
.avatar-fallback.female::before { content: "👩"; }

/* Item icon fallbacks */
.item-icon-fallback {
  width: 32px;
  height: 32px;
  background: var(--cyber-bg-secondary);
  border: 1px solid var(--cyber-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.item-weapon::before { content: "⚔️"; }
.item-armor::before { content: "🛡️"; }
.item-accessory::before { content: "💍"; }
.item-consumable::before { content: "💊"; }
.item-tool::before { content: "🔧"; }
.item-special::before { content: "✨"; }

/* Background pattern fallback */
.cyber-pattern {
  background-image:
    linear-gradient(45deg, transparent 40%, var(--cyber-primary)22 41%, var(--cyber-primary)22 42%, transparent 43%),
    linear-gradient(-45deg, transparent 40%, var(--cyber-primary)22 41%, var(--cyber-primary)22 42%, transparent 43%);
  background-size: 20px 20px;
}

/* Location background fallbacks */
.location-bg-fallback {
  background: linear-gradient(135deg,
    var(--cyber-bg-primary) 0%,
    var(--cyber-bg-secondary) 50%,
    var(--cyber-bg-tertiary) 100%);
  position: relative;
}

.location-bg-fallback::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 80%, var(--cyber-primary)33 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--cyber-secondary)33 0%, transparent 50%);
  opacity: 0.3;
  pointer-events: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .cyber-nav {
    padding: 0.5rem 1rem;
  }

  .cyber-card {
    margin-bottom: 1rem;
  }

  .cyber-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .cyber-terminal {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .avatar-fallback {
    width: 48px;
    height: 30px;
    font-size: 18px;
  }

  .item-icon-fallback {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
}
