/* ==================== VARIABLES CSS OPTIMIZADAS ==================== */
:root {
  /* Colores base - optimizados para contraste */
  --bg-dark: #0b0d1b;
  --bg-card: rgba(20, 20, 40, 0.85);
  --text-primary: #ffffff;
  --text-secondary: #72d6ff;
  --accent: #72d6ff;
  --accent-purple: #ff7fff;
  --border-color: rgba(255, 255, 255, 0.15);
  
  /* Espaciados sistemáticos */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  
  /* Border radius consistente */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Sombras optimizadas */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  
  /* Transiciones optimizadas */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  
  /* Breakpoints para JS */
  --mobile: 768px;
  --tablet: 1024px;
}

/* ==================== RESET OPTIMIZADO ==================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -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;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==================== FONDO OPTIMIZADO ==================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at top, #1a1f3b 0%, #0b0d1b 50%, #000014 100%),
    linear-gradient(135deg, rgba(114, 214, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -2;
}

/* ==================== STARFIELD OPTIMIZADO ==================== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.spiral-galaxy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(60vw, 600px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    rgba(114, 214, 255, 0.02) 0%,
    rgba(255, 127, 255, 0.02) 30%,
    transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

.star {
  position: absolute;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.8;
  z-index: -1;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.star.layer-1 { color: rgba(255, 255, 255, 0.9); }
.star.layer-2 { color: rgba(255, 255, 255, 0.7); }
.star.layer-3 { color: rgba(255, 255, 255, 0.5); }

/* ==================== OPTIONS BAR OPTIMIZADA ==================== */
.options-bar {
  padding: var(--space-sm) clamp(1%, 1.5vw, 2%);
  background: 
    radial-gradient(circle at 30% 50%, rgba(114, 214, 255, 0.15), transparent 30%),
    radial-gradient(circle at 70% 50%, rgba(255, 127, 255, 0.15), transparent 30%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-sm);
  z-index: 10;
  position: relative;
  min-height: 56px;
  isolation: isolate;
}

.options-bar label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-right: -4px;
  flex-shrink: 0;
}

