/* CSS Design System for OCR100 Interactive Web App */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=Sora:wght@400;600;700;800&family=Share+Tech+Mono&display=swap');

:root {
  /* Superficies (alineado con rogercaritj.com: crema/claro) */
  --bg-primary: #fbf9f5;
  --bg-secondary: #f1ede5;
  --bg-card: #ffffff;
  --bg-card-hover: #fbf7f1;
  --border-color: rgba(27, 26, 24, 0.12);
  --border-active: rgba(238, 85, 45, 0.45);

  /* Colores de marca */
  --neon-2026: #2f6b5d; /* pino (secundario) */
  --neon-2024: #ee552d; /* terracota (acento principal) */
  --accent-orange: #d23f1a; /* atención/aviso */
  --neon-red: #cf3a2a; /* peligro */
  --text-primary: #1b1a18;
  --text-secondary: #6c685f;
  --text-muted: #9a948a;

  --font-sans: 'Hanken Grotesk', system-ui, sans-serif;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-mono: 'Share Tech Mono', ui-monospace, monospace;

  --transition-fast: 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-normal: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-neon-2026: 0 8px 22px -12px rgba(47, 107, 93, 0.40);
  --shadow-neon-2024: 0 8px 22px -12px rgba(238, 85, 45, 0.40);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  padding: 1.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}

/* Background grid effect */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(rgba(27, 26, 24, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 26, 24, 0.07) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -1;
  pointer-events: none;
}

/* Main Container */
.container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--neon-2024), var(--neon-2026));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--bg-primary);
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(47, 107, 93, 0.3);
}

.brand-text h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.brand-text p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation & Controls */
.controls {
  display: flex;
  gap: 0.75rem;
  background: rgba(236, 230, 219, 0.6);
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.btn-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-tab.active[data-year="2024"] {
  background: var(--neon-2024);
  color: var(--bg-primary);
  box-shadow: var(--shadow-neon-2024);
}

.btn-tab.active[data-year="2026"] {
  background: var(--neon-2026);
  color: var(--bg-primary);
  box-shadow: var(--shadow-neon-2026);
}

.btn-tab.active[data-year="compare"] {
  background: linear-gradient(90deg, var(--neon-2024), var(--neon-2026));
  color: var(--bg-primary);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Left Column: Track Layout & Visualization */
.main-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Shared Card style */
.card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: var(--transition-normal);
}

.card:hover {
  border-color: var(--border-active);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.card-title .badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
}

.badge-2024 {
  background: rgba(238, 85, 45, 0.1);
  color: var(--neon-2024);
  border: 1px solid rgba(238, 85, 45, 0.3);
}

.badge-2026 {
  background: rgba(47, 107, 93, 0.1);
  color: var(--neon-2026);
  border: 1px solid rgba(47, 107, 93, 0.3);
}

.badge-compare {
  background: linear-gradient(90deg, rgba(238, 85, 45, 0.1), rgba(47, 107, 93, 0.1));
  color: #fff;
  border: 1px solid var(--border-active);
}

/* Track Overview Section */
.track-visualizer {
  position: relative;
  overflow: hidden;
}

/* Interactive Map Track Container */
.track-container {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-top: 1rem;
  padding: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Individual 50m Tramo Section (Now unified 100m) */
.tramo-section {
  position: relative;
  background: rgba(236, 230, 219, 0.4);
  border: 1px solid rgba(27, 26, 24, 0.3);
  border-radius: 10px;
  padding: 1rem;
  transition: var(--transition-normal);
}

.tramo-section:hover {
  border-color: rgba(27, 26, 24, 0.6);
  background: rgba(236, 230, 219, 0.6);
}

@media (max-width: 1400px) {
  .tramo-section {
    min-width: 1200px;
  }
}

.tramo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(27, 26, 24, 0.2);
  padding-bottom: 0.4rem;
}

.tramo-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tramo-title::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--neon-2026);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-2026);
}

