/* Dedicated Neo-Brutalism Styles for Gemini Video Studio (video.html) */

.video-studio-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1024px) {
  .video-studio-grid {
    grid-template-columns: 1fr;
  }
}

.neo-card {
  background: #fff;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 3px solid #000;
}

.panel-header h3 {
  font-size: 15px;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.badge-neo {
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  border-radius: 6px;
  text-transform: uppercase;
  color: #000;
}

/* Mode Switcher Tabs */
.video-mode-switcher {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 3px 3px 0 #000;
}

.video-mode-btn {
  flex: 1;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 900;
  border: 2px solid transparent;
  background: transparent;
  color: #000;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  text-align: center;
}

.video-mode-btn:hover {
  background: #e2e8f0;
}

.video-mode-btn.active {
  background: var(--neo-yellow, #facc15);
  border-color: #000;
  box-shadow: 2px 2px 0 #000;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
}

.neo-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 3px 3px 0 #000;
  outline: none;
  box-sizing: border-box;
}

.neo-input:focus {
  background: #fffde7;
}

/* Aspect Ratio Chips */
.aspect-grid {
  display: flex;
  gap: 8px;
}

.aspect-chip {
  flex: 1;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 900;
  border: 2px solid #000;
  background: #fff;
  color: #000;
  border-radius: 6px;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  text-align: center;
}

.aspect-chip:hover {
  background: #f8fafc;
}

.aspect-chip.active {
  background: var(--neo-cyan, #06b6d4);
  color: #fff;
}

/* Frame Dropzones & Preview Cards */
.two-col-frames {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.frame-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.frame-dropzone {
  border: 3px dashed #000;
  background: #fafafa;
  border-radius: 8px;
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.frame-dropzone:hover {
  background: #f1f5f9;
}

.frame-preview-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #fff;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  border-radius: 8px;
  position: relative;
}

.frame-preview-card img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 2px solid #000;
  border-radius: 6px;
}

.frame-preview-info {
  flex: 1;
  overflow: hidden;
}

.frame-filename {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  background: #10b981;
  color: #fff;
  border-radius: 4px;
  margin-top: 2px;
}

.btn-remove-frame {
  background: #ef4444;
  color: #fff;
  border: 2px solid #000;
  font-size: 12px;
  font-weight: 900;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* R2V Reference Grid */
.ref-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.ref-preview-card {
  border: 2px solid #000;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  position: relative;
}

.ref-preview-img-wrapper {
  position: relative;
  width: 100%;
  height: 70px;
}

.ref-preview-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  background: #000;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
}

.btn-remove-ref {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: #fff;
  border: 1px solid #000;
  font-size: 10px;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ref-card-filename {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  background: #fafafa;
  border-top: 1px solid #000;
}

.ref-add-btn-card,
.ref-add-tile {
  border: 2.5px dashed #000;
  border-radius: 8px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fffdf0;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 3px 3px 0 #000;
  color: #000;
  gap: 4px;
}

.ref-add-btn-card:hover,
.ref-add-tile:hover {
  background: var(--neo-yellow, #facc15);
  border-style: solid;
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 #000;
}

.ref-add-tile .add-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  color: var(--neo-yellow, #facc15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 1px 1px 0 #000;
}

.ref-grid-item {
  position: relative;
  border: 2.5px solid #000;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  height: 90px;
  transition: transform 0.15s ease;
}

.ref-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 #000;
}

.ref-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Submit Button */
.btn-submit-generate {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 900;
  background: var(--neo-yellow, #facc15);
  color: #000;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

.btn-submit-generate:hover {
  background: #fde047;
}

.btn-submit-generate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Placeholder & Loader */
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: #fafafa;
  border: 3px dashed #000;
  border-radius: 8px;
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

/* Premium Cyber Neo-Brutalism Video Loader (Centered Desktop Layout) */
.video-loader-card {
  background: #ffffff;
  border: 3.5px solid #000;
  box-shadow: 8px 8px 0 #000;
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  animation: neoPulseBorder 2s infinite alternate;
}

@keyframes neoPulseBorder {
  0% { box-shadow: 8px 8px 0 #000; }
  100% { box-shadow: 10px 10px 0 var(--neo-yellow, #facc15); }
}

.loader-top-banner {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--neo-yellow, #facc15);
  color: #000;
  border: 2.5px solid #000;
  padding: 6px 18px;
  border-radius: 20px;
  box-shadow: 3px 3px 0 #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  align-self: center;
}

.loader-top-banner .pulse-dot {
  color: #ef4444;
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.cyber-loader-unit {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto;
  align-self: center;
}

.reel-outer-ring {
  width: 84px;
  height: 84px;
  border: 4px dashed #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neo-cyan, #06b6d4);
  box-shadow: 4px 4px 0 #000;
  animation: spinReel 5s linear infinite;
}

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

.reel-inner-gear {
  font-size: 40px;
  animation: counterSpin 5s linear infinite;
}

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

.loader-title-wrapper {
  text-align: center;
  margin: 0 auto;
  align-self: center;
  max-width: 560px;
}

.loader-main-title {
  font-size: 17px;
  font-weight: 900;
  margin: 0 0 6px 0;
  color: #000;
  line-height: 1.3;
}

.loader-sub-text {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin: 0;
}

.loader-progress-bar-container {
  width: 100%;
  max-width: 540px;
  height: 18px;
  background: #f1f5f9;
  border: 3px solid #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 4px 4px 0 #000;
  margin: 0 auto;
  align-self: center;
}

.loader-progress-bar-fill {
  height: 100%;
  width: 45%;
  background: repeating-linear-gradient(
    45deg,
    var(--neo-yellow, #facc15),
    var(--neo-yellow, #facc15) 12px,
    var(--neo-cyan, #06b6d4) 12px,
    var(--neo-cyan, #06b6d4) 24px
  );
  border-radius: 6px;
  animation: progressSlide 2.5s infinite ease-in-out alternate;
}

@keyframes progressSlide {
  0% { width: 20%; margin-left: 0%; }
  100% { width: 75%; margin-left: 25%; }
}

.loader-stepper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  align-self: center;
}

.stepper-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f8fafc;
  border: 2.5px solid #000;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  box-shadow: 3px 3px 0 #000;
  text-align: center;
}

.stepper-step.active {
  background: #fff;
  color: #000;
}

.stepper-step.pulsing {
  background: #fffde7;
  border-color: #000;
  animation: stepGlow 1.2s infinite alternate;
}

@keyframes stepGlow {
  0% { background: #fffde7; }
  100% { background: var(--neo-yellow, #facc15); }
}

.stepper-step .step-num {
  width: 20px;
  height: 20px;
  border: 1.5px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  background: #000;
  color: #fff;
  flex-shrink: 0;
}

/* 2-Column Centered Info Grid for STATUS & TIMER */
.loader-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  align-self: center;
}

.info-pill {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2.5px solid #000;
  border-radius: 10px;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  width: 100%;
  text-align: center;
}

.info-pill .pill-label {
  font-size: 10px;
  font-weight: 900;
  color: #000;
  text-transform: uppercase;
}

.info-pill .pill-val {
  font-size: 14px;
  font-weight: 900;
  color: #000;
}

.info-pill.status-pill.status-queued {
  background: #fef08a;
}

.info-pill.status-pill.status-running {
  background: var(--neo-cyan, #06b6d4);
  color: #000;
}

.info-pill.timer-pill {
  background: #fde047;
}

/* Full Width Centered Job ID Banner */
.job-id-banner {
  width: 100%;
  max-width: 540px;
  background: #f8fafc;
  border: 2.5px solid #000;
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 3px 3px 0 #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  margin: 0 auto;
  align-self: center;
}

.job-id-label {
  font-size: 10px;
  font-weight: 900;
  color: #000;
  text-transform: uppercase;
  flex-shrink: 0;
}

.job-id-val {
  font-size: 11.5px;
  font-weight: 800;
  font-family: 'Courier New', Courier, monospace;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loader-warning-callout {
  font-size: 11.5px;
  font-weight: 800;
  color: #1e293b;
  background: #fff8d6;
  border: 2.5px solid #000;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #000;
  text-align: center;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  align-self: center;
}

/* Result Video Cards */
.video-result-item {
  background: #fff;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-download-video {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 900;
  background: var(--neo-lime, #84cc16);
  color: #000;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  border-radius: 6px;
  text-decoration: none;
}

.btn-download-video:hover {
  background: #a3e635;
}
