/* ===== Attack Port Styles ===== */

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Homepage styles */
.homepage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 2rem;
  text-align: center;
}

.homepage-title {
  font-size: 4.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.5rem;
  letter-spacing: -2px;
}

.homepage-title sup {
  font-size: 1.5rem;
  color: #fbbf24;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
  font-weight: 600;
}

.homepage-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 3rem;
  max-width: 600px;
}

.homepage-buttons {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.homepage-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  text-decoration: none;
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  min-width: 140px;
}

.homepage-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  background: white;
}

.homepage-button.primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.homepage-button.primary:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: translateY(-3px);
}

/* Game layout */
.game-container {
  display: flex;
  min-height: calc(100vh - 80px); /* Account for footer height */
  background: #f8fafc;
  flex: 1; /* Take available space */
}

.game-container h2 {
  font-size: 2rem;
  font-weight: 800;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.5rem;
  letter-spacing: -2px;
}

.game-container h2 sup {
  font-size: 1.5rem;
  color: #fbbf24;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
  font-weight: 600;
}

#left {
  width: 480px;
  border-right: 1px solid #e2e8f0;
  padding: 20px;
  overflow: auto;
  background: white;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  min-height: 0;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  position: relative;
}

/* Board styling */
#board {
  border: 2px solid #64748b;
  border-radius: 8px;
  margin: 10px;
  cursor: pointer;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: white;
  touch-action: none; /* Prevent default touch behaviors for mobile */
}

/* Drop overlay for Safari drag-and-drop compatibility */
.drop-overlay {
  position: absolute;
  pointer-events: auto;
  z-index: 10;
  /* Size and position set dynamically via JS to match canvas */
}

.drop-overlay.hidden {
  display: none;
}

/* Safari draggable support */
[draggable="true"] {
  -webkit-user-drag: element;
  -khtml-user-drag: element;
  -moz-user-drag: element;
  -o-user-drag: element;
  user-drag: element;
}

/* Typography */
h2 {
  color: #1e293b;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  font-weight: 700;
}

h3 {
  color: #334155;
  margin: 1.5rem 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

/* Layout helpers */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  padding: 4px 0;
  color: #111827;
}

.cost {
  font-weight: 700;
  font-size: 1.1rem;
}

.ok {
  color: #059669;
}

.bad {
  color: #dc2626;
}

.muted {
  color: #64748b;
}

.small {
  font-size: 0.875rem;
  opacity: 0.8;
}

.hidden {
  display: none !important;
}

/* Button styling */
button {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

button:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

button:disabled:hover {
  background: #94a3b8;
  transform: none;
  box-shadow: none;
}

/* Secondary button variant */
button.secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

button.secondary:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

/* HUD styling */
#hud {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Tag styling */
.tag {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  background: white;
  color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.tag:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Timer styling */
#timer {
  font-weight: bold;
  font-size: 1.1rem;
}

/* Log containers */
#log, #log2, #deathLog, #deathLog2 {
  height: 120px;
  overflow: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  line-height: 1.4;
}

#log, #log2 {
  color: #111827;
}

#deathLog, #deathLog2 {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* Pre-game setup container */
#pre {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  background: #fefefe;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Start Placement button spacing */
#startBtn {
  margin-top: 8px;
}

