:root {
  --bg-dark: #090d16;
  --bg-card: #131b2e;
  --bg-card-hover: #1e293b;
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.12);
  --safe-bottom: env(safe-area-inset-bottom, 12px);
}

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

body, html {
  height: 100%;
  width: 100%;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

.remote-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-dark);
  position: relative;
}

/* TOP HEADER */
.remote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(19, 27, 46, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}

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

.brand-icon {
  font-size: 24px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

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

.heartbeat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
}

.heartbeat-badge.disconnected {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.heartbeat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: heartbeatPulse 1.2s infinite ease-in-out;
}

.heartbeat-badge.disconnected .heartbeat-dot {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  animation: none;
}

@keyframes heartbeatPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.remote-volume-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.remote-volume-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.2);
}

.btn-vol-preset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all 0.15s ease;
}

.btn-vol-preset:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #ffffff;
}

.btn-vol-preset:active {
  transform: scale(0.95);
}

.btn-vol-preset.active {
  background: #4f46e5;
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* TOOL SWITCHER TABS */
.tool-switcher {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding: 8px 12px;
  background: #0b1120;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.tool-switcher::-webkit-scrollbar {
  display: none;
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tool-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* MAIN BODY */
.remote-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 80px;
}

.control-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.control-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.tool-avatar {
  font-size: 32px;
}

.hero-text h2 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

.hero-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* BUTTON TOUCH RIPPLE & ACTIVE FEEDBACK */
.remote-btn,
.btn-hero-primary,
.btn-remote-secondary,
.btn-remote-danger,
.btn-remote-ghost,
.tool-tab,
.dpad button,
.soundboard button {
  position: relative;
  overflow: hidden;
}

.remote-btn::after,
.btn-hero-primary::after,
.btn-remote-secondary::after,
.btn-remote-danger::after,
.btn-remote-ghost::after,
.soundboard button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.35);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
  pointer-events: none;
}

.remote-btn:active::after,
.btn-hero-primary:active::after,
.btn-remote-secondary:active::after,
.btn-remote-danger:active::after,
.btn-remote-ghost:active::after,
.soundboard button:active::after {
  animation: remoteRipple 0.45s ease-out;
}

@keyframes remoteRipple {
  0% {
    transform: scale(0, 0) translate(-50%, -50%);
    opacity: 0.5;
  }
  100% {
    transform: scale(30, 30) translate(-50%, -50%);
    opacity: 0;
  }
}

/* ACTION BUTTONS */
.action-grid-large {
  margin-bottom: 12px;
}

