/* Main Styles for Warfish Game Replay */

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

h1 {
  color: #2c3e50;
  font-size: 28px;
}

.game-info {
  display: flex;
  gap: 20px;
  font-size: 16px;
}

/* Main Content Layout */
main {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: 20px;
}

/* Game Board Styles */
.game-board {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

#map-image {
  width: 100%;
  display: block;
}

.territories-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allow clicking through to map */
}

.territory {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #333;
  background-color: rgba(220, 220, 220, 0.8);
  text-shadow: none;
  transition: all 0.2s ease;
  pointer-events: auto;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.territory:hover {
  transform: scale(1.2);
  z-index: 100;
  cursor: pointer;
}

.territory.highlight {
  border: 3px solid #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.6);
  transform: scale(1.15);
  z-index: 200;
}

/* Game Controls Styles */
.game-controls {
  background-color: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.playback-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.control-button {
  padding: 8px 20px;
  border: none;
  border-radius: 5px;
  background-color: #3498db;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.control-button:hover {
  background-color: #2980b9;
}

.slider-container {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.slider-container label {
  width: 80px;
  font-weight: bold;
}

.slider {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
}

/* Game Panels Styles */
.game-panels {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

.panel {
  background-color: #fff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h2 {
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.players-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-card {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  padding: 5px;
  border-radius: 4px;
  background: #fff;
}

.player-card.active {
  background-color: #f0f8ff;
  border-left: 3px solid #3498db;
}

.player-card.eliminated {
  opacity: 0.5;
}

.player-color {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-right: 8px;
}

.player-name {
  font-weight: bold;
  flex: 1;
}

.player-stats {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.player-cards {
  display: flex;
  gap: 5px;
  margin-top: 3px;
}

.card-icon {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  color: #555;
}

.card-icon.infantry {
  background-color: #ffe0e0;
  border-color: #ffcaca;
}

.card-icon.cavalry {
  background-color: #e0ffe0;
  border-color: #caffca;
}

.card-icon.artillery {
  background-color: #e0e0ff;
  border-color: #cacaff;
}

.card-icon.wild {
  background-color: #fff0e0;
  border-color: #ffe0ca;
}

.log-container {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 10px;
}

.log-entry {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.log-header {
  font-weight: bold;
  margin-bottom: 5px;
}

.log-details {
  font-size: 14px;
  color: #666;
}

/* Footer Styles */
footer {
  margin-top: 30px;
  text-align: center;
  color: #888;
  font-size: 14px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

footer a {
  color: #3498db;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

#loading-message {
  font-size: 18px;
  color: #333;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 991px) {
  .game-panels {
    grid-template-columns: 1fr;
  }
  
  .panel {
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .game-info {
    width: 100%;
    justify-content: space-between;
  }
  
  .playback-controls {
    flex-wrap: wrap;
  }
} 