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

:root {
  --ea-gold: #f0d880;
  --ea-blood: #c41e3a;
  --ea-bg: #060408;
  --ea-panel: rgba(8, 4, 12, 0.92);
  --ea-border: rgba(240, 216, 128, 0.35);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ea-bg);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #eee;
}

#ea-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 0;
  cursor: crosshair;
}

#ea-canvas.is-active {
  display: block;
  pointer-events: auto;
  cursor: crosshair;
}

#ea-app {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#ea-app.is-playing { pointer-events: none; }
#ea-app.is-playing .ea-hud { pointer-events: none; }
#ea-app.is-playing .ea-overlay { pointer-events: auto; }

.ea-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 24px 40px;
  background: var(--ea-panel);
  pointer-events: auto;
  text-align: center;
  gap: 12px;
  overflow-y: auto;
}

.ea-screen[hidden] { display: none !important; }

.ea-title-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(196, 30, 58, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(200, 168, 75, 0.12) 0%, transparent 45%),
    #060408;
  z-index: -1;
}

.ea-credit {
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: rgba(240, 216, 128, 0.65);
}

.ea-logo {
  font-size: clamp(2.8rem, 12vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ea-blood);
  text-shadow: 0 0 40px rgba(196, 30, 58, 0.5);
  line-height: 1;
}

.ea-logo span {
  display: block;
  font-size: 0.45em;
  color: var(--ea-gold);
  letter-spacing: 0.5em;
  margin-top: 0.15em;
}

.ea-tagline {
  font-size: 0.95rem;
  color: #999;
  max-width: 420px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.ea-screen h2 {
  font-size: 1.35rem;
  color: var(--ea-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ea-btn {
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ea-border);
  background: linear-gradient(180deg, #3a0810 0%, #1a0408 100%);
  color: var(--ea-gold);
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.12s, box-shadow 0.12s;
}

.ea-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 30, 58, 0.35);
}

.ea-btn--primary {
  background: linear-gradient(180deg, #a01828 0%, #6a0a14 100%);
  border-color: var(--ea-gold);
}

.ea-btn--ghost {
  background: transparent;
  color: #888;
  border-color: #444;
}

.ea-link {
  font-size: 0.78rem;
  color: #666;
  text-decoration: none;
  margin: 0 10px;
  pointer-events: auto;
}

.ea-link:hover { color: var(--ea-gold); }

.ea-pad-status {
  font-size: 1rem;
  color: #afa;
  min-height: 1.5em;
}

.ea-pad-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  text-align: left;
  font-size: 0.82rem;
  color: #aaa;
  max-width: 420px;
  margin: 12px 0;
}

.ea-pad-note { font-size: 0.75rem; color: #666; max-width: 400px; }

.ea-char-grid, .ea-map-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 720px;
  margin: 12px 0;
}

.ea-pick {
  width: 120px;
  padding: 14px 10px;
  border: 2px solid #333;
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
  pointer-events: auto;
}

.ea-pick:hover { border-color: #666; transform: translateY(-2px); }
.ea-pick.is-selected { border-color: var(--ea-gold); box-shadow: 0 0 20px rgba(240,216,128,0.2); }

.ea-pick-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 2px solid rgba(255,255,255,0.15);
}

.ea-pick-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ddd;
}

.ea-char-desc, .ea-map-desc, .ea-teams-sub, .ea-teams-picked, .ea-mode-sub, .ea-mode-picked {
  font-size: 0.85rem;
  color: #888;
  max-width: 480px;
  min-height: 2.5em;
  line-height: 1.45;
}

.ea-teams-sub, .ea-mode-sub { min-height: auto; margin-bottom: 8px; }
.ea-teams-picked, .ea-mode-picked { color: var(--ea-gold); font-weight: 600; min-height: auto; margin: 12px 0; }

.ea-mode-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 720px;
  margin: 12px 0 16px;
}

.ea-mode-panel {
  flex: 1 1 280px;
  max-width: 340px;
  padding: 20px 18px;
  border: 2px solid #333;
  border-radius: 12px;
  background: rgba(0,0,0,0.45);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: inherit;
  font: inherit;
}

.ea-mode-panel strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #eee;
}

.ea-mode-panel p {
  margin: 0;
  font-size: 0.78rem;
  color: #888;
  line-height: 1.45;
}

.ea-mode-label {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: lowercase;
}