.btn-hero-primary {
  width: 100%;
  padding: 24px 20px;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  border: none;
  border-radius: 20px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-primary:active {
  transform: scale(0.97);
}

.btn-hero-icon {
  font-size: 42px;
  margin-bottom: 6px;
}

.btn-hero-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.btn-hero-desc {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}

.action-grid-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.action-grid-quad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.btn-remote-primary {
  padding: 14px 12px;
  background: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-remote-primary:active {
  transform: scale(0.98);
}

.btn-remote-success {
  padding: 16px 12px;
  background: #059669;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-remote-success:active {
  transform: scale(0.98);
}

.btn-remote-secondary {
  padding: 14px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-remote-secondary:active {
  background: var(--bg-card-hover);
}

.btn-remote-danger {
  padding: 14px 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-remote-ghost {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-preset {
  padding: 12px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.btn-preset:active {
  background: var(--primary);
  color: #ffffff;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 14px 0 8px 0;
}

/* TIMER DISPLAY */
.timer-card-display {
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.1);
}

.timer-status-label {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
}

.timer-digits-display {
  font-size: 56px;
  font-weight: 900;
  font-family: monospace;
  color: #ffffff;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* QUICK SCORE SELECTOR HUB */
.quick-team-selector-hub {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}

.hub-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.team-tab-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.team-pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: #cbd5e1;
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.team-pill-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
}

.quick-score-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-quick-pts {
  padding: 10px 4px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-quick-pts:active {
  transform: scale(0.95);
}

.btn-quick-pts.pts-1 {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.btn-quick-pts.pts-1:active {
  background: #10b981;
  color: #fff;
}

.btn-quick-pts.pts-2 {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}
.btn-quick-pts.pts-2:active {
  background: #3b82f6;
  color: #fff;
}

.btn-quick-pts.pts-5 {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}
.btn-quick-pts.pts-5:active {
  background: #f59e0b;
  color: #fff;
}

.btn-quick-pts.pts-sub {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.btn-quick-pts.pts-sub:active {
  background: #ef4444;
  color: #fff;
}

/* MYSTERY BOX TRIGGER CARD */
.mystery-box-trigger-card {
  margin-bottom: 12px;
}

/* TEAMS SCOREBOARD GRID */
.teams-scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.team-card-remote {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.team-title-remote {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.team-score-badge {
  font-size: 18px;
  font-weight: 900;
  color: #fbbf24;
}

.team-controls-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-score-ctrl {
  flex: 1;
  padding: 8px 0;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-score-plus {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-score-plus:active {
  background: #10b981;
  color: #ffffff;
}

.btn-score-minus {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-score-minus:active {
  background: #ef4444;
  color: #ffffff;
}

/* GIFT BOXES GRID */
.boxes-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.btn-box-item {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-box-item:active {
  background: #8b5cf6;
  transform: scale(0.95);
}

.btn-box-item .box-icon {
  font-size: 24px;
}

.btn-box-item .box-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-top: 4px;
}

/* FOOTER */
.remote-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 4px;
  padding: 8px 6px;
  padding-bottom: var(--safe-bottom);
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 30;
}

.footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.footer-btn.photo-beam-btn {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.35);
}

.footer-btn.primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.footer-btn.focus-toggle.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.footer-btn:active {
  transform: scale(0.97);
}

/* TOAST */
.remote-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
}

.remote-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quick-controls { padding: 16px; }
.quick-controls h2 { font-size: 16px; margin: 12px 0; }
.quick-controls p { color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.soundboard, .dpad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.soundboard button, .dpad button { min-height: 64px; border: 1px solid #475569; border-radius: 16px; background: #1e293b; color: white; font: inherit; font-weight: 700; }
.dpad { touch-action: pan-y; }
.dpad button { min-height: 88px; }
.soundboard button:active, .dpad button:active { background: #4338ca; }
.quick-controls button:focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }

/* MODAL GHÉP ĐÔI PIN TRÊN REMOTE */
.remote-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.remote-modal-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}
.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: #94a3b8;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
}
.pin-input-group {
  margin: 14px 0;
  display: flex;
  justify-content: center;
}
.pin-input-group input {
  width: 180px;
  padding: 12px;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 10px;
  text-align: center;
  border-radius: 14px;
  border: 2px solid #38bdf8;
  background: #0f172a;
  color: #38bdf8;
  font-family: monospace;
  outline: none;
}
.pin-input-group input:focus {
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
  border-color: #0ea5e9;
}

/* HUY HIỆU XÁC NHẬN TRỰC QUAN HAI CHIỀU (VISUAL COMMAND ACKNOWLEDGMENT & PULSE BADGE) */
.cmd-ack-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
  animation: ackPulse 1.8s ease-in-out infinite;
  transition: all 0.2s ease;
}

.cmd-ack-badge .ack-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #10b981;
  color: #042f2e;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.cmd-ack-badge .ack-latency {
  background: rgba(0, 0, 0, 0.4);
  color: #a7f3d0;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 10px;
  font-family: monospace;
}

@keyframes ackPulse {
  0% { transform: scale(1); box-shadow: 0 0 4px rgba(16, 185, 129, 0.2); }
  50% { transform: scale(1.04); box-shadow: 0 0 14px rgba(16, 185, 129, 0.6); }
  100% { transform: scale(1); box-shadow: 0 0 4px rgba(16, 185, 129, 0.2); }
}

/* ĐỒNG HỒ PHẢN CHIẾU SONG SONG BỤC GIẢNG (MINI TIMER LIVE SYNC MIRROR) */
.remote-mini-mirror-card {
  margin: 12px 14px;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.remote-mini-mirror-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #34d399);
}

.mini-mirror-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mini-mirror-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: liveBlink 1.2s infinite ease-in-out;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.mirror-sync-tag {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
}

.mini-mirror-body {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.mini-mirror-digits {
  font-size: 32px;
  font-weight: 900;
  font-family: monospace;
  color: #38bdf8;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  min-width: 90px;
  text-align: center;
}

.mini-mirror-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-mirror-status {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-mirror-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.mini-mirror-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #10b981);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.mini-mirror-controls {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-mini-ctrl {
  padding: 9px 8px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-mini-ctrl:active {
  transform: scale(0.96);
}

.btn-mini-ctrl.primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-mini-ctrl.reset {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.mini-mirror-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.btn-mini-pill {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mini-pill:active {
  background: #38bdf8;
  color: #0f172a;
}

/* LIVE LESSON STAGE CARD (NHỊP TIẾT HỌC) */
.remote-sequence-card {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeInSeq 0.3s ease-out;
}

@keyframes fadeInSeq {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.seq-card-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.seq-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 1.5s infinite;
}

.seq-progress-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  color: #7dd3fc;
}

.seq-current-stage {
  background: rgba(15, 23, 42, 0.7);
  padding: 8px 10px;
  border-radius: 10px;
  border-left: 3px solid #38bdf8;
}

.seq-stage-indicator {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 2px;
}

.seq-stage-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
}

.seq-next-stage {
  background: rgba(15, 23, 42, 0.5);
  padding: 8px 10px;
  border-radius: 10px;
  border-left: 3px solid #64748b;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seq-next-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
}

.seq-next-title {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  line-height: 1.3;
}

.seq-card-actions {
  display: flex;
  margin-top: 2px;
}

.btn-seq-next {
  width: 100%;
  padding: 10px 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: 1px solid #38bdf8;
  border-radius: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-seq-next:active {
  transform: scale(0.97);
  background: #0369a1;
}