/* ==================== BOTONES OPTIMIZADOS ==================== */
.btn,
.layout-dropdown-btn,
.dropdown-btn,
.filter-btn {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: 
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
  font-size: 0.9rem;
  min-height: 40px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.btn:hover,
.layout-dropdown-btn:hover,
.dropdown-btn:hover,
.filter-btn:hover {
  background: rgba(30, 30, 60, 0.95);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn:active,
.layout-dropdown-btn:active,
.dropdown-btn:active,
.filter-btn:active {
  transform: translateY(0);
  transition-duration: 0.05s;
}

/* ==================== LAYOUT SELECTOR OPTIMIZADO ==================== */
.layout-dropdown-btn {
  position: relative;
  min-width: 160px;
  justify-content: space-between;
}

.layout-dropdown-btn::after {
  content: '▼';
  font-size: 0.8rem;
  transition: transform var(--transition-normal);
}

.layout-dropdown-btn.active::after {
  transform: rotate(180deg);
}

.layout-dropdown-content {
  position: absolute;
  top: calc(100% + var(--space-sm));
  left: 0;
  background: rgba(20, 20, 40, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  z-index: 1001;
  display: none;
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  transform: translateZ(0);
}

.layout-dropdown-content.show {
  display: block;
  animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.layout-option {
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: 
    background-color var(--transition-fast),
    padding-left var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.layout-option:hover {
  background: rgba(114, 214, 255, 0.12);
  padding-left: 20px;
}

.layout-option:last-child {
  border-bottom: none;
}

/* ==================== FILTER BUTTONS OPTIMIZADOS ==================== */
.filter-btn {
  background: transparent;
  border: 1px solid rgba(114, 214, 255, 0.4);
  color: rgba(255, 255, 255, 0.8);
}

.filter-btn.active {
  background: linear-gradient(135deg, 
    rgba(114, 214, 255, 0.25), 
    rgba(255, 127, 255, 0.25));
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 20px rgba(114, 214, 255, 0.4);
}

/* ==================== FULLSCREEN BUTTON OPTIMIZADO ==================== */
.fullscreen-btn {
  border: none;
  color: white;
  margin-left: auto;
  position: relative;
  overflow: hidden;
}

.fullscreen-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent);
  transition: left var(--transition-slow);
}

.fullscreen-btn:hover::before {
  left: 100%;
}

.fullscreen-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(114, 214, 255, 0.6);
}

.icon-fullscreen {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==================== STREAM SELECTORS OPTIMIZADOS ==================== */
.stream-selectors {
  padding: var(--space-sm) clamp(1%, 1.5vw, 2%);
  background: rgba(15, 15, 30, 0.7);
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-sm);
  z-index: 9;
  position: relative;
}

.stream-dropdown {
  position: relative;
}

.dropdown-btn {
  width: 100%;
  justify-content: space-between;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-btn::after {
  content: '▼';
  font-size: 0.8rem;
  transition: transform var(--transition-normal);
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.dropdown-btn.active::after {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: calc(100% + var(--space-sm));
  left: 0;
  right: 0;
  background: rgba(20, 20, 40, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: min(400px, 70vh);
  overflow-y: auto;
  z-index: 1001;
  display: none;
  box-shadow: var(--shadow-lg);
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
}

.dropdown-content.show {
  display: block;
  animation: dropdownSlide 0.2s ease;
}

.dropdown-content::-webkit-scrollbar {
  width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
  background: rgba(20, 20, 40, 0.6);
  border-radius: var(--radius-sm);
}

.dropdown-content::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: var(--radius-sm);
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* ==================== STREAM OPTIONS OPTIMIZADOS ==================== */
.stream-option {
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: 
    background-color var(--transition-fast),
    padding-left var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 44px;
  touch-action: manipulation;
}

.stream-option:hover {
  background: rgba(114, 214, 255, 0.12);
  padding-left: 20px;
}

.stream-option:last-child {
  border-bottom: none;
}

.stream-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stream-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.stream-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.9;
}

/* ==================== CONTAINER & GRID OPTIMIZADOS ==================== */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: var(--space-sm);
  position: relative;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateZ(0);
  -webkit-overflow-scrolling: touch;
}

.streams-grid {
  display: grid;
  gap: var(--space-sm);
  width: 100%;
  position: relative;
  z-index: 5;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* ==================== GRID LAYOUTS OPTIMIZADOS ==================== */
.layout-1 { 
  grid-template-columns: 1fr;
  grid-template-rows: minmax(600px, 1fr);
}

.layout-2 { 
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: minmax(500px, 1fr);
}

.layout-3 { 
  grid-template-columns: repeat(2, 1fr); 
  grid-template-rows: minmax(400px, 1fr) minmax(400px, 1fr);
}

.layout-3 .stream-item:nth-child(1) { 
  grid-column: 1 / -1; 
}

.layout-4 { 
  grid-template-columns: repeat(2, 1fr); 
  grid-template-rows: minmax(450px, 1fr) minmax(450px, 1fr);
}

/* ==================== STREAM ITEMS OPTIMIZADOS ==================== */
.stream-item {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  transition: 
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 450px;
  height: 100%;
  transform: translateZ(0);
  will-change: transform;
}

.stream-item.active {
  border-color: var(--accent);
}



/* ==================== STREAM HEADER OPTIMIZADO ==================== */
.stream-header {
  background: rgba(40, 40, 70, 0.95);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  min-height: 48px;
}

.stream-title-bar {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-title-bar strong {
  color: var(--accent);
  font-weight: 700;
}

/* ==================== STREAM CONTENT OPTIMIZADO ==================== */
.stream-content {
  flex: 1;
  display: flex;
  position: relative;
  background: #000;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.stream-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-secondary);
  flex-direction: column;
  gap: 1rem;
  font-size: 1.1rem;
  padding: var(--space-xl);
}

.placeholder-icon {
  font-size: 3rem;
  animation: gentlePulse 3s ease-in-out infinite;
}

.placeholder-text {
  text-align: center;
  opacity: 0.9;
}

@keyframes gentlePulse {
  0%, 100% { 
    opacity: 0.7;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.05);
  }
}

/* ==================== STREAM IFRAME OPTIMIZADO ==================== */
.stream-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  display: block;
  overflow: hidden !important;
  scrolling: no !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  transform: translateZ(0);
  isolation: isolate;
}

.stream-iframe::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.stream-iframe:not([src]) {
  opacity: 0;
}

.stream-iframe[src]:not([src=""]) {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ==================== FULLSCREEN OPTIMIZADO ==================== */
.exit-fullscreen-btn {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-xl);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid var(--accent);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 700;
  z-index: 10000;
  display: none;
  align-items: center;
  gap: var(--space-sm);
  transition: all var(--transition-normal);
  min-height: 48px;
  font-size: 1.1rem;
  transform: translateZ(0);
}

.exit-fullscreen-btn:hover {
  background: rgba(20, 20, 40, 0.98);
  border-color: var(--accent-purple);
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255, 127, 255, 0.6);
}

/* Fullscreen mode optimizado */
body.fullscreen-mode {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

body.fullscreen-mode .site-header,
body.fullscreen-mode .options-bar,
body.fullscreen-mode .stream-selectors,
body.fullscreen-mode .site-footer {
  display: none !important;
}

body.fullscreen-mode .container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  margin: 0;
  padding: var(--space-sm);
  height: 100vh;
  overflow: hidden !important;
}

body.fullscreen-mode .streams-grid {
  height: 100%;
  width: 100%;
  gap: var(--space-sm);
}

/* En fullscreen, adaptar proporcionalmente sin tamaños mínimos */
body.fullscreen-mode .layout-1 {
  grid-template-rows: 1fr;
}

body.fullscreen-mode .layout-2 {
  grid-template-rows: 1fr;
}

body.fullscreen-mode .layout-3 {
  grid-template-rows: 1fr 1fr;
}

body.fullscreen-mode .layout-4 {
  grid-template-rows: 1fr 1fr;
}

body.fullscreen-mode .stream-item {
  min-height: 0;
  height: 100%;
}

body.fullscreen-mode .exit-fullscreen-btn {
  display: flex;
}

body.fullscreen-mode .stream-iframe {
  height: 100%;
}

/* ==================== CARD HEADER OPTIMIZADO ==================== */
.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ==================== LOADING & ANIMATIONS OPTIMIZADOS ==================== */
.loading {
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@keyframes smoothSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  animation: smoothSpin 1.2s linear infinite;
  transform-origin: center;
}

/* ==================== AURORA EFFECTS OPTIMIZADOS ==================== */
.aurora {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: screen;
}

.aurora-1 {
  background: linear-gradient(135deg, 
    rgba(114, 214, 255, 0.1) 0%, 
    transparent 50%, 
    rgba(255, 127, 255, 0.1) 100%);
  animation: aurora-shift 15s ease-in-out infinite;
}

.aurora-2 {
  background: linear-gradient(-45deg, 
    rgba(255, 127, 255, 0.1) 0%, 
    transparent 50%, 
    rgba(114, 214, 255, 0.1) 100%);
  animation: aurora-shift 20s ease-in-out infinite reverse;
}

@keyframes aurora-shift {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) scale(1.05);
    opacity: 0.5;
  }
}

