/* ==========================================================================
   job-card.css - Generating card, badges, progress, shimmer (Gemini Style)
   Dooze Clip Generator
   ========================================================================== */

.panel.is-generating {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1.5px rgba(168, 199, 250, 0.35), 0 0 32px 2px rgba(155, 114, 203, 0.25) !important;
  animation: geminiComposerPulse 3s ease-in-out infinite;
}

@keyframes geminiComposerPulse {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(168, 199, 250, 0.2), 0 0 20px -4px rgba(66, 133, 244, 0.2);
  }
  50% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1.5px rgba(155, 114, 203, 0.4), 0 0 32px 4px rgba(155, 114, 203, 0.3);
  }
}

/* ==========================================================================
   Google Gemini Neural Loading Canvas (Extracted directly from port 9223)
   Organic morphing blobs with rotating multi-color aurora spectrum
   ========================================================================== */
.nl-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  --bg-center-x: 50%;
  --bg-center-y: 50%;
  --bg-radius-x: 220px;
  --bg-radius-y: 160px;
  --bg-blur: 54px;
  --bg-opacity: 0.35;

  --fg-center-x: 50%;
  --fg-center-y: 50%;
  --fg-radius-x: 180px;
  --fg-radius-y: 130px;
  --fg-blur: 40px;
  --fg-opacity: 0.65;

  --morph: 18%;
  --morph-speed: 7.3s;
  --fg-rotate-min: 45deg;
  --fg-rotate-max: 120deg;
  --fg-rotate-speed: 11.7s;
  --shape-scale-min: 0.88;
  --shape-scale-max: 1.08;
  --uv-rotation: -36deg;
}

.nl-bg-layer,
.nl-fg-layer {
  position: absolute;
  inset: 0;
}

.nl-bg-layer {
  opacity: var(--bg-opacity);
}

.nl-fg-layer {
  opacity: var(--fg-opacity);
  mix-blend-mode: screen;
}

.nl-blob {
  position: absolute;
  overflow: hidden;
  will-change: border-radius, transform;
}

