@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --bg-main: #0a0d14;
  --bg-card: #121722;
  --bg-card-hover: #171d2b;
  --bg-input: #1a2030;
  --border-color: #232c3f;
  --border-light: #2d3850;
  
  --red-air: #ff2a44;
  --red-air-glow: rgba(255, 42, 68, 0.45);
  --green-ready: #00e676;
  --green-glow: rgba(0, 230, 118, 0.35);
  --amber-cue: #ffab00;
  --amber-glow: rgba(255, 171, 0, 0.35);
  --cyan-accent: #00d2ff;
  
  --text-main: #f0f4fc;
  --text-muted: #8a99b5;
  --text-dim: #5a667f;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px rgba(0, 210, 255, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Glassmorphism Header */
.app-header {
  background: rgba(18, 23, 34, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-badge {
  background: linear-gradient(135deg, #ff2a44, #ff6b35);
  color: white;
  font-weight: 800;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(255, 42, 68, 0.4);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--cyan-accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-dim);
}

.status-dot.connected {
  background-color: var(--green-ready);
  box-shadow: 0 0 10px var(--green-ready);
}

.status-dot.connecting {
  background-color: var(--amber-cue);
  box-shadow: 0 0 10px var(--amber-cue);
}

.status-dot.error {
  background-color: var(--red-air);
  box-shadow: 0 0 10px var(--red-air);
}

/* Master Control Bar */
.control-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.device-selectors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.selector-group select {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 180px;
}

.selector-group select:hover, .selector-group select:focus {
  border-color: var(--cyan-accent);
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--cyan-accent);
  color: #06101e;
}

.btn-primary:hover {
  background: #2fe0ff;
  box-shadow: 0 2px 14px rgba(0, 210, 255, 0.4);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  border-color: var(--border-light);
}

/* Studio Channel Grid */
.studio-container {
  flex: 1;
  padding: 24px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.channel-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.channel-strip:hover {
  border-color: var(--border-light);
}

.channel-strip.on-air {
  border-color: var(--red-air);
  box-shadow: 0 0 20px rgba(255, 42, 68, 0.25);
}

.channel-strip.on-air::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red-air);
  box-shadow: 0 0 10px var(--red-air);
}

.channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-identity {
  display: flex;
  flex-direction: column;
}

.channel-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.channel-network-info {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.channel-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.channel-badge.mobile {
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan-accent);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

/* Audio Meter & Fader Section */
.channel-audio-body {
  display: flex;
  gap: 16px;
  align-items: stretch;
  background: var(--bg-main);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.meter-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 40px;
}

.vu-meter-container {
  width: 14px;
  height: 160px;
  background: #06090e;
  border-radius: 4px;
  border: 1px solid #1c2331;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
}

.vu-meter-bar {
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, 
    #00e676 0%, 
    #00e676 65%, 
    #ffab00 65%, 
    #ffab00 85%, 
    #ff2a44 85%, 
    #ff2a44 100%
  );
  transition: height 0.05s ease-out;
}

.vu-meter-peak {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #ffffff;
  box-shadow: 0 0 4px #ffffff;
  bottom: 0%;
  transition: bottom 0.2s ease-out;
}

.db-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 160px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}

.fader-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.fader-slider {
  writing-mode: bt-lr; /* IE */
  -webkit-appearance: slider-vertical; /* WebKit */
  width: 28px;
  height: 150px;
  cursor: pointer;
  accent-color: var(--cyan-accent);
}

.fader-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan-accent);
  font-weight: 600;
}

/* Channel Buttons */
.channel-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

.btn-on-air {
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-on-air.active {
  background: var(--red-air);
  color: white;
  border-color: var(--red-air);
  box-shadow: 0 0 20px var(--red-air-glow);
  animation: pulse-air 2s infinite ease-in-out;
}

@keyframes pulse-air {
  0% { box-shadow: 0 0 15px var(--red-air-glow); }
  50% { box-shadow: 0 0 30px rgba(255, 42, 68, 0.7); }
  100% { box-shadow: 0 0 15px var(--red-air-glow); }
}

.btn-cue {
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cue.active {
  background: var(--amber-cue);
  color: #101622;
  border-color: var(--amber-cue);
  box-shadow: 0 0 15px var(--amber-glow);
}

/* ========================================================
   REPORTERO MOBILE VIEW SPECIFIC STYLES
   ======================================================== */
.reporter-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.reporter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}

.dsp-toggle-group {
  display: flex;
  background: var(--bg-main);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  width: 100%;
}

.dsp-pill {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dsp-pill.active {
  background: var(--cyan-accent);
  color: #06101e;
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.35);
}

.big-air-button-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.big-air-btn {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 6px solid var(--border-color);
  background: radial-gradient(circle, #1a202c 0%, #0e121a 100%);
  color: var(--text-muted);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.big-air-btn:active {
  transform: scale(0.96);
}

.big-air-btn.on-air {
  border-color: #ff5266;
  background: radial-gradient(circle, #ff2a44 0%, #b80c22 100%);
  color: #ffffff;
  box-shadow: 0 0 50px var(--red-air-glow);
  animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulse-ring {
  0% { transform: scale(1); box-shadow: 0 0 30px var(--red-air-glow); }
  50% { transform: scale(1.03); box-shadow: 0 0 60px rgba(255, 42, 68, 0.7); }
  100% { transform: scale(1); box-shadow: 0 0 30px var(--red-air-glow); }
}

.air-icon {
  font-size: 38px;
}

/* Horizontal Meter for Mobile */
.mobile-meter-bar-container {
  width: 100%;
  height: 12px;
  background: #0a0d14;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.mobile-meter-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #00e676 0%, #00e676 70%, #ffab00 70%, #ffab00 88%, #ff2a44 88%, #ff2a44 100%);
  transition: width 0.05s ease-out;
}

/* Modal Styling */
.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: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.copy-input-group {
  display: flex;
  gap: 8px;
}

.copy-input-group input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

/* ========================================================
   PWA & MOBILE PRO AUDIO CONTROLS
   ======================================================== */
.pwa-banner {
  background: linear-gradient(135deg, #182234 0%, #101622 100%);
  border: 1px solid var(--cyan-accent);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.15);
  margin-bottom: 12px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pwa-banner-text {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-install-btn {
  background: var(--cyan-accent);
  color: #06101e;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.pwa-install-btn:active {
  transform: scale(0.95);
}

.device-selector-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.device-selector-wrapper label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-select {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.custom-select:focus {
  border-color: var(--cyan-accent);
}

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-main);
  border: 1px solid var(--border-color);
}

.stat-badge.active {
  border-color: var(--green-ready);
  color: var(--green-ready);
}
