/* ─── Grabador Pro ─── */
:root {
  --bg-menu: rgba(15, 15, 25, 0.85);
  --bg-accent: #ff4d4d;
  --bg-accent-hover: #ff3333;
  --bg-pause: #ffcc00;
  --text-main: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.6);
  --border-glass: rgba(255, 255, 255, 0.1);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --font: 'Outfit', sans-serif;
  --radius: 16px;
}

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

body {
  font-family: var(--font);
  background: transparent;
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Mini Menú ─── */
.mini-menu {
  background: var(--bg-menu);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 280px;
  padding: 12px;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 4px;
}

.drag-handle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88; /* Ready */
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.status-dot.recording {
  background: var(--bg-accent);
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.4);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

.app-name {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}

.menu-body {
  display: flex;
  flex-direction: column;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 4px 0;
}

/* ─── Botones ─── */
.btn-control {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-control:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

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

#btn-start {
  background: var(--bg-accent);
  color: white;
}
#btn-start:hover { background: var(--bg-accent-hover); }

#btn-pause { background: var(--bg-pause); color: black; }
#btn-stop { background: white; color: black; }

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

#btn-install {
  color: #00ff88;
  animation: installPulse 2s ease-in-out infinite;
}

#btn-install:hover {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.15);
}

@keyframes installPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(0, 255, 136, 0); }
  50% { box-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
}

.divider {
  width: 1px;
  height: 24px;
  background: var(--border-glass);
}

.icon {
  width: 20px;
  height: 20px;
}

/* ─── Panel de Configuración ─── */
.settings-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideDown 0.3s ease;
}

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

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.btn-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ─── Selector de Formato ─── */
.format-selector {
  display: flex;
  gap: 8px;
}

.format-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.format-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.format-option.active {
  background: rgba(255, 77, 77, 0.15);
  border-color: var(--bg-accent);
  color: var(--text-main);
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.2);
}

.format-option.unsupported {
  opacity: 0.4;
  cursor: not-allowed;
}

.format-option.unsupported .format-name {
  text-decoration: line-through;
}

.format-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.format-desc {
  font-size: 0.6rem;
  font-weight: 400;
  opacity: 0.7;
}

.format-warning {
  font-size: 0.7rem;
  color: #ffcc00;
  padding: 4px 8px;
  background: rgba(255, 204, 0, 0.1);
  border-radius: 6px;
  text-align: center;
  animation: fadeInUp 0.3s ease;
}

.preview-mini {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

#preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-signal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  background: #0a0a14;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.path-display {
  font-size: 0.75rem;
  padding: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dim);
}

.key-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

kbd {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

/* ─── Utilidades ─── */
.hidden { display: none !important; }

.notification {
  position: fixed;
  bottom: 20px;
  background: var(--bg-menu);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.8rem;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow);
  z-index: 1000;
  animation: fadeInUp 0.4s ease;
}

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