/* ==================== VARIABLES CSS COMPLETAS ==================== */
:root {
  /* Colores */
  --bg-dark: #0b0d1b;
  --bg-card: rgba(20, 20, 40, 0.7);
  --text-primary: #ffffff;
  --text-secondary: #72d6ff;
  --accent: #72d6ff;
  --accent-purple: #ff7fff;
  --border-color: rgba(255, 255, 255, 0.1);
  
  /* Espaciado - AGREGADO: Variables que faltaban */
  --gap-md: 0.2rem;
  --gap-lg: 0.5rem;
  --mobile-padding: 0.5rem;
  --touch-target: 44px; /* Tamaño mínimo para touch según WCAG */
  
  /* Bordes y sombras */
  --border-width: 1px;
  --border-radius-sm: 6px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --radius: 12px;
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  
  /* Transiciones */
  --transition: 0.3s ease;
  --animation-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --header-height: 70px;
  --sidebar-width-desktop: 340px;
  --sidebar-width-tablet: 280px;
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* AGREGADO: Prevenir zoom en iOS al enfocar inputs */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  color: var(--text-primary);
  background: #000014;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  /* AGREGADO: Asegurar que el body ocupe toda la altura */
  position: relative;
}

/* ==================== FONDO BASE MEJORADO ==================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at top, #1a1f3b 0%, #0b0d1b 50%, #000014 100%);
  pointer-events: none;
  z-index: -2;
}

/* ==================== STARFIELD OPTIMIZADO ==================== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.spiral-galaxy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(400px, 60vw, 800px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    rgba(114, 214, 255, 0.03) 0%,
    rgba(255, 127, 255, 0.03) 30%,
    transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
  z-index: -1;
}

.star.layer-1 { z-index: 1; }
.star.layer-2 { z-index: 2; }
.star.layer-3 { z-index: 3; }

/* ==================== OPTIONS BAR ==================== */
.options-bar {
  padding: var(--gap-md) clamp(1%, 1.5vw, 2%);
  background: radial-gradient(circle at 30% 50%, rgba(114, 214, 255, 0.15), transparent 25%),
              radial-gradient(circle at 70% 50%, rgba(255, 127, 255, 0.15), transparent 25%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  z-index: 1000;
  top: 0;
  min-height: 56px;
 
}

@media (max-width: 48em) {
  .options-bar {
    padding: var(--mobile-padding);
    gap: var(--gap-md);
  }
}

.options-bar label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-right: -4px;
  flex-shrink: 0;
}

@media (max-width: 48em) {
  .options-bar label {
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    margin-right: clamp(0.25rem, 1vw, 0.375rem);
    padding: 0;
    border: none;
    background: none;
    cursor: default;
  }
}

select,
.btn {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  min-height: 38px;
  line-height: 1.2;
}

@media (max-width: 48em) {
  select,
  .btn {
    height: var(--touch-target);
    min-height: var(--touch-target);
    padding: 0 clamp(0.875rem, 3vw, 1rem);
    border-radius: var(--border-radius-md);
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    background: rgba(255, 255, 255, 0.05);
    border: 0.0625rem solid rgba(255, 255, 255, 0.12);
  }
  
  select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%2372d6ff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right clamp(0.625rem, 2vw, 0.75rem) center;
    background-size: clamp(0.875rem, 3vw, 1rem);
    padding-right: clamp(2.25rem, 8vw, 2.75rem);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  opacity: 0;
  transition: opacity 0.2s var(--animation-smooth, ease);
}

@media (pointer: coarse) {
  .btn,
  select,
  .chat-toggle,
  .close-panel,
  .telemetry-toggle {
    min-height: 44px;
    min-width: 44px;
  }
}

.btn:hover,
select:hover {
  background: rgba(30, 30, 60, 0.9);
  border-color: var(--accent);
}

.btn:active::before {
  opacity: 0.15;
}

@media (max-width: 48em) {
  .btn:active {
    transform: scale(0.95);
  }
}

.customize-btn {
  margin-left: auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  border: none;
  color: white;
}

.customize-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

#reloadBtn {
  background: linear-gradient(135deg, rgba(114, 214, 255, 0.15), rgba(255, 127, 255, 0.15));
  border-color: rgba(114, 214, 255, 0.3);
}

#reloadBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==================== TOGGLE BUTTONS ==================== */
.chat-toggle,
.telemetry-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  transition: var(--transition);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