/* ==================== MEDIA QUERIES OPTIMIZADAS ==================== */

/* Tablets (1024px - 769px) */
@media (max-width: 1024px) {
  .options-bar,
  .stream-selectors {
    padding: var(--space-sm) 2%;
  }
  
  .layout-2 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: minmax(400px, 1fr);
  }
  
  .layout-3 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: minmax(350px, 1fr) minmax(350px, 1fr);
  }

  .layout-3 .stream-item:nth-child(1) { 
    grid-column: 1 / -1; 
  }
  
  .layout-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: minmax(350px, 1fr) minmax(350px, 1fr);
  }
  
  .stream-item {
    min-height: 350px;
  }
}

/* Tablets pequeños (768px - 601px) */
@media (max-width: 768px) {
  .container {
    padding: var(--space-sm);
  }
  
  .layout-2,
  .layout-3,
  .layout-4 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, minmax(400px, auto));
  }
  
  .layout-3 .stream-item:nth-child(1) { 
    grid-column: 1;
  }
  
  .options-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }
  
  .card-header {
    width: 100%;
    justify-content: space-between;
  }
  
  .fullscreen-btn {
    margin-left: 0;
    width: 100%;
  }
  
  .stream-selectors {
    grid-template-columns: 1fr;
  }
  
  .stream-item {
    min-height: 400px;
  }
  
  body.fullscreen-mode .container {
    padding: var(--space-xs);
  }
}