[data-active-year="2024"] .tramo-title::before {
  background: var(--neon-2024);
  box-shadow: 0 0 8px var(--neon-2024);
}

.tramo-range {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.track-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  cursor: crosshair;
}

/* Progress Slider */
.progress-control {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(236, 230, 219, 0.5);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
}

.slider-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--neon-2026);
  font-weight: bold;
}

[data-active-year="2024"] .slider-value {
  color: var(--neon-2024);
}

.progress-controls-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-play {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-play:hover {
  border-color: var(--neon-2026);
  color: #fff;
  box-shadow: 0 0 10px rgba(47, 107, 93, 0.15);
}

[data-active-year="2024"] .btn-play:hover {
  border-color: var(--neon-2024);
  box-shadow: 0 0 10px rgba(238, 85, 45, 0.15);
}

.btn-play.playing {
  background: rgba(210, 63, 26, 0.1);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  box-shadow: 0 0 10px rgba(210, 63, 26, 0.2);
}

.athlete-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.athlete-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--neon-2026);
  cursor: pointer;
  box-shadow: var(--shadow-neon-2026);
  transition: var(--transition-fast);
}

[data-active-year="2024"] .athlete-slider::-webkit-slider-thumb {
  background: var(--neon-2024);
  box-shadow: var(--shadow-neon-2024);
}

.athlete-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Obstacles Sequence List */
.sequence-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.seq-item {
  flex: 0 0 180px;
  background: rgba(236, 230, 219, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.seq-item:hover {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.02);
}

.seq-item.active {
  border-color: var(--neon-2026);
  background: rgba(47, 107, 93, 0.05);
}

[data-active-year="2024"] .seq-item.active {
  border-color: var(--neon-2024);
  background: rgba(238, 85, 45, 0.05);
}

.seq-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.seq-item.active .seq-num {
  color: var(--neon-2026);
}

[data-active-year="2024"] .seq-item.active .seq-num {
  color: var(--neon-2024);
}

.seq-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.seq-dist {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Detail Panel Grid for Blueprint & Description */
.detail-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1000px) {
  .detail-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
  }
}

/* Blueprint Canvas Card */
.blueprint-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blueprint-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.blueprint-title h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
}

.blueprint-title p {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.blueprint-display {
  width: 100%;
  aspect-ratio: 4/3;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Engineering Blueprint Grid Theme overlay */
.blueprint-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(238, 85, 45, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 85, 45, 0.03) 1px, transparent 1px);
  background-size: 15px 15px;
  pointer-events: none;
}

.blueprint-display svg {
  width: 90%;
  height: 90%;
  z-index: 1;
}

/* Spec labels inside blueprint */
.blueprint-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.spec-item {
  background: rgba(236, 230, 219, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.spec-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--text-primary);
}

.spec-item-full {
  grid-column: span 2;
}

/* Informational Cards */
.description-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.spec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Compare Mode Highlights */
.comparison-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 244, 236, 0.9));
  border: 1px solid var(--border-active);
  border-radius: 16px;
  padding: 1.5rem;
}

.compare-diff-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.diff-entry {
  background: rgba(236, 230, 219, 0.4);
  border-left: 3px solid var(--accent-orange);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.diff-entry.removed {
  border-left-color: var(--neon-red);
}

.diff-entry.added-changed {
  border-left-color: var(--neon-2026);
}

.diff-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
}

.diff-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.diff-badge.removed-bg {
  background: rgba(255, 62, 108, 0.1);
  color: var(--neon-red);
  border: 1px solid rgba(255, 62, 108, 0.3);
}

.diff-badge.modified-bg {
  background: rgba(47, 107, 93, 0.1);
  color: var(--neon-2026);
  border: 1px solid rgba(47, 107, 93, 0.3);
}