/* Ammo dots */
.ammo-dots { display: inline-flex; gap: 6px; align-items: center; min-height: 18px; }
.ammo-dot {
  width: 12px; height: 12px; border-radius: 50%; display: inline-block;
  border: 2px solid #10b981; box-sizing: border-box; transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}
.ammo-dot.filled { background-color: #10b981; border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(16,185,129,0.15); }
.ammo-dot.empty { background-color: transparent; border-color: #94a3b8; opacity: 0.8; }
.ammo-dot.pop { transform: scale(1.15); }

/* Porter selection grid */
#picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}

/* Porter card styling */
.porter-card {
  border: 2px solid #e5e7eb;
  padding: 16px;
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  touch-action: manipulation; /* Prevent double-tap zoom on mobile */
}

.palette .porter-card {
  flex: 0 1 calc(50% - 8px);
  max-width: calc(50% - 8px);
  width: calc(50% - 8px);
}

.porter-title {
  color: #111827;
}

.porter-title-text {
  color: #111827;
}

/* Small icon box inside porter cards */
.porter-icon {
  position: relative;
  overflow: hidden;
}
.porter-icon .porter-fa {
  font-size: 12px;
  line-height: 1;
  color: #fff;
}
.porter-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  color: #fff;
}
/* Image variant */
.porter-icon img.porter-img-icon {
  width: 14px;
  height: 14px;
  display: block;
}
/* Hide text fallback when an SVG icon has been injected by the FA kit */
.porter-icon:has(svg) .porter-abbr-fallback,
.porter-icon:has(img) .porter-abbr-fallback {
  display: none;
}

.porter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(29, 78, 216, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.porter-card:hover {
  border-color: #9ca3af;
  background: #f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.porter-card:hover::before {
  opacity: 1;
}

.porter-card.selected {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.porter-card.selected::before {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.1));
  opacity: 1;
}

.porter-card.selected:hover {
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.porter-card label {
  cursor: pointer;
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  pointer-events: none;
  color: #1f2937;
  position: relative;
  z-index: 1;
}

.porter-stats {
  font-size: 0.8rem;
  color: #6b7280;
  pointer-events: none;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

/* Selected porter tags */
#chosen .tag {
  margin: 4px 8px 6px 0;
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  cursor: pointer;
}

#chosen .tag:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Next type card in placement */
#nextTypeCard {
  border: 2px solid #10b981;
  background: #ecfdf5;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

#nextTypeName {
  font-weight: 700;
  margin-bottom: 6px;
  color: #065f46;
}

#nextTypeStats {
  font-size: 0.8rem;
  color: #047857;
}

/* Responsive design */
@media (max-width: 1024px) {
  .game-container {
    flex-direction: column;
    min-height: calc(100vh - 80px);
  }
  
  #left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  
  #main {
    padding: 15px;
    flex: 1;
  }
  
  #board {
    max-height: 70vh;
  }
  
  .homepage-title {
    font-size: 3.5rem;
  }
  
  .homepage-buttons {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .palette .porter-card {
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
  }

  #picker {
    grid-template-columns: 1fr;
  }
  
  #left {
    padding: 15px;
  }
  
  #main {
    padding: 10px;
  }
  
  .homepage-title {
    font-size: 2.5rem;
  }
  
  .homepage-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .homepage-button {
    min-width: 200px;
  }
}

/* Animation for visual feedback */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

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

/* Footer styling */
.footer {
  text-align: center;
  padding: 10px;
  border-top: 1px solid #848484;
  background: #030a11;
  color: #64748b;
  font-size: 0.9rem;
  margin-top: auto;
  flex-shrink: 0; /* Prevent footer from shrinking */
}

.footer a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Homepage logo styling */
.homepage-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.2));
}

/* Guide page styling */
.guide-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.guide-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e2e8f0;
}