@media (max-width: 48em) {
  .chat-toggle,
  .telemetry-toggle {
    width: var(--touch-target);
    height: var(--touch-target);
    background: rgba(255, 255, 255, 0.05);
    border: 0.0625rem solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius-md);
  }
  
  .chat-toggle:active,
  .telemetry-toggle:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.08);
  }
}

.chat-toggle:hover,
.telemetry-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-toggle svg,
.telemetry-toggle svg {
  transition: transform 0.3s ease;
  width: 18px;
  height: 18px;
}

@media (max-width: 48em) {
  .chat-toggle svg,
  .telemetry-toggle svg {
    width: clamp(1rem, 4vw, 1.25rem);
    height: clamp(1rem, 4vw, 1.25rem);
  }
}

.chat-toggle.rotated svg,
.telemetry-toggle.rotated svg {
  transform: rotate(180deg);
}

.telemetry-toggle {
  display: none;
}

body.f1-mode .telemetry-toggle {
  display: flex;
}

.chat-toggle.rotated,
.telemetry-toggle.rotated {
  background: linear-gradient(135deg, rgba(114, 214, 255, 0.2), rgba(255, 127, 255, 0.2));
  border-color: var(--accent);
}

/* ==================== CONTAINER & LAYOUT - SISTEMA RESPONSIVE COMPLETO ==================== */
/* REFACTORIZADO: Layout principal con mejor manejo responsive */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: var(--gap-md);
  display: grid;
  /* Desktop: Player + Chat */
  grid-template-columns: 1fr var(--sidebar-width-desktop);
  gap: var(--gap-md);
  position: relative;
  z-index: 1;
  align-items: start;
  flex: 1;
  transition: grid-template-columns 0.3s ease;
  isolation: isolate;
  min-height: 0; /* IMPORTANTE para grid */
}

/* MEJORADO: Layout en modo F1 (Desktop: Telemetry + Player + Chat) */
body.f1-mode .container {
  grid-template-columns: var(--sidebar-width-desktop) 1fr var(--sidebar-width-desktop);
}

/* Estados de ocultamiento - Desktop */
.container.chat-hidden {
  grid-template-columns: 1fr;
}

body.f1-mode .container.telemetry-hidden {
  grid-template-columns: 1fr var(--sidebar-width-desktop);
}

body.f1-mode .container.chat-hidden {
  grid-template-columns: var(--sidebar-width-desktop) 1fr;
}

body.f1-mode .container.telemetry-hidden.chat-hidden {
  grid-template-columns: 1fr;
}

/* ==================== CARD BASE ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  position: relative;
  z-index: auto;
  min-height: 0; /* IMPORTANTE para flex */
}

/* ==================== HEADER CANAL COMPACTO ==================== */
.card-header {
  background: transparent;
  padding: 1px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  z-index: auto;
  flex-shrink: 0;
}

.channel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.channel-head img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
}

.channel-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.channel-head .name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


/* ==================== TELEMETRY CARD ==================== */
.telemetry-card {
  grid-column: 1;
  grid-row: 1;
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 0;
  height: 100%;
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
  isolation: isolate;
  z-index: auto;
  contain: layout style;
}

body.f1-mode .telemetry-card {
  display: flex;
}

.telemetry-card.hidden {
  display: none !important;
}

#f1Telemetry {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  min-height: 0;
  position: relative;
  z-index: auto;
}

/* LIMPIEZA: Scrollbar oculta para iframes */
#f1Telemetry::-webkit-scrollbar,
#twitchChat::-webkit-scrollbar,
#playerFrame::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#f1Telemetry,
#twitchChat,
#playerFrame {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* ==================== PLAYER CARD ==================== */
/* REFACTORIZADO: Simplificado y más robusto */
.player-card {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border-color);
  box-shadow: var(--shadow-md);
  height: 100%;
  isolation: isolate;
  position: relative;
}

/* Posicionamiento en modo F1 */
body.f1-mode .player-card {
  grid-column: 2;
}

body.f1-mode .container.telemetry-hidden .player-card {
  grid-column: 1;
}

body.f1-mode .container.chat-hidden .player-card {
  grid-column: 2;
}

body.f1-mode .container.telemetry-hidden.chat-hidden .player-card {
  grid-column: 1;
}

/* SIMPLIFICADO: Eliminado player-wrapper redundante */
#playerFrame {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
  background: transparent;
  flex: 1;
  overflow: hidden !important;
  scrolling: no;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  position: relative;
  z-index: auto;
}

