body {
  background-color: #111;
  color: #f2f2f2;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  text-align: center;
}

header, footer {
  padding: 2rem;
  border-bottom: 1px solid #333;
}

section {
  padding: 2rem;
  border-bottom: 1px solid #333;
}

.faction-select {
  display: flex;
  justify-content: center;
  gap: 2rem;
  height: 40vh;
  align-items: center;
}

.faction-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #333;
  border: none;
  border-radius: 12px;
  color: white;
  padding: 2rem;
  width: 320px;
  font-size: 1.2rem;
  cursor: pointer;
}

.faction-button img {
  width: 256px;
  height: 128px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

#map-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #2b2b2b;
  z-index: 999;
  flex-direction: column;
}

#overlay-content {
  flex: 1;
  display: flex;
  width: 100%;
  height: 100%;
}

#map-image-container {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100%;
}

#map-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#map-content {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

#region, .marker, #map-grid-overlay {
  position: absolute;
}

#region {
  pointer-events: auto;
}

#map-grid-overlay {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 1px, transparent 1px, transparent 5%),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 1px, transparent 1px, transparent 5%);
}

.marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 15;
}

.marker.teal {
  background-color: #00cccc;
  border: 2px solid white;
}

.marker.red {
  background-color: red;
}

.region {
  position: absolute;
  opacity: 0.4;
  pointer-events: auto;
  cursor: help;
  z-index: 5;
}

.usa-region {
  background-color: blue;
}

.russia-region {
  background-color: red;
}

#character-profile {
  flex: 0.33;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  text-align: left;
}

#character-profile video {
  width: 100%;
  margin-top: 1rem;
}

#news-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  color: #f2f2f2;
  overflow: hidden;
  padding: 1rem 0;
  font-size: 1.2rem;
  z-index: 1000;
  border-top: 1px solid #444;
}

.ticker-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 45s linear infinite;
}

.ticker-text span {
  cursor: pointer;
  margin: 0 2rem;
  text-decoration: underline;
}

#news-modal, #report-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #000;
  color: #fff;
  padding: 2rem;
  z-index: 3000;
  border: 1px solid #444;
  width: 80%;
  max-width: 800px;
}

#news-modal video {
  width: 100%;
  margin-top: 1rem;
}

#news-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.grid-label {
  position: absolute;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  pointer-events: none;
  z-index: 20;
}

.grid-label.x {
  top: 0;
  transform: translateX(-50%);
}

.grid-label.y {
  left: 0;
  transform: translateY(-50%);
}

@keyframes ticker {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}