.diff-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Info Summary Deck */
.info-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 600px) {
  .info-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.info-box {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-box-val {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--neon-2026);
}

[data-active-year="2024"] .info-box-val {
  color: var(--neon-2024);
}

.info-box-lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Footer rules */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

footer a:hover {
  color: var(--neon-2026);
}

/* SVG interactive nodes hover */
.svg-interactive-node {
  cursor: pointer;
  transition: filter var(--transition-fast);
}
.svg-interactive-node:hover {
  filter: brightness(1.35);
}

/* Highlighting changes on map in Compare Mode */
.track-svg .highlight-removed {
  stroke: var(--neon-red) !important;
  stroke-dasharray: 4 2;
  opacity: 0.65;
}

.track-svg .highlight-modified {
  stroke: var(--neon-2026) !important;
  stroke-shadow: var(--shadow-neon-2026);
}

.blueprint-display .dimension-line {
  stroke: #d23f1a;
  stroke-width: 1;
  stroke-dasharray: 2 2;
}

.blueprint-display .dimension-text {
  fill: #d23f1a;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: bold;
}

/* 2D/3D View Toggle and Camera Controls styling */
.view-toggle-container {
  display: flex;
  background: rgba(236, 230, 219, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
}

.btn-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-toggle.active {
  background: var(--border-color);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.05);
}

body[data-active-year="2026"] .btn-toggle.active {
  background: rgba(47, 107, 93, 0.15);
  color: var(--neon-2026);
  border: 1px solid rgba(47, 107, 93, 0.3);
}

body[data-active-year="2024"] .btn-toggle.active {
  background: rgba(238, 85, 45, 0.15);
  color: var(--neon-2024);
  border: 1px solid rgba(238, 85, 45, 0.3);
}

/* 3D Visualizer Canvas Container */
.track-3d-container {
  position: relative;
  width: 100%;
  height: 380px; /* Altura móvil optimizada */
  background: #0d121f; /* Fondo ligeramente más claro y azulado */
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .track-3d-container {
    height: 550px; /* Altura escritorio premium */
  }
}

/* 3D Loading Overlay */
.loading-overlay-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #060910;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.spinner-3d {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(47, 107, 93, 0.1);
  border-top: 2px solid var(--neon-2026);
  border-radius: 50%;
  animation: spin3D 0.8s linear infinite;
}

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

/* Floating camera control buttons over canvas */
.camera-controls-3d {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  background: rgba(236, 230, 219, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px;
  z-index: 5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.btn-cam {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-cam svg {
  opacity: 0.6;
  transition: var(--transition-fast);
}

.btn-cam:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-cam:hover svg {
  opacity: 1;
}

.btn-cam.active {
  color: var(--bg-primary);
  background: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.25);
}

.btn-cam.active svg {
  opacity: 1;
}

body[data-active-year="2026"] .btn-cam.active {
  background: var(--neon-2026);
  color: var(--bg-primary);
  box-shadow: var(--shadow-neon-2026);
}

body[data-active-year="2024"] .btn-cam.active {
  background: var(--neon-2024);
  color: var(--bg-primary);
  box-shadow: var(--shadow-neon-2024);
}

/* --- FPV Holographic HUD System --- */
:root {
  --hud-color: var(--neon-2024);
  --hud-color-rgb: 0, 229, 255;
}

body[data-active-year="2026"] {
  --hud-color: var(--neon-2026);
  --hud-color-rgb: 0, 255, 135;
}

body[data-active-year="2024"] {
  --hud-color: var(--neon-2024);
  --hud-color-rgb: 0, 229, 255;
}

.fpv-hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  box-sizing: border-box;
  overflow: hidden;
  color: var(--hud-color);
  text-shadow: 0 0 5px rgba(var(--hud-color-rgb), 0.5);
  font-family: var(--font-mono);
}

/* Helmet Visor Scanning & Vignette */
.hud-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  z-index: 1;
}