.ea-mode-panel--solo .ea-mode-label {
  background: linear-gradient(180deg, #5a4020 0%, #3a2810 100%);
  border: 2px solid var(--ea-gold);
  color: #ffe8a8;
}

.ea-mode-panel--teams .ea-mode-label {
  background: linear-gradient(180deg, #2a6aaa 0%, #1a4a7a 100%);
  border: 2px solid #44aaff;
  color: #cceeff;
}

.ea-mode-panel--solo.is-selected {
  border-color: var(--ea-gold);
  box-shadow: 0 0 24px rgba(240,216,128,0.25);
}

.ea-mode-panel--teams.is-selected {
  border-color: #44aaff;
  box-shadow: 0 0 24px rgba(68,170,255,0.25);
}

.ea-team-badge.is-hidden,
.ea-team-legend.is-hidden { display: none !important; }

.ea-teams-sub { min-height: auto; margin-bottom: 8px; }
.ea-teams-picked { color: var(--ea-gold); font-weight: 600; min-height: auto; margin: 12px 0; }

.ea-teams-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  max-width: 860px;
  margin: 12px 0 16px;
  overflow: visible;
}

.ea-team-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 300px;
  max-width: 380px;
}

.ea-team-panel {
  width: 100%;
  padding: 18px 16px 20px;
  border: 2px solid #333;
  border-radius: 12px;
  background: rgba(0,0,0,0.45);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ea-team-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 22px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: lowercase;
}

.ea-team-label--ally {
  background: linear-gradient(180deg, #2a6aaa 0%, #1a4a7a 100%);
  border: 2px solid #44aaff;
  color: #cceeff;
  box-shadow: 0 0 16px rgba(68,170,255,0.35);
}

.ea-team-label--monster {
  background: linear-gradient(180deg, #8a2244 0%, #5a1133 100%);
  border: 2px solid #ff4466;
  color: #ffccdd;
  box-shadow: 0 0 16px rgba(255,68,102,0.35);
}

.ea-team-tag {
  margin: 4px 0 12px;
  font-size: 0.75rem;
  color: #777;
  text-align: center;
}

.ea-team-panel--ally.is-selected {
  border-color: #44aaff;
  box-shadow: 0 0 24px rgba(68,170,255,0.25);
}

.ea-team-panel--monster.is-selected {
  border-color: #ff4466;
  box-shadow: 0 0 24px rgba(255,68,102,0.25);
}

.ea-roster {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.ea-roster li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ccc;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ea-roster li.is-you { color: var(--ea-gold); }
.ea-roster li.is-you::after {
  content: 'YOU';
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--ea-gold);
}

.ea-roster-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}

.ea-btn--ally {
  width: 100%;
  background: linear-gradient(180deg, #2a6aaa 0%, #1a4a7a 100%);
  border-color: #44aaff;
}

.ea-btn--monster {
  width: 100%;
  background: linear-gradient(180deg, #8a2244 0%, #5a1133 100%);
  border-color: #ff4466;
}

.ea-team-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(68,170,255,0.25);
  color: #88ccff;
}

.ea-team-badge.is-monster {
  background: rgba(255,68,102,0.25);
  color: #ff8899;
}

.ea-spectate {
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffdd88;
  background: rgba(40, 28, 8, 0.88);
  border: 1px solid rgba(255, 200, 80, 0.45);
  border-radius: 4px;
}

.ea-spectate[hidden] { display: none !important; }

#ea-app.is-spectating .ea-crosshair { opacity: 0; }
#ea-app.is-spectating .ea-hud-bottom { opacity: 0.45; }
#ea-app.is-spectating .ea-spectate { display: inline-block !important; }

/* HUD */
.ea-hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.ea-hud[hidden] { display: none !important; }

.ea-hud-top {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 4px #000;
}

.ea-zone { color: #f88; }
.ea-zone.is-warning { color: #ff4444; animation: ea-zone-pulse 0.8s ease infinite; }

@keyframes ea-zone-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.ea-minimap {
  position: absolute;
  top: 52px;
  left: 16px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  background: rgba(0,0,0,0.55);
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}

.ea-reload {
  position: absolute;
  bottom: 108px;
  left: 24px;
  width: 180px;
  height: 18px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  background: rgba(0,0,0,0.5);
  overflow: hidden;
}

.ea-reload[hidden] { display: none !important; }

.ea-reload span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px #000;
}

.ea-reload-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c9a227, #f0d880);
  transition: width 0.05s linear;
}

.ea-chest-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -72px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ea-chest-progress[hidden] { display: none !important; }

.ea-chest-progress svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.ea-chest-track {
  fill: none;
  stroke: rgba(255,255,255,0.15);
  stroke-width: 3;
}

.ea-chest-ring {
  fill: none;
  stroke: #ffd040;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 97.4;
  stroke-dashoffset: 97.4;
  filter: drop-shadow(0 0 4px #ffd040);
}

.ea-chest-progress span {
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffd040;
  text-shadow: 0 1px 4px #000;
  z-index: 1;
}

.ea-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(180, 0, 0, 0.55) 100%);
  transition: opacity 0.12s;
}

.ea-vignette.is-hit { opacity: 1; }
.ea-vignette.is-zone { opacity: 0.75; background: radial-gradient(ellipse at center, transparent 35%, rgba(40, 80, 200, 0.5) 100%); }

.ea-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
}