.nl-bg-blob {
  left: calc(var(--bg-center-x) - var(--bg-radius-x));
  top: calc(var(--bg-center-y) - var(--bg-radius-y));
  width: calc(var(--bg-radius-x) * 2);
  height: calc(var(--bg-radius-y) * 2);
  filter: blur(var(--bg-blur));
  animation: nlMorphBG var(--morph-speed) ease-in-out infinite,
             nlScaleBG calc(var(--morph-speed) * 1.3) ease-in-out infinite,
             nlSweepBG 6s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

.nl-fg-blob {
  left: calc(var(--fg-center-x) - var(--fg-radius-x));
  top: calc(var(--fg-center-y) - var(--fg-radius-y));
  width: calc(var(--fg-radius-x) * 2);
  height: calc(var(--fg-radius-y) * 2);
  filter: blur(var(--fg-blur));
  animation: nlMorphFG var(--morph-speed) ease-in-out infinite,
             nlRotateFG var(--fg-rotate-speed) ease-in-out infinite,
             nlScaleFG 9.1s ease-in-out -5.5s infinite,
             nlSweepFG 4.3s cubic-bezier(0.45, 0, 0.55, 1) -1.2s infinite;
}

.gradient-strip {
  position: absolute;
  inset: -120% -80%;
  width: 300%;
  height: 400%;
  transform: rotate(var(--uv-rotation));
  transform-origin: center center;
  background: repeating-linear-gradient(
    rgb(51, 110, 243) 0px,
    rgb(146, 84, 234) 9%,
    rgb(246, 59, 179) 18%,
    rgb(237, 55, 51) 27%,
    rgb(255, 107, 43) 38%,
    rgb(254, 199, 0) 47%,
    rgb(255, 219, 15) 56%,
    rgb(87, 194, 0) 65%,
    rgb(0, 175, 87) 74%,
    rgb(0, 154, 170) 83%,
    rgb(50, 121, 249) 92%,
    rgb(51, 110, 243)
  );
  background-size: 100% 700px;
  animation: nlGradientScroll 15s linear infinite;
}

@keyframes nlGradientScroll {
  0% { background-position: 0 0; }
  100% { background-position: 0 700px; }
}

@keyframes nlMorphBG {
  0% { border-radius: calc(50% - var(--morph)) calc(50% + var(--morph)) calc(50% + var(--morph)*.6) calc(50% - var(--morph)*.6)/calc(50% + var(--morph)*.8) calc(50% - var(--morph)*.3) calc(50% + var(--morph)*.5) calc(50% - var(--morph)*.7); }
  25% { border-radius: calc(50% + var(--morph)*.7) calc(50% - var(--morph)*.5) calc(50% - var(--morph)) calc(50% + var(--morph)*.8)/calc(50% - var(--morph)*.6) calc(50% + var(--morph)) calc(50% - var(--morph)*.4) calc(50% + var(--morph)*.6); }
  50% { border-radius: calc(50% + var(--morph)*.4) calc(50% - var(--morph)*.8) calc(50% + var(--morph)*.7) calc(50% - var(--morph)*.3)/calc(50% + var(--morph)*.5) calc(50% - var(--morph)*.7) calc(50% + var(--morph)) calc(50% - var(--morph)*.5); }
  75% { border-radius: calc(50% - var(--morph)*.6) calc(50% + var(--morph)*.4) calc(50% - var(--morph)*.5) calc(50% + var(--morph))/calc(50% + var(--morph)*.3) calc(50% - var(--morph)*.8) calc(50% + var(--morph)*.6) calc(50% - var(--morph)*.4); }
  100% { border-radius: calc(50% - var(--morph)) calc(50% + var(--morph)) calc(50% + var(--morph)*.6) calc(50% - var(--morph)*.6)/calc(50% + var(--morph)*.8) calc(50% - var(--morph)*.3) calc(50% + var(--morph)*.5) calc(50% - var(--morph)*.7); }
}

@keyframes nlMorphFG {
  0% { border-radius: calc(50% + var(--morph)*.5) calc(50% - var(--morph)*.7) calc(50% + var(--morph)*.3) calc(50% - var(--morph))/calc(50% - var(--morph)*.4) calc(50% + var(--morph)*.6) calc(50% - var(--morph)*.8) calc(50% + var(--morph)*.5); }
  33% { border-radius: calc(50% - var(--morph)*.8) calc(50% + var(--morph)*.6) calc(50% - var(--morph)*.4) calc(50% + var(--morph)*.7)/calc(50% + var(--morph)) calc(50% - var(--morph)*.5) calc(50% + var(--morph)*.3) calc(50% - var(--morph)*.6); }
  66% { border-radius: calc(50% + var(--morph)*.6) calc(50% - var(--morph)*.3) calc(50% + var(--morph)) calc(50% - var(--morph)*.5)/calc(50% - var(--morph)*.7) calc(50% + var(--morph)*.4) calc(50% - var(--morph)*.6) calc(50% + var(--morph)*.8); }
  100% { border-radius: calc(50% + var(--morph)*.5) calc(50% - var(--morph)*.7) calc(50% + var(--morph)*.3) calc(50% - var(--morph))/calc(50% - var(--morph)*.4) calc(50% + var(--morph)*.6) calc(50% - var(--morph)*.8) calc(50% + var(--morph)*.5); }
}

@keyframes nlSweepBG {
  0% { transform: translate(-30px, -15px); }
  50% { transform: translate(30px, 15px); }
  100% { transform: translate(-30px, -15px); }
}

@keyframes nlSweepFG {
  0% { transform: translate(25px, -12px); }
  25% { transform: translate(-15px, 12px); }
  50% { transform: translate(-25px, -8px); }
  75% { transform: translate(15px, 15px); }
  100% { transform: translate(25px, -12px); }
}

@keyframes nlRotateFG {
  0% { transform: rotate(var(--fg-rotate-min)); }
  50% { transform: rotate(var(--fg-rotate-max)); }
  100% { transform: rotate(var(--fg-rotate-min)); }
}

@keyframes nlScaleBG {
  0% { scale: var(--shape-scale-min); }
  50% { scale: var(--shape-scale-max); }
  100% { scale: var(--shape-scale-min); }
}

@keyframes nlScaleFG {
  0% { scale: var(--shape-scale-max); }
  50% { scale: var(--shape-scale-min); }
  100% { scale: var(--shape-scale-max); }
}

/* Gemini Signature Header above Card */
.gemini-gen-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.gemini-gen-dots {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
}

.gemini-gen-dots span {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: var(--accent, #a8c7fa);
  animation: geminiDotBounce 1.4s ease-in-out infinite;
}

.gemini-gen-dots span:nth-child(2) {
  animation-delay: 0.2s;
  background: #c58af9;
}

.gemini-gen-dots span:nth-child(3) {
  animation-delay: 0.4s;
  background: #f28b82;
}

@keyframes geminiDotBounce {
  0%, 80%, 100% {
    transform: scale(0.65);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.gemini-gen-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary, #e3e3e3);
  letter-spacing: -0.005em;
}

/* Active Generating Card in Gallery - Authentic Gemini Soft Matte Studio */
.job-card.is-generating {
  cursor: default;
  background: #16171a;
  border: 0 !important;
  box-shadow: 0 4px 24px -6px rgba(0, 0, 0, 0.6);
  transform: none !important;
  animation: geminiCardAura 3.5s ease-in-out infinite;
}

@keyframes geminiCardAura {
  0%, 100% {
    box-shadow: 0 4px 24px -6px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(66, 133, 244, 0.04);
  }
  50% {
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.7), inset 0 0 50px rgba(155, 114, 203, 0.12);
  }
}

/* Whisper-quiet dark shimmer across card */
.pro-card-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.025) 38%, transparent 52%);
  background-size: 200% 100%;
  animation: proShimmer 3.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes proShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Center Authentic Gemini Aurora Loader */
