/* Historical Vault Studio Assistant Pro v2.1 Styling */
#hv-studio-assistant {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #f1f1f1;
  user-select: none;
}

.hv-panel {
  width: 440px;
  background: #14151f;
  border: 1px solid #d4af37;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.25);
  overflow: hidden;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hv-panel.hv-minimized .hv-body,
.hv-panel.hv-minimized .hv-tabs {
  display: none;
}

.hv-panel.hv-minimized {
  width: 290px;
}

.hv-header {
  background: linear-gradient(135deg, #1d1e2b 0%, #2c1d19 100%);
  padding: 11px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  cursor: grab;
}
.hv-header:active {
  cursor: grabbing;
}

.hv-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  color: #f5d77f;
  letter-spacing: 0.5px;
}

.hv-status-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hv-status-online {
  background: #11331c;
  color: #4ade80;
  border: 1px solid #22c55e;
}
.hv-status-offline {
  background: #332611;
  color: #fde047;
  border: 1px solid #eab308;
}

.hv-header-actions {
  display: flex;
  gap: 6px;
}

.hv-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #bbb;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}

.hv-icon-btn:hover {
  background: rgba(212, 175, 55, 0.3);
  color: #fff;
}

/* Tabs */
.hv-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: #1b1d2a;
  border-bottom: 1px solid #2d3148;
}

.hv-tab-btn {
  background: transparent;
  border: none;
  padding: 9px 5px;
  font-size: 11px;
  font-weight: 600;
  color: #8f94a8;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.hv-tab-btn.hv-tab-active {
  color: #f5d77f;
  border-bottom-color: #d4af37;
  background: rgba(212, 175, 55, 0.08);
}

.hv-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-height: 520px;
  overflow-y: auto;
}

.hv-body::-webkit-scrollbar {
  width: 5px;
}
.hv-body::-webkit-scrollbar-thumb {
  background: #333647;
  border-radius: 3px;
}

.hv-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hv-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #a0a5b8;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hv-select, .hv-input {
  background: #1e202d;
  border: 1px solid #3b3f55;
  color: #fff;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.hv-select:focus, .hv-input:focus {
  border-color: #d4af37;
}

.hv-btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #111;
  font-weight: 700;
  border: none;
  padding: 10px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  transition: all 0.2s;
}

.hv-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, #f5d77f 0%, #d4af37 100%);
}

.hv-btn-shorts {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 10px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  transition: all 0.2s;
}

.hv-btn-shorts:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.hv-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.hv-btn-secondary {
  background: #212435;
  border: 1px solid #3c4059;
  color: #eee;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
}

.hv-btn-secondary:hover {
  background: #2e334a;
  border-color: #d4af37;
  color: #f5d77f;
}

/* AI Prompt Box */
.hv-ai-box {
  background: #181a26;
  border: 1px solid #373c57;
  border-radius: 7px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hv-ai-input {
  background: #10121a;
  border: 1px solid #2a2e42;
  color: #fff;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 11px;
  outline: none;
}
.hv-ai-input:focus {
  border-color: #d4af37;
}

.hv-ai-actions {
  display: flex;
  gap: 5px;
}

.hv-btn-ai {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hv-btn-ai:hover {
  opacity: 0.9;
}

.hv-info-box {
  background: #181a25;
  border-left: 3px solid #d4af37;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: #bbb;
}

.hv-info-box strong {
  color: #f5d77f;
}

.hv-toast {
  position: fixed;
  bottom: 80px;
  right: 24px;
  background: #142419;
  border: 1px solid #22c55e;
  color: #dcfce7;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  z-index: 1000000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: hvSlideUp 0.3s ease-out;
}

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

.hv-toast.hv-error {
  background: #2e1517;
  border-color: #ef4444;
  color: #fee2e2;
}

/* Subtitles Hub Styling */
.hv-sub-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 290px;
  overflow-y: auto;
}
.hv-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #191b26;
  border: 1px solid #2b2f42;
  border-radius: 6px;
  padding: 8px 10px;
  transition: all 0.2s;
}
.hv-sub-item:hover {
  border-color: #d4af37;
  background: #1e2130;
}
.hv-sub-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}
.hv-sub-actions {
  display: flex;
  gap: 5px;
}
.hv-btn-sub-action {
  background: #242738;
  border: 1px solid #3c415c;
  color: #e2e8f0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.hv-btn-sub-action:hover {
  background: #333852;
  border-color: #d4af37;
  color: #f5d77f;
}
.hv-btn-sub-action:active {
  transform: scale(0.96);
}
.hv-badge-sub-ready {
  color: #4ade80;
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
}