.hud-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    transparent 50%,
    rgba(0, 0, 0, 0.4) 80%,
    rgba(var(--hud-color-rgb), 0.15) 100%
  );
  border: 1px solid rgba(var(--hud-color-rgb), 0.2);
  border-radius: 12px;
  box-sizing: border-box;
  z-index: 1;
}

/* Top Compass */
.hud-top-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 2;
  margin-top: 5px;
}

.hud-compass-container {
  width: 280px;
  height: 35px;
  background: rgba(236, 230, 219, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(var(--hud-color-rgb), 0.3);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hud-compass-tape {
  display: flex;
  gap: 15px;
  white-space: nowrap;
  font-size: 0.75rem;
  letter-spacing: 1px;
  transition: transform 0.1s ease-out;
  padding: 0 10px;
}

.hud-compass-tape span {
  display: inline-block;
  font-weight: bold;
}

.hud-compass-marker {
  position: absolute;
  bottom: 0px;
  font-size: 0.55rem;
  color: var(--hud-color);
  text-shadow: 0 0 8px var(--hud-color);
}

/* Side Panels */
.hud-panel {
  position: absolute;
  top: 60px;
  width: 200px;
  background: rgba(236, 230, 219, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(var(--hud-color-rgb), 0.3);
  box-shadow: inset 0 0 15px rgba(var(--hud-color-rgb), 0.1);
  border-radius: 8px;
  padding: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.75rem;
}

.hud-panel-left {
  left: 20px;
  border-left: 3px solid var(--hud-color);
}

.hud-panel-right {
  right: 20px;
  border-right: 3px solid var(--hud-color);
}

.hud-panel-header {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 0.75rem;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(var(--hud-color-rgb), 0.3);
  padding-bottom: 4px;
  opacity: 0.9;
}

.hud-metric-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.hud-value-container {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hud-value {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-mono);
  line-height: 1;
}

.hud-unit {
  font-size: 0.6rem;
  opacity: 0.7;
}

.hud-bar-graph {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
}

.hud-bar-fill {
  height: 100%;
  background: var(--hud-color);
  box-shadow: 0 0 8px var(--hud-color);
  transition: width 0.1s ease-out;
}

/* Animations */
.heartbeat-anim {
  animation: hudPulse 1s infinite alternate;
}

@keyframes hudPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.05); filter: brightness(1.2); }
}

.blinking-anim {
  animation: hudBlink 1.5s infinite;
}

@keyframes hudBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Heart pulse wave bars */
.hud-heart-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  margin-top: 5px;
}

.hud-wave-bar {
  flex: 1;
  width: 4px;
  background: var(--hud-color);
  animation: ecgWave 0.8s ease-in-out infinite alternate;
}

@keyframes ecgWave {
  0% { height: 15%; }
  100% { height: 100%; }
}

/* System detail lines */
.hud-sys-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.6rem;
  opacity: 0.8;
  margin-top: 5px;
}

.sys-line {
  border-left: 1px solid rgba(var(--hud-color-rgb), 0.4);
  padding-left: 4px;
}