.pro-center-loader,
.gemini-center-loader {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.gemini-sparkle-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gemini-aurora-bloom {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 114, 203, 0.45) 0%, rgba(66, 133, 244, 0.25) 45%, transparent 70%);
  animation: geminiBloomPulse 2.4s ease-in-out infinite;
  filter: blur(6px);
  pointer-events: none;
}

@keyframes geminiBloomPulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.85;
  }
}

.gemini-orbit-ring {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #a8c7fa;
  border-right-color: #9B72CB;
  animation: geminiSpin 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes geminiSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.gemini-sparkle-anim {
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 2;
  animation: geminiSparkleFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(155, 114, 203, 0.65));
}

@keyframes geminiSparkleFloat {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) scale(1.12) rotate(180deg);
  }
}

/* Minimalist Pure Seconds Counter - Clean, Zero Lines, Soft Tonal */
.gemini-seconds-counter {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gemini-seconds-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #e3e3e3;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 14px;
  border-radius: var(--radius-pill, 999px);
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

/* Hairline bottom 2px aurora sweep without border lines */
.gemini-bottom-sweep {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  overflow: hidden;
  background: transparent;
  border: 0 !important;
  z-index: 3;
}

.gemini-bottom-sweep-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, #4285F4 25%, #9B72CB 50%, #D96570 75%, transparent 100%);
  background-size: 200% 100%;
  animation: geminiSweepBar 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  border: 0 !important;
}

@keyframes geminiSweepBar {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

.pro-status-title,
.gemini-status-title {
  display: none !important;
}

.pro-status-meta,
.gemini-status-meta {
  display: none !important;
}

/* Card Header Metadata */
.pro-card-header {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
}

.pro-badge-ratio {
  font-size: 10.5px;
  font-weight: 500;
  color: #c4c7c5;
  background: rgba(8, 9, 11, 0.65);
  border: 0 !important;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pro-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(168, 199, 250, 0.12);
  border: 0 !important;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.pro-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8c7fa;
  opacity: 0.9;
  animation: proBlink 1.8s ease-in-out infinite;
}

@keyframes proBlink {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(0.8); }
}

/* Card Bottom Prompt Preview */
.pro-card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 11, 13, 0.88) 55%, rgba(10, 11, 13, 0.98) 100%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pro-prompt-text {
  font-size: 12px;
  color: #c4c7c5;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gemini Indeterminate Multi-color Aurora Progress Bar */
.pro-track {
  width: 100%;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.pro-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, #4285F4 20%, #9B72CB 50%, #D96570 80%, transparent);
  border-radius: 999px;
  animation: geminiSweepBar 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes geminiSweepBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* Image-to-Video background */
.pro-i2v-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3) contrast(1.05);
}

.job-card.card-just-finished {
  animation: soft-image-enter 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes soft-image-enter {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  35% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
