/* ══════════════════════════════════════════════
   VIDEOGEN — Wikimind Génération Vidéo CSS
   ══════════════════════════════════════════════ */

#vg-overlay {
  position: fixed;
  inset: 0;
  z-index: 810;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
#vg-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#vg-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 811;
  width: 520px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
#vg-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* Header */
#vg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
#vg-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
#vg-header-left svg { color: rgba(255,255,255,0.5); }
#vg-model-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.45);
  border-radius: 5px;
  padding: 2px 7px;
}
#vg-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
#vg-tokens-display {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 4px 9px;
}
#vg-tokens-count { color: rgba(255,255,255,0.7); font-weight: 600; }
#vg-close {
  width: 28px; height: 28px;
  border-radius: 7px; border: none;
  background: transparent;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
#vg-close:hover { background: rgba(255,255,255,0.07); color: #fff; }

/* Body */
#vg-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#vg-body::-webkit-scrollbar { width: 3px; }
#vg-body::-webkit-scrollbar-thumb { background: #1a1a1a; border-radius: 2px; }

/* Prompt */
#vg-prompt-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
#vg-prompt {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: border-color 0.15s;
}
#vg-prompt:focus { border-color: rgba(255,255,255,0.18); }
#vg-prompt::placeholder { color: rgba(255,255,255,0.2); }
#vg-prompt-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}
#vg-char-count { font-size: 0.68rem; color: rgba(255,255,255,0.2); }

/* Options */
#vg-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.vg-option-group label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.vg-select-wrap {
  position: relative;
}
.vg-select-wrap::after {
  content: '';
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-top: 5px solid rgba(255,255,255,0.3);
  margin-top: 2px;
  pointer-events: none;
}
.vg-option-group select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 28px 8px 11px;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  appearance: none;
  cursor: pointer;
}

/* Cost info */
#vg-cost-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 9px 13px;
}
#vg-cost-info strong { color: rgba(255,255,255,0.6); }

/* Generate button */
#vg-generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 0;
  border-radius: 10px;
  border: none;
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
#vg-generate-btn:disabled {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.2);
  cursor: not-allowed;
}
#vg-generate-btn:not(:disabled):hover { background: rgba(255,255,255,0.88); }

/* Progress */
#vg-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0;
}
#vg-progress-anim {
  display: flex;
  gap: 6px;
}
.vg-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: vg-pulse 1.2s ease-in-out infinite;
}
.vg-dot:nth-child(2) { animation-delay: 0.2s; }
.vg-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes vg-pulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}
#vg-progress-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
#vg-progress-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
}

/* Result */
#vg-result video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  max-height: 260px;
  object-fit: contain;
}
#vg-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.vg-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.09);
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.vg-action-btn:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.15);
}

/* Upgrade wall */
#vg-upgrade-wall, #vg-no-tokens {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 16px;
  text-align: center;
}
#vg-upgrade-wall svg, #vg-no-tokens svg { color: rgba(255,255,255,0.2); }
#vg-upgrade-wall p, #vg-no-tokens p {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}
#vg-upgrade-wall p strong { color: rgba(255,255,255,0.8); }
#vg-no-tokens p span { color: rgba(255,255,255,0.25); font-size: 0.78rem; }
#vg-upgrade-cta {
  padding: 10px 22px;
  border-radius: 9px;
  border: none;
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
#vg-upgrade-cta:hover { background: rgba(255,255,255,0.88); }

/* Chat inject */
.videogen-chat-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 480px;
}
.videogen-chat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}
.videogen-dl-link {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-top: 6px;
  cursor: pointer;
}

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