/* ════════════════════════════════════════
   Zyneticai — index.css
   Video showcase modal, inline hero styles, VGEN panel
   ════════════════════════════════════════ */

/* ── VGEN Panel (Generator Tabs + Panels) ── */
.vgen-panel {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 28px 32px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.02) inset;
  position: relative;
  overflow: hidden;
}

.vgen-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(138,63,252,0.03) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

.vgen-tabs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
  overflow-x: auto;
  padding: 0 4px 20px;
}

@media (max-width: 640px) {
  .vgen-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 0 16px 20px;
    gap: 4px;
  }
}

.vgen-tabs::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  border-radius: 2px;
}

.vgen-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tx2);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.vgen-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  border-radius: inherit;
  z-index: -1;
}

.vgen-tab:hover {
  color: var(--tx1);
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.vgen-tab:hover::before {
  opacity: 0.08;
}

.vgen-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(138,63,252,0.35), 0 0 0 1px rgba(138,63,252,0.2) inset;
}

.vgen-tab.active::before {
  opacity: 1;
}

.vgen-tab > * {
  position: relative;
  z-index: 1;
}

.vgen-tab:hover i {
  transform: scale(1.1);
}

.vgen-tab .badge {
  font-size: 7.5px;
  padding: 2px 7px;
  border-radius: var(--r-full);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
}

.vgen-tab .badge.new {
  background: linear-gradient(135deg, var(--brand-light), rgba(138,63,252,0.08));
  color: var(--tx-brand);
  border: 1px solid var(--brand-border);
  box-shadow: 0 2px 8px rgba(138,63,252,0.15);
}

.vgen-tab.active .badge.new {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(138,63,252,0.2);
}

/* ── Panel Bodies ── */
.vgen-panel-body {
  position: relative;
  z-index: 1;
  animation: vgenFadeIn 0.3s var(--ease);
}

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

/* ── Form Rows ── */
.vgen-prompt-row,
.vgen-options-row,
.vgen-actions-row,
.vgen-upload-row,
.vgen-negative-row {
  margin-bottom: 20px;
}

.vgen-prompt-wrap,
.vgen-negative-input {
  width: 100%;
}

.vgen-prompt,
.vgen-negative-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  color: var(--tx1);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  resize: vertical;
  min-height: 96px;
  max-height: 280px;
  transition: all 0.2s var(--ease);
  outline: none;
}

.vgen-negative-input {
  min-height: 52px;
  max-height: none;
}

.vgen-prompt:focus,
.vgen-negative-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.vgen-prompt::placeholder,
.vgen-negative-input::placeholder {
  color: var(--tx3);
}

/* ── Upload Zone ── */
.vgen-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 160px;
  background: var(--bg-elevated);
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  padding: 32px 24px;
}

.vgen-upload-zone:hover,
.vgen-upload-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}

.vuz-icon {
  color: var(--tx3);
  margin-bottom: 10px;
  transition: color 0.2s, transform 0.2s;
}

.vgen-upload-zone:hover .vuz-icon {
  color: var(--brand);
  transform: scale(1.1);
}

.vuz-text {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--tx2);
  margin-bottom: 4px;
}

.vuz-text u {
  color: var(--tx-brand);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.vuz-hint {
  font-size: 12px;
  color: var(--tx3);
}

/* ── Options Row ── */
.vgen-options-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.vgen-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vgen-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx3);
  font-family: var(--font-mono);
}

.vgen-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--tx1);
  font-family: var(--font-body);
  font-size: 13.5px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  transition: all 0.2s var(--ease);
  outline: none;
}

.vgen-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.vgen-select option {
  background: var(--bg-elevated);
  color: var(--tx1);
}

/* ── Actions Row ── */
.vgen-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 8px;
  margin-bottom: 0;
}

.vgen-credits-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx3);
  font-family: var(--font-mono);
}

.vgen-credits-note svg {
  color: var(--amber);
  opacity: 0.8;
}

.vgen-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  box-shadow: 0 6px 24px rgba(138,63,252,0.35), 0 0 0 1px rgba(138,63,252,0.15) inset;
  position: relative;
  overflow: hidden;
}

.vgen-generate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-hover), var(--cyan));
  opacity: 0;
  transition: opacity 0.2s;
}

.vgen-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(138,63,252,0.45), 0 0 0 1px rgba(138,63,252,0.2) inset;
}

.vgen-generate-btn:hover::before {
  opacity: 1;
}

.vgen-generate-btn:active {
  transform: translateY(0) scale(0.98);
}

.vgen-generate-btn svg {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.vgen-generate-btn span {
  position: relative;
  z-index: 1;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .vgen-panel {
    padding: 20px 18px;
    border-radius: var(--r-xl);
    max-width: 100%;
  }

  .vgen-tabs {
    gap: 5px;
    margin-bottom: 22px;
    padding-bottom: 16px;
  }

  .vgen-tab {
    padding: 9px 14px;
    font-size: 12.5px;
  }

  .vgen-options-row {
    grid-template-columns: 1fr 1fr;
  }

  .vgen-actions-row {
    flex-direction: column;
    gap: 10px;
  }

  .vgen-generate-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .vgen-options-row {
    grid-template-columns: 1fr;
  }
}

/* ── Video Showcase Modal ── */
#vsc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#vsc-modal.vsc-modal-hidden {
  display: none !important;
}
.vsc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.80);
}
.vsc-modal-box {
  position: relative;
  z-index: 1;
  width: 320px;
  max-width: 92vw;
  max-height: 92vh;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.vsc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg2);
  flex-shrink: 0;
}
.vsc-modal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx1);
}
.vsc-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vsc-modal-edit-btn {
  font-size: 12px;
  color: var(--tx2);
  text-decoration: none;
}
.vsc-modal-edit-btn:hover {
  color: var(--tx1);
}
.vsc-modal-close {
  width: 28px;
  height: 28px;
  background: var(--surface2);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--tx1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vsc-modal-close:hover {
  background: var(--border-hi);
}
.vsc-modal-body {
  flex: 1;
  aspect-ratio: 9 / 16;
  background: var(--bg3);
  overflow: hidden;
  max-height: calc(92vh - 50px);
}
.vsc-modal-body video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Video Showcase Card (index inline) ── */
.vsc-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.35s;
}

.vsc-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: opacity 0.3s;
  z-index: 2;
  pointer-events: none;
}

.vshowcase-card:hover .vsc-play-icon {
  opacity: 0;
}

.vsc-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}

.vsc-info {
  padding: 8px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vsc-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vsc-edit-btn {
  font-size: 11px;
  color: var(--tx2);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.vsc-edit-btn:hover {
  color: var(--tx1);
}
