/* ── Empty State ── */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
  user-select: none;
  padding-bottom: 100px;
}

.empty-state svg {
  width: 200px;
  height: 200px;
  color: rgba(59, 130, 246, 0.18);
  flex-shrink: 0;
}

.empty-state-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  text-align: center;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(96, 165, 250, 0.6);
  letter-spacing: 0.01em;
}

.empty-state-sub {
  font-size: 12px;
  font-weight: 400;
  color: rgba(59, 130, 246, 0.35);
  line-height: 1.6;
}

.empty-state.hidden { display: none; }

/* ── Videos Page ── */
.videos-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ── Output Feed ── */
.vid-feed {
  flex: 1;
  overflow-y: auto;
  padding: 28px 40px 160px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Generation Group: 2 cards per row ── */
.vid-generation-group {
  width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── Video Card ── */
.vid-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  animation: vidFadeIn 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes vidFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.vid-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
  border-color: var(--accent-dark);
}

/* ── Card Thumbnail ── */
.vid-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0a0a0a 0%, #0d0d0d 100%);
  position: relative;
  overflow: hidden;
}

.vid-thumb-wrap video,
.vid-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play overlay */
.vid-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity var(--transition);
  color: rgba(96, 165, 250, 0.85);
}

.vid-card:hover .vid-play-overlay {
  opacity: 1;
}

/* Loading placeholder */
.vid-card.loading .vid-thumb-wrap {
  position: relative;
}

/* Generating glow animation */
@property --vx  { syntax: "<percentage>"; initial-value: 20%; inherits: false; }
@property --vy  { syntax: "<percentage>"; initial-value: 30%; inherits: false; }
@property --vx2 { syntax: "<percentage>"; initial-value: 80%; inherits: false; }
@property --vy2 { syntax: "<percentage>"; initial-value: 70%; inherits: false; }
@property --vx3 { syntax: "<percentage>"; initial-value: 50%; inherits: false; }
@property --vy3 { syntax: "<percentage>"; initial-value: 90%; inherits: false; }

@keyframes vidGlowAnim {
  0%, 100% { --vx: 20%; --vy: 30%; --vx2: 80%; --vy2: 70%; --vx3: 50%; --vy3: 90%; }
  33%       { --vx: 70%; --vy: 20%; --vx2: 30%; --vy2: 80%; --vx3: 90%; --vy3: 40%; }
  66%       { --vx: 40%; --vy: 80%; --vx2: 60%; --vy2: 20%; --vx3: 10%; --vy3: 60%; }
}

.vid-card.loading .vid-thumb-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  animation: vidGlowAnim 8s linear infinite;
  background-image:
    radial-gradient(circle at var(--vx, 20%) var(--vy, 30%), rgba(59,130,246,0.25) 5%, transparent 35%),
    radial-gradient(circle at var(--vx2, 80%) var(--vy2, 70%), rgba(59,130,246,0.15) 5%, transparent 35%),
    radial-gradient(circle at var(--vx3, 50%) var(--vy3, 90%), rgba(59,130,246,0.2) 5%, transparent 35%);
}

/* ── Card Footer ── */
.vid-card-actions {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.vid-card-info {
  flex: 1;
  min-width: 0;
}

.vid-card-prompt {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vid-card-tags {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.vid-card-badge {
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
}

.vid-download-btn {
  background: rgba(59, 130, 246, 0.06);
  border: none;
  color: var(--accent);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.vid-download-btn:hover {
  background: rgba(59, 130, 246, 0.12);
}

.vid-download-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Prompt Section (same classes as images, shared) ── */
.prompt-section-container {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 80px);
  max-width: 800px;
  z-index: 20;
}

.flow-prompt-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.5rem;
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 0;
  box-shadow: rgba(0, 0, 0, 0.5) 0px 16px 32px -8px;
}

.flow-input-section {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 2.5rem;
}

.flow-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.flow-prompt-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: 'AppFont', sans-serif;
  font-size: 14px;
  outline: none;
  min-width: 0;
}

.flow-prompt-input::placeholder {
  color: var(--text-muted);
}

.flow-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.flow-create-btn:hover {
  background: rgba(59, 130, 246, 0.1);
}

.flow-create-btn svg {
  width: 18px;
  height: 18px;
}

.simple-settings-wrap {
  position: relative;
  flex-shrink: 0;
}

.settings-gear-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 18px;
  color: var(--accent);
  cursor: pointer;
  border-radius: 50%;
  user-select: none;
  transition: background 0.2s ease;
}

.settings-gear-icon:hover {
  background: rgba(59, 130, 246, 0.1);
}

.settings-dropdown {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(16px);
  border: none;
  border-radius: var(--radius);
  padding: 6px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.settings-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.settings-dropdown-header {
  display: none;
}

.settings-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  margin: 2px 0;
  color: var(--text);
  font-family: 'AppFont', sans-serif;
  font-size: 13px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
  text-align: left;
}

.settings-dropdown-item:hover {
  background: rgba(59, 130, 246, 0.06);
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-item-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.settings-item-value {
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}