/* ==================== CHAT CARD ==================== */
.chat-card {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 0;
  height: 100%;
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
  isolation: isolate;
  z-index: auto;
  contain: layout style;
}

/* Posicionamiento en modo F1 */
body.f1-mode .chat-card {
  grid-column: 3;
}

body.f1-mode .container.telemetry-hidden .chat-card {
  grid-column: 2;
}

.chat-card.hidden {
  display: none;
}

#twitchChat {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  min-height: 0;
  position: relative;
  z-index: auto;
  display: block;
}

/* ==================== FIX CRÍTICO PARA IFRAMES ==================== */
/* IMPORTANTE: Prevenir problemas de rendering en iframes */
body,
html,
.container,
.card,
.chat-card,
.telemetry-card,
#twitchChat,
#f1Telemetry,
#playerFrame {
  transform: none !important;
  -webkit-transform: none !important;
  will-change: auto !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  perspective: none !important;
  -webkit-perspective: none !important;
}

/* ==================== LOADING & ANIMATIONS ==================== */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  animation: spin 1s linear infinite;
}

.icon-reload,
.icon-settings {
  width: 18px;
  height: 18px;
}

/* ==================== ACCESIBILIDAD ==================== */
a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* AGREGADO: Mejorar contraste para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==================== SCROLLBAR PERSONALIZADO ==================== */
.customize-panel::-webkit-scrollbar {
  width: 6px;
}

.customize-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.customize-panel::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.customize-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* ==================== UTILIDADES ==================== */
.aurora {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  filter: blur(40px);
  animation: aurora 8s ease-in-out infinite;
  pointer-events: none;
}

.aurora-1 {
  background: linear-gradient(45deg, var(--accent), transparent);
  animation-delay: 0s;
}

.aurora-2 {
  background: linear-gradient(-45deg, var(--accent-purple), transparent);
  animation-delay: 4s;
}

@keyframes aurora {
  0%, 100% { opacity: 0.1; transform: translateY(0); }
  50% { opacity: 0.15; transform: translateY(-20px); }
}

/* ==================== RESPONSIVE DESIGN - TABLET ==================== */
/* NUEVO: Breakpoint para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --sidebar-width-desktop: var(--sidebar-width-tablet);
  }
  
  .container {
    padding: var(--gap-md);
    gap: var(--gap-md);
  }
  
  /* En tablet, F1 mode se simplifica a layout normal */
  body.f1-mode .container {
    grid-template-columns: 1fr var(--sidebar-width-tablet);
  }
  
  /* Telemetría oculta por defecto en tablet */
  body.f1-mode .telemetry-card {
    display: none;
  }
  
  body.f1-mode .player-card {
    grid-column: 1;
  }
  
  body.f1-mode .chat-card {
    grid-column: 2;
  }
}

