/* Brazil Norway Tactical Mapper - Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #f8f9fa;
  padding: 1rem;
}
header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}
header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #0d3b0d;
}
nav a {
  color: #555;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}
nav a:hover, nav a[aria-current] { background-color: #e8f5e9; color: #0d3b0d; }
main { max-width: 1200px; margin: 0 auto; }
section { margin-bottom: 2rem; }
section h2 { font-size: 1.25rem; margin-bottom: 0.75rem; color: #0d3b0d; }
.control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.control-bar button, .control-bar select {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}
.control-bar button:hover, .control-bar select:hover { background: #e8f5e9; }
.compare-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1rem;
}
.panel { background: white; border-radius: 8px; padding: 1rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.panel h3 { font-size: 1rem; margin-bottom: 0.5rem; color: #0d3b0d; }
.pitch {
  width: 100%;
  max-width: 350px;
  height: auto;
  border: 2px solid #1b4965;
  border-radius: 4px;
  background: #0a3d2e;
  position: relative;
  user-select: none;
}
.players {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
n	display: flex;
  flex-wrap: wrap;
  padding: 10px;
  justify-content: space-around;
}
.player {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0d3b0d;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  transition: transform 0.2s, background 0.2s;
}
.player:active { cursor: grabbing; }
.player.dragging { opacity: 0.5; }
.events {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #ccc;
}
.event {
  display: inline-block;
  background: #ff9800;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin: 2px;
}
.timeline-section {
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.timeline-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
#timeline-slider {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  outline: none;
}
#timeline-slider::-webkit-slider-thumb { width: 16px; height: 16px; border-radius: 50%; background: #0d3b0d; cursor: pointer; }
.timeline-events {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #666;
}
.timeline-marker {
  background: #e8f5e9;
  padding: 2px 6px;
  border-radius: 4px;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
.preset {
  padding: 0.75rem;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.preset:hover { background: #bbdefb; }
.preset:active { transform: scale(0.97); }
.history-list {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  max-height: 200px;
  overflow-y: auto;
}
.history-item {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-item:last-child { border-bottom: none; }
.history-btn {
  background: #e8f5e9;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}
.history-btn:hover { background: #c8e6c9; }
.empty-state {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 1rem 0;
}
#clear-history { margin-top: 0.5rem; background: none; border: none; color: #d32f2f; cursor: pointer; }
#clear-history:hover { text-decoration: underline; }
.about-heading { background: #fff8e1; padding: 1rem; border-radius: 8px; border-left: 4px solid #ff9800; }
.caveat-note {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  padding: 0.75rem;
  margin-top: 1rem;
  border-radius: 0 8px 8px 0;
}
footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
}
@media (max-width: 768px) {
  header h1 { font-size: 1.5rem; }
  .panel { padding: 0.75rem; }
  .preset-grid { grid-template-columns: repeat(3, 1fr); }
  .compare-panel { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .preset-grid { grid-template-columns: repeat(2, 1fr); }
  .control-bar { flex-direction: column; align-items: stretch; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