.guide-title {
  font-size: 3rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.guide-title sup {
  font-size: 1.5rem;
  color: #fbbf24;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
  font-weight: 600;
}

.guide-subtitle {
  font-size: 1.2rem;
  color: #64748b;
}

.guide-section {
  margin-bottom: 3rem;
}

.guide-section h2 {
  color: #1e293b;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.guide-section h3 {
  color: #334155;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.guide-section p {
  line-height: 1.7;
  color: #475569;
  margin-bottom: 1rem;
}

.guide-section ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.guide-section li {
  line-height: 1.6;
  color: #475569;
  margin-bottom: 0.5rem;
}

.porter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.porter-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.porter-info:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.porter-info h4 {
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.porter-info .abbr {
  display: inline-block;
  background: #3b82f6;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.porter-info-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.porter-info-header h4 {
  margin: 0;
}

.porter-icon-guide {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  background: #1f2937;
}

.porter-icon-guide img {
  width: 28px;
  height: 28px;
  display: block;
}

.porter-icon-guide.porter-icon-archer {
  background: #2563eb;
}

.porter-icon-guide.porter-icon-blitz {
  background: #f59e0b;
}

.porter-icon-guide.porter-icon-guardian {
  background: #10b981;
}

.porter-icon-guide.porter-icon-shadow {
  background: #6b7280;
}

.porter-icon-guide.porter-icon-mage {
  background: #8b5cf6;
}

.porter-icon-guide.porter-icon-cannon {
  background: #ef4444;
}

.porter-icon-guide.porter-icon-hunter {
  background: #22c55e;
}

.porter-icon-guide.porter-icon-scout {
  background: #0ea5e9;
}

.porter-stats-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.stat-label {
  font-weight: 600;
  color: #374151;
}

.stat-value {
  color: #6b7280;
  font-weight: 500;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 2rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #2563eb;
  transform: translateX(-2px);
}

.highlight-box {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #93c5fd;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.highlight-box h4 {
  color: #1d4ed8;
  margin-top: 0;
  margin-bottom: 1rem;
}

.highlight-box p {
  margin-bottom: 0;
  color: #1e40af;
}

/* ===== Highlight Reel Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.3s ease-out;
}

.modal-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Game Over themed variants */
#gameOverModal.win .modal-header {
  background: linear-gradient(135deg, #10b981, #16a34a);
}
#gameOverModal.lose .modal-header {
  background: linear-gradient(135deg, #475569, #1f2937);
}
#gameOverModal.draw .modal-header {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
}

#gameOverModal.win .modal-container {
  box-shadow: 0 20px 70px rgba(16, 185, 129, 0.35);
}
#gameOverModal.lose .modal-container {
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.35);
}
#gameOverModal.draw .modal-container {
  box-shadow: 0 20px 70px rgba(99, 102, 241, 0.35);
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg);
}

.modal-body {
  padding: 0;
  max-height: calc(90vh - 200px);
  overflow-y: auto;
}

.events-list {
  padding: 24px 28px;
}

.event-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
  animation: eventSlideIn 0.5s ease-out forwards;
  opacity: 0;
  transform: translateX(-20px);
}

.event-item:last-child {
  border-bottom: none;
}

.event-icon {
  font-size: 32px;
  margin-right: 20px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: eventIconBounce 0.6s ease-out;
}

.event-content {
  flex: 1;
}

.event-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  line-height: 1.3;
}

.event-description {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.4;
}

.event-coordinates {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}

.modal-summary {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-top: 1px solid #e2e8f0;
  padding: 24px 28px;
}

/* Game Over detailed summary grid */
.go-details {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.go-detail {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.go-detail .go-ico {
  font-size: 18px;
  width: 26px;
  text-align: center;
}

.go-detail .go-text {
  line-height: 1.3;
  color: #334155;
  font-weight: 600;
}

.go-detail .go-sub {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

@media (max-width: 768px) {
  .go-details { grid-template-columns: 1fr; }
}

/* Confetti overlay */
.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1100; /* Over the modal content; non-interactive */
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  border-radius: 2px;
  transform: translateY(0) rotate(0deg);
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); }
  100% { transform: translateY(110vh) rotate(720deg); }
}

.scoreboard {
  display: flex;
  justify-content: space-around;
  gap: 24px;
}

.score-item {
  text-align: center;
  flex: 1;
}

.score-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
}

.score-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-footer {
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 20px 28px;
  display: flex;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  min-width: 200px;
}

.primary-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Event type specific styling */
.event-move .event-icon { color: #3b82f6; }
.event-attack .event-icon { color: #ef4444; }
.event-death .event-icon { color: #dc2626; }
.event-collision .event-icon { color: #f59e0b; }
.event-capture .event-icon { color: #10b981; }
.event-points .event-icon { color: #8b5cf6; }

/* Animations */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from { 
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes eventSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes eventIconBounce {
  0% { transform: scale(0.3) rotate(-180deg); }
  50% { transform: scale(1.1) rotate(-90deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header {
    padding: 20px;
  }
  
  .modal-header h2 {
    font-size: 1.5rem;
  }
  
  .events-list {
    padding: 20px;
  }
  
  .event-item {
    padding: 12px 0;
  }
  
  .event-icon {
    font-size: 24px;
    margin-right: 16px;
    min-width: 36px;
  }
  
  .scoreboard {
    flex-direction: column;
    gap: 16px;
  }
  
  .score-value {
    font-size: 1.75rem;
  }
  
  .modal-summary, .modal-footer {
    padding: 20px;
  }
  
  .primary-btn {
    width: 100%;
    min-width: auto;
  }
}