/* Center Crosshair and Pitch ladder */
.hud-center-rig {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hud-reticle {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-reticle-ring {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(var(--hud-color-rgb), 0.4);
  border-radius: 50%;
  position: absolute;
}

.hud-reticle-cross {
  width: 8px;
  height: 8px;
  position: relative;
}

.hud-reticle-cross::before,
.hud-reticle-cross::after {
  content: '';
  position: absolute;
  background: var(--hud-color);
}

.hud-reticle-cross::before {
  top: 3px;
  left: -2px;
  width: 12px;
  height: 2px;
}

.hud-reticle-cross::after {
  top: -2px;
  left: 3px;
  width: 2px;
  height: 12px;
}

/* Pitch Ladder */
.hud-pitch-ladder {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 0.6rem;
  opacity: 0.4;
  text-align: center;
  width: 140px;
  align-items: center;
  pointer-events: none;
  transition: transform 0.1s ease-out;
}

.hud-ladder-line {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
}

.hud-ladder-line.zero {
  opacity: 0.8;
  font-weight: bold;
}

/* Bottom Alert Bar */
.hud-bottom-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 2;
  margin-bottom: 10px;
}

.hud-phase-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(236, 230, 219, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(var(--hud-color-rgb), 0.4);
  border-radius: 20px;
  padding: 6px 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.hud-phase-label {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hud-hazard-lines {
  width: 30px;
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--hud-color),
    var(--hud-color) 3px,
    transparent 3px,
    transparent 6px
  );
  opacity: 0.7;
}

/* Responsive adjustment for mobile HUD overlay scale */
@media (max-width: 768px) {
  .hud-panel {
    top: 50px;
    width: 140px;
    font-size: 0.65rem;
    padding: 6px;
  }
  .hud-panel-left { left: 10px; }
  .hud-panel-right { right: 10px; }
  .hud-compass-container { width: 180px; }
  .hud-value { font-size: 1.1rem; }
  .hud-top-bar { margin-top: 0; }
  .hud-bottom-bar { margin-bottom: 5px; }
  .hud-center-rig { width: 160px; height: 160px; }
}

/* ===== Ajustes de marca rogercaritj.com ===== */
.logo-icon { color: #fff; box-shadow: var(--shadow-neon-2024); }
header { box-shadow: 0 1px 2px rgba(27,26,24,.05), 0 16px 34px -22px rgba(27,26,24,.26); }
.card { box-shadow: 0 1px 2px rgba(27,26,24,.05), 0 14px 30px -20px rgba(27,26,24,.22); }
.btn-play:hover { color: var(--neon-2026); }
.badge-compare { color: var(--text-primary); }

/* Imagen propia de obstáculo en la ficha (alternativa al plano SVG) */
.blueprint-display.has-photo { aspect-ratio: auto; height: auto; padding: 8px; }
.blueprint-photo { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; border-radius: 6px; position: relative; z-index: 1; }
.blueprint-credit { position: absolute; bottom: 6px; right: 10px; z-index: 2; font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); background: rgba(255,255,255,0.7); padding: 1px 6px; border-radius: 6px; }

/* ===================== RESPONSIVE MÓVIL ===================== */
@media (max-width: 640px) {
  body { padding: 0.7rem; }
  .dashboard-grid, .main-panel { gap: 1rem; }
  header { padding: 1rem; gap: 0.6rem; }
  .brand { gap: 0.7rem; }
  .logo-icon { width: 40px; height: 40px; font-size: 1.2rem; }
  .brand-text h1 { font-size: 1.1rem; letter-spacing: -0.3px; }
  .brand-text p { font-size: 0.65rem; letter-spacing: 0.5px; }

  .card { padding: 1rem; border-radius: 12px; }
  .card-title { flex-wrap: wrap; gap: 0.5rem; font-size: 1rem; align-items: flex-start; }
  .header-right-group { width: 100%; justify-content: space-between; }
  .view-toggle-container { flex: 1; }
  .btn-toggle { flex: 1; padding: 0.5rem 0.4rem; font-size: 0.78rem; }

  .info-box { padding: 0.8rem; }
  .info-box-val { font-size: 1.05rem; }
  .info-box-lbl { font-size: 0.68rem; }

  .blueprint-spec-grid { grid-template-columns: 1fr; }
  .blueprint-photo { max-height: 58vh; }
  .description-text { font-size: 0.9rem; }

  .track-3d-container { height: 300px; }
  .camera-controls-3d { flex-wrap: wrap; justify-content: center; gap: 0.4rem; max-width: 94%; }
  .btn-cam { padding: 0.4rem 0.55rem; font-size: 0.68rem; }

  .slider-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* HUD del POV 3D: en móvil quitamos brújula, velocidad/pulso y sistema FPV para no saturar */
  .hud-top-bar,
  .hud-panel-left,
  .hud-panel-right { display: none !important; }
}