/* ==================== RESPONSIVE DESIGN - MÓVIL ==================== */
/* REFACTORIZADO: Sistema móvil completamente nuevo */
@media (max-width: 768px) {
  :root {
    --mobile-padding: 0.5rem;
    --gap-md: 0.5rem;
    --gap-sm: 0.25rem;
  }
  
  /* CRÍTICO: Layout de una sola columna en móvil */
  .container {
    grid-template-columns: 1fr !important;
    padding: var(--mobile-padding);
    gap: var(--gap-md);
    /* IMPORTANTE: Permitir scroll vertical */
    grid-auto-flow: row;
  }
  
  /* CRÍTICO: Todas las columnas en móvil son columna 1 */
  body.f1-mode .container {
    grid-template-columns: 1fr !important;
  }
  
  /* Options bar apilada verticalmente */
  .options-bar {
    padding: var(--mobile-padding);
    gap: var(--gap-md);
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
  }
  
  .options-bar label {
    font-size: 0.85rem;
    margin-right: 0;
    margin-bottom: var(--gap-sm);
  }
  
  /* Controles a ancho completo */
  select,
  .btn {
    width: 100%;
    min-height: var(--touch-target);
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  .customize-btn {
    margin-left: 0;
    width: 100%;
  }
  
  /* Toggle buttons más grandes para touch */
  .chat-toggle,
  .telemetry-toggle {
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    padding: 12px;
  }
  
  .chat-toggle svg,
  .telemetry-toggle svg {
    width: 20px;
    height: 20px;
  }
  
  /* CRÍTICO: Cards en móvil */
  .player-card,
  .chat-card,
  .telemetry-card {
    grid-column: 1 !important;
    grid-row: auto !important;
    /* Altura fija razonable para móvil */
    height: auto;
    min-height: 300px;
  }
  
  /* Player mantiene aspect ratio */
  .player-card {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  
  /* Chat y telemetría con altura fija en móvil */
  .chat-card,
  .telemetry-card {
    max-height: 400px;
  }
  
  /* IMPORTANTE: Orden visual en móvil */
  /* Player siempre primero */
  .player-card {
    order: 1;
  }
  
  /* Telemetría segundo (si visible) */
  body.f1-mode .telemetry-card {
    order: 2;
    display: flex;
  }
  
  .telemetry-card.hidden {
    display: none !important;
  }
  
  /* Chat tercero */
  .chat-card {
    order: 3;
  }
  
  /* Headers más compactos */
  .card-header {
    padding: var(--gap-sm);
    min-height: 40px;
  }
  
  .channel-head img {
    width: 32px;
    height: 32px;
  }
  
  .channel-head .name {
    font-size: 0.9rem;
  }
  
  /* Feedback táctil mejorado */
  .btn:active,
  select:active,
  .chat-toggle:active,
  .telemetry-toggle:active {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

/* ==================== MÓVIL PEQUEÑO (< 480px) ==================== */
/* NUEVO: Optimizaciones para pantallas muy pequeñas */
@media (max-width: 480px) {
  :root {
    --mobile-padding: 0.25rem;
  }
  
  .container {
    padding: var(--mobile-padding);
  }
  
  .options-bar {
    padding: 0.5rem;
  }
  
  .card-header {
    padding: 0.25rem 0.5rem;
  }
  
  .channel-head img {
    width: 28px;
    height: 28px;
  }
  
  .channel-head .name {
    font-size: 0.85rem;
  }
  
  /* Chat aún más compacto */
  .chat-card,
  .telemetry-card {
    max-height: 300px;
  }
}

/* ==================== LANDSCAPE MÓVIL ==================== */
/* NUEVO: Optimización para móviles en horizontal */
@media (max-width: 768px) and (orientation: landscape) {
  .container {
    /* En landscape, intentar layout horizontal si hay espacio */
    grid-template-columns: 1.5fr 1fr;
    gap: var(--gap-sm);
  }
  
  .player-card {
    grid-column: 1;
    order: 1;
  }
  
  .chat-card {
    grid-column: 2;
    order: 2;
  }
  
  /* Telemetría oculta en landscape móvil */
  body.f1-mode .telemetry-card {
    display: none;
  }
  
  /* Ajustar alturas para landscape */
  .chat-card {
    max-height: none;
    height: 100%;
  }
}

/* ==================== OPTIMIZACIÓN DE RENDIMIENTO ==================== */
/* MEJORADO: Respeto a preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .star {
    animation: none !important;
  }
  
  .aurora {
    animation: none !important;
  }
}

/* ==================== MEJORAS PARA TOUCH ==================== */
/* AGREGADO: Mejor soporte táctil universal */
@media (pointer: coarse) {
  /* Asegurar targets táctiles mínimos */
  .btn,
  select,
  .chat-toggle,
  .telemetry-toggle,
  .close-panel {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
  }
  
  /* Espaciado adicional para evitar clicks accidentales */
  .options-bar {
    gap: var(--gap-md);
  }
  
  /* Feedback táctil */
  .btn:active,
  select:active {
    transform: scale(0.97);
  }
}

/* ==================== HIGH DPI / RETINA ==================== */
/* MEJORADO: Optimizaciones para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .card {
    border-width: 0.5px;
  }
  
  .options-bar {
    border-bottom-width: 0.5px;
  }
  
  /* Bordes más finos en retina */
  select,
  .btn {
    border-width: 0.5px;
  }
}

/* ==================== MODO OSCURO FORZADO ==================== */
/* AGREGADO: Soporte para preferencia de modo oscuro del sistema */
@media (prefers-color-scheme: dark) {
  /* Ya estamos en modo oscuro, pero podríamos ajustar contrastes */
  :root {
    --bg-card: rgba(20, 20, 40, 0.8);
  }
}

/* ==================== PRINT STYLES ==================== */
/* AGREGADO: Estilos básicos para impresión (por si acaso) */
@media print {
  body::before,
  #starfield,
  .spiral-galaxy,
  .aurora {
    display: none;
  }
  
  .options-bar {
    position: static;
  }
  
  .container {
    display: block;
  }
}

/* ==================== FIN DEL ARCHIVO ==================== */