/* Móviles grandes (600px - 481px) */
@media (max-width: 600px) {
  .options-bar,
  .stream-selectors {
    padding: var(--space-xs) 3%;
    gap: var(--space-xs);
  }
  
  .layout-1 {
    grid-template-rows: minmax(350px, 1fr);
  }
  
  .layout-2,
  .layout-3,
  .layout-4 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, minmax(350px, auto));
  }
  
  .btn,
  .layout-dropdown-btn,
  .dropdown-btn,
  .filter-btn {
    font-size: 0.85rem;
    padding: 7px 12px;
    min-height: 38px;
  }
  
  .stream-header {
    padding: var(--space-sm) var(--space-md);
    min-height: 44px;
  }
  
  .stream-title-bar {
    font-size: 0.85rem;
  }
  
  .stream-item {
    min-height: 350px;
  }
  
  .exit-fullscreen-btn {
    top: var(--space-md);
    right: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
    min-height: 44px;
  }
}

/* Móviles medianos (480px - 376px) */
@media (max-width: 480px) {
  .container {
    padding: var(--space-xs);
  }
  
  .streams-grid {
    gap: var(--space-xs);
  }
  
  .layout-1,
  .layout-2,
  .layout-3,
  .layout-4 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, minmax(300px, auto));
  }
  
  .stream-item {
    min-height: 300px;
  }
  
  .dropdown-content {
    max-height: min(350px, 60vh);
  }
}

/* Móviles pequeños (375px y menos) */
@media (max-width: 375px) {
  .options-bar,
  .stream-selectors {
    padding: var(--space-xs) 2%;
    gap: var(--space-xs);
  }
  
  .btn,
  .layout-dropdown-btn,
  .dropdown-btn,
  .filter-btn {
    font-size: 0.8rem;
    padding: 6px 10px;
    min-height: 36px;
  }
  
  .stream-header {
    padding: 6px 10px;
    min-height: 40px;
  }
  
  .stream-title-bar {
    font-size: 0.8rem;
  }
  
  .layout-1,
  .layout-2,
  .layout-3,
  .layout-4 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, minmax(280px, auto));
  }
  
  .stream-item {
    min-height: 280px;
  }
  
  .spiral-galaxy,
  .aurora {
    display: none;
  }
}

/* Landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  body.fullscreen-mode .streams-grid {
    padding: 2px;
    gap: 2px;
  }
  
  body.fullscreen-mode .stream-header {
    padding: 4px 8px;
    min-height: 32px;
  }
  
  .stream-placeholder {
    min-height: 150px;
  }
}

/* ==================== MEJORAS DE ACCESIBILIDAD ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== MEJORAS PARA TÁCTIL ==================== */
@media (pointer: coarse) {
  .btn,
  .layout-dropdown-btn,
  .dropdown-btn,
  .filter-btn,
.layout-option,
.stream-option {
min-height: 44px;
min-width: 44px;
}
.stream-option:active {
background: rgba(114, 214, 255, 0.2);
transition-duration: 0.1s;
}
}
/* ==================== SOPORTE PARA NOTCH ==================== */
@supports (padding-top: env(safe-area-inset-top)) {
body.fullscreen-mode .container {
padding-top: calc(env(safe-area-inset-top) + var(--space-sm));
padding-bottom: calc(env(safe-area-inset-bottom) + var(--space-sm));
padding-left: calc(env(safe-area-inset-left) + var(--space-sm));
padding-right: calc(env(safe-area-inset-right) + var(--space-sm));
}
.exit-fullscreen-btn {
top: calc(env(safe-area-inset-top) + var(--space-md));
right: calc(env(safe-area-inset-right) + var(--space-md));
}
}
/* ==================== MODOS DE ALTO CONTRASTE ==================== */
@media (prefers-contrast: high) {
:root {
--border-color: rgba(255, 255, 255, 0.8);
--bg-card: rgba(20, 20, 40, 0.95);
}
.stream-item.active {
border-width: 3px;
}
}
/* ==================== MODO OSCURO FORZADO ==================== */
@media (prefers-color-scheme: dark) {
body {
background: #000014;
}
}
/* ==================== IMPRESIÓN ==================== */
@media print {
.options-bar,
.stream-selectors,
.fullscreen-btn,
.exit-fullscreen-btn {
display: none !important;
}
.stream-item {
break-inside: avoid;
border: 1px solid #000;
}
}