.ea-crosshair.is-reloading { opacity: 0.35; }
.ea-crosshair.is-ally { border-color: #88ccff; }
.ea-crosshair.is-monster { border-color: #ff8899; }

.ea-team-legend {
  position: absolute;
  top: 52px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  text-shadow: 0 1px 4px #000;
}

.ea-legend-ally { color: #cceeff; }
.ea-legend-ally::before { content: '● '; color: #44aaff; }
.ea-legend-monster { color: #ffccdd; }
.ea-legend-monster::before { content: '● '; color: #ff4466; }

.ea-crosshair::before,
.ea-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.9);
}

.ea-crosshair::before {
  width: 2px;
  height: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ea-crosshair::after {
  width: 8px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ea-hud-bottom {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.ea-bars { flex: 1; max-width: 320px; }

.ea-bar {
  position: relative;
  height: 14px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 6px;
  border-radius: 2px;
  overflow: hidden;
}

.ea-bar div {
  height: 100%;
  width: 100%;
  transition: width 0.2s;
}

.ea-bar--shield div { background: linear-gradient(90deg, #2080f0, #40a0ff); width: 100%; }
.ea-bar--health div { background: linear-gradient(90deg, #20a040, #40e060); width: 100%; }

.ea-bar span {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(0,0,0,0.6);
}

.ea-ammo {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px #000;
}

.ea-weapon-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.ea-weapon {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--ea-gold);
  text-transform: uppercase;
}

.ea-inventory {
  display: flex;
  gap: 6px;
}

.ea-inv-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  background: rgba(0,0,0,0.45);
  min-width: 52px;
  opacity: 0.65;
  transition: opacity 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ea-inv-slot.is-active {
  opacity: 1;
  border-color: var(--inv-color, var(--ea-gold));
  box-shadow: 0 0 12px color-mix(in srgb, var(--inv-color, #fff) 45%, transparent);
}

.ea-inv-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--inv-color, #ddd);
  box-shadow: 0 0 8px var(--inv-color, #ddd);
}

.ea-inv-name {
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  color: #ccc;
  text-transform: uppercase;
}

.ea-inv--weak .ea-inv-dot { box-shadow: 0 0 10px var(--inv-color); }
.ea-inv--strong .ea-inv-dot { box-shadow: 0 0 14px var(--inv-color); }
.ea-inv--starter .ea-inv-dot { box-shadow: 0 0 6px #fff; }

.ea-feed {
  position: absolute;
  top: 48px;
  right: 16px;
  list-style: none;
  font-size: 0.72rem;
  color: #ccc;
  text-align: right;
  max-width: 260px;
}

.ea-feed li { margin-bottom: 4px; text-shadow: 0 1px 3px #000; }
.ea-feed .ea-feed-kill { color: #f88; }

.ea-hint {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 4px #000;
}

.ea-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: auto;
}

.ea-overlay[hidden] { display: none !important; }

.ea-overlay h2 {
  font-size: 2rem;
  color: var(--ea-gold);
  letter-spacing: 0.1em;
}

.ea-overlay p { color: #aaa; max-width: 360px; text-align: center; line-height: 1.5; }

.ea-overlay-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.ea-hit-marker {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 2px solid #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  animation: ea-hit 0.2s ease;
}

@keyframes ea-hit {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); }
}

.ea-hint.is-urgent { color: #ff8888; font-weight: 600; }
.ea-hint.is-cover { color: #8fd4ff; font-weight: 600; }

@media (max-width: 600px) {
  .ea-pad-map { grid-template-columns: 1fr; }
  .ea-hud-bottom { flex-wrap: wrap; }
  .ea-minimap { width: 96px; height: 96px; }
}
