:root{
  --vx-black: #0a0a0a;
  --vx-deep: #141414;
  --vx-red: #b71c1c;
  --vx-red-glow: #c42021;
  --vx-gold: #f0c33c;
  --vx-gold-soft: #ffdb70;
  --vx-text: #e9e9e9;
  --vx-text-soft: #cfcfcf;
  --vx-border: #2a2a2a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.03);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(183,28,28,.2), transparent),
    var(--vx-black);
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--vx-text);
}

/* Header */
.vx-header{
  padding: 22px 24px 10px;
  padding-top: 60px; /* room for hamburger */
  background: linear-gradient(180deg, rgba(0,0,0,.65), rgba(0,0,0,0));
}

/* Hamburger: top-left above logo */
#hamburgerMenu{
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 1000;
}
#hamburgerIcon{
  width: 34px;
  height: 34px;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(240,195,60,.35));
}
/* Hamburger: top-left above logo */
#hamburgerMenu{
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 1000;
}
#hamburgerIcon{
  width: 34px;
  height: 34px;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(240,195,60,.35));
}
#menuDropdown{
  display: none;
  position: absolute;
  left: 0;
  margin-top: 10px;
  background: rgba(15,15,15, 0.70); /* Semi-transparent dark base for glassmorphism */
  backdrop-filter: blur(12px); /* Blur what's behind the menu */
  -webkit-backdrop-filter: blur(12px); /* Safari prefix */
  border: 1px solid rgba(42,42,42, 0.6); /* Subtle transparent border */
  border-radius:12px;
  min-width:260px;
  box-shadow:0 18px 40px rgba(0,0,0,.55); /* Slightly stronger shadow for depth */
  transform: translateY(-8px);
  opacity: 0; /* Hidden/closed base state */
  transition: transform .25s ease, opacity .25s ease;
}
#menuDropdown.show {
  display: block; /* Visible on toggle */
  transform: translateY(0);
  opacity: 1; /* Fully opaque when open */
  animation: menuSlideIn .3s ease-out both; /* Smooth open animation */
}

#menuDropdown ul{ 
  list-style:none; 
  margin:8px; 
  padding:8px; 
}
#menuDropdown li{ 
  margin:0; 
}
#menuDropdown li a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  color:#ddd;
  text-decoration:none;
  border-radius:10px;
}
#menuDropdown li a:hover{ 
  background:rgba(20,20,20, 0.85); /* Semi-transparent hover to match theme */
  color:#fff; 
}
#menuDropdown li img{ 
  width:18px; 
  height:18px; 
}
#menuDropdown .menu-sep{
  padding:8px 12px;
  color:#a0a0a0;
  font-size:.9rem;
  opacity:.8;
  border-top:1px solid rgba(36,36,36, 0.7); /* Subtle transparent separator */
  margin:6px 0;
}

@keyframes menuSlideIn {
  0% {
    transform: translateY(-8px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Optional: Prevent body scroll when menu is open (especially mobile) */
body.menu-open {
  overflow: hidden;
}

/* Responsive: Full-width on small screens */
@media (max-width: 640px) {
  #menuDropdown {
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    min-width: auto;
    width: 100%;
    backdrop-filter: blur(16px); /* Slightly more blur on mobile for better effect */
    border: none; /* No border on full-screen mobile */
    box-shadow: 0 4px 20px rgba(0,0,0,.6); /* Lighter shadow for mobile */
  }
  
  #menuDropdown.show {
    animation: menuSlideDown .3s ease-out both; /* Full slide-down on mobile */
  }
  
  @keyframes menuSlideDown {
    0% { 
      transform: translateY(-100%); 
      opacity: 0; 
    }
    100% { 
      transform: translateY(0); 
      opacity: 1; 
    }
  }
}



#menuDropdown.show {
  display: block; /* Show on toggle */
  transform: translateY(0);
  opacity: 1;
}

/* Smooth slide on open (affects .show) */
#menuDropdown.show {
  animation: menuSlideIn .3s ease-out both;
}

@keyframes menuSlideIn {
  0% {
    transform: translateY(-8px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Outside click should work via JS (no CSS needed) */

/* Optional: Body scroll lock on mobile when open */
body.menu-open {
  overflow: hidden; /* Prevents background scroll while menu open */
}






.vx-logo-svg { width: 46px; height: 46px; flex: 0 0 auto; }
.vx-logo-svg .ring { fill: none; stroke: var(--vx-gold); stroke-width: 2; opacity: .9; }
.vx-logo-svg .blade { fill: var(--vx-red); opacity: .85; }

.vx-logo-img {
  display: block;
  height: 90px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(240,195,60,.30));
}

.vx-name{
  margin:0;
  letter-spacing:.18em;
  font-family: "Cinzel", serif;
  font-weight:700;
  color: var(--vx-gold);
  font-size: 28px;
  text-shadow: 0 0 12px rgba(240,195,60,.35);
}
.vx-tagline{
  margin:.2rem 0 0 0;
  color:var(--vx-gold-soft);
  opacity:.9;
  font-style:italic;
}

/* Workspace Layout */
.vx-app{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px 24px;
}
.vx-workspace{
  display:grid;
  gap:20px;
  grid-template-columns: 1fr 1.2fr;
}
.vx-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid var(--vx-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* Prompt Panel */
.vx-label{
  display:block;
  margin-bottom:8px;
  font-weight:600;
  color:var(--vx-gold);
}
.vx-textarea{
  width:100%;
  min-height:180px;
  resize:vertical;
  background:#0f0f0f;
  color:var(--vx-text);
  border:1px solid #262626;
  border-radius:12px;
  padding:12px 14px;
  outline:none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.vx-textarea:focus{
  border-color:#3b3b3b;
  box-shadow: 0 0 0 2px rgba(192,32,33,.35);
}

.vx-controls{
  display:flex;
  gap:12px;
  margin:14px 0 12px;
  flex-wrap:wrap;
}
.vx-control{ flex: 1 1 180px; }
.vx-sublabel{
  display:block;
  margin-bottom:6px;
  color:var(--vx-text-soft);
  font-size:.92rem;
}
.vx-select{
  width:100%;
  padding:10px 12px;
  background:#0f0f0f;
  color:var(--vx-text);
  border:1px solid #262626;
  border-radius:10px;
  outline:none;
}
.vx-select:focus{
  border-color:#3b3b3b;
  box-shadow: 0 0 0 2px rgba(240,195,60,.3);
}

.vx-btn{
  appearance:none;
  cursor:pointer;
  border:none;
  padding:12px 16px;
  border-radius:12px;
  font-weight:700;
}
.vx-btn-primary{
  background: linear-gradient(180deg, #c83a3a, #911616);
  color:#fff;
  box-shadow:
    0 6px 20px rgba(200,58,58,.35),
    0 0 0 1px rgba(255,255,255,.06) inset;
  transition: transform .06s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}
.vx-btn-primary:hover{
  filter: brightness(1.05);
  box-shadow: 0 10px 28px rgba(200,58,58,.45);
}
.vx-btn-primary:active{ transform: translateY(1px) scale(.99); }
.vx-btn-emoji{ margin-right:6px; }

/* Disabled / busy generate button */
#vxGenerate:disabled{
  opacity: .72;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(.08);
  box-shadow: 0 3px 10px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.04);
}

#vxGenerate.is-busy{
  opacity: .92;
  cursor: pointer;
  pointer-events: auto;
  filter: none;
  box-shadow:
    0 6px 20px rgba(200,58,58,.35),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

/* Output Panel */
.vx-output{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.vx-screen{
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(240,195,60,.25) inset,
    0 0 35px rgba(199,32,33,.25);
}

/* Video, placeholder, and overlay layering */
.vx-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vx-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
  transition: opacity .25s ease, visibility .25s ease;
}

/* Overlay with clapper + status + progress */
.vx-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  background: linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.34));
}

/* Screen states toggled by JS */
.vx-screen.is-generating {
  background: #000;
}

.vx-screen.is-generating .vx-overlay {
  opacity: 1;
  visibility: visible;
}

.vx-screen.is-generating .vx-placeholder {
  opacity: 0;
  visibility: hidden;
}

.vx-screen.is-playing .vx-overlay {
  opacity: 0;
  visibility: hidden;
}

/* Clapper intro */
.vx-clapper{
  width:min(60%,520px);
  max-width:520px;
  height:140px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,.6));
  animation: clapIntro 1.1s ease-out 0s 1 both;
}
.vx-clapper .clap-top{
  width:60%;
  height:18px;
  background: #222;
  border:1px solid #333;
  border-radius: 4px 4px 0 0;
  background-image: repeating-linear-gradient(90deg, #444 0 16px, #222 16px 32px);
  transform-origin:left center;
  animation: clapTop 1.1s ease-out 0s 1 both;
}
.vx-clapper .clap-body{
  width:60%;
  height:70px;
  background:#1b1b1b;
  border:1px solid #333;
  border-top:none;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 0 0 6px 6px;
}
.clap-text{
  font-family:"Cinzel", serif;
  font-weight:700;
  letter-spacing:.08em;
  color:var(--vx-gold);
  text-shadow: 0 0 12px rgba(240,195,60,.35);
}

@keyframes clapTop{
  0%{ transform: rotate(-18deg) translateY(-4px); }
  55%{ transform: rotate(0deg) translateY(0); }
  100%{ transform: rotate(0deg); }
}
@keyframes clapIntro{
  0%{ opacity:0; transform: translateY(-18px) scale(.98); }
  60%{ opacity:1; transform: translateY(0) scale(1); }
  100%{ opacity:0; }
}

/* Status line + crew icon */
.vx-status{
  margin-top: 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  animation: statusFade .9s ease .8s both;
}
@keyframes statusFade{
  0%{ opacity:0; transform: translateY(-6px); }
  100%{ opacity:1; transform: translateY(0); }
}
.vx-status-text{
  font-weight:800;
  letter-spacing:.18em;
  color:var(--vx-gold);
  text-shadow: 0 0 10px rgba(240,195,60,.25);
}
.vx-crew{ opacity:.95; }
.vx-crew-svg{ width:140px; height:auto; }
.crew-gold{ fill:var(--vx-gold); stroke:var(--vx-gold); }

/* Progress bar (overlay) */
.vx-progress-wrap{
  margin-top: 12px;
  width: min(72%, 560px);
  display: flex;
  align-items: center;
  gap: 10px;
}
.vx-progress{
  width:100%;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.12);
  overflow:hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.4);
}
.vx-progress-fill{
  width:0%;
  height:100%;
  border-radius:inherit;
  background:
    linear-gradient(90deg, #ffd24d 0%, #ffb733 40%, #ff9f1a 100%);
  transition: width .45s ease;
  position: relative;
}
.vx-progress-fill::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    110deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.28) 45%,
    rgba(255,255,255,0) 90%
  );
  transform: translateX(-130%);
}
.vx-screen.is-generating .vx-progress-fill::after{
  animation: vxProgressShine 1.4s linear infinite;
}
@keyframes vxProgressShine{
  to { transform: translateX(130%); }
}

.vx-progress-pct{
  min-width:42px;
  text-align:right;
  font-weight:700;
  font-size:12px;
  color:var(--vx-gold-soft);
  text-shadow: 0 0 8px rgba(240,195,60,.25);
}

/* Player controls */
.vx-player-controls{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.vx-icon-btn{
  background:#141414;
  color:#ddd;
  border:1px solid #2a2a2a;
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
}
.vx-icon-btn:hover{ border-color:#3a3a3a; color:#fff; }

/* Library */
.vx-library{ margin-top:22px; }
.vx-lib-title{
  margin:0 0 10px;
  color:var(--vx-gold);
  font-family:"Cinzel", serif;
  letter-spacing:.08em;
}
.vx-grid{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.vx-thumb{
  position:relative;
  aspect-ratio:16/9;
  border-radius:12px;
  background: linear-gradient(180deg, #121212, #0b0b0b);
  border:1px solid #262626;
  box-shadow: var(--shadow);
  overflow:hidden;
}

.vx-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vx-thumb .vx-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 18px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.vx-thumb.no-thumb {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}


.vx-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(120% 100% at 50% -20%, rgba(183,28,28,.15), transparent);
}
.vx-thumb:hover{
  border-color:#333;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.vx-play{
  position:absolute;
  inset:auto;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  background: rgba(0,0,0,.45);
  padding:10px 14px;
  border-radius:10px;
  color:#fff;
  font-weight:700;
}
.vx-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsive */
@media (max-width: 980px){
  .vx-workspace{ grid-template-columns: 1fr; }
  .vx-screen{
    box-shadow:
      0 0 0 1px rgba(240,195,60,.22) inset,
      0 0 22px rgba(199,32,33,.2);
  }
  .vx-progress-wrap{
    width: min(84%, 560px);
  }
}
@media (max-width: 640px){
  .vx-header{ padding-top: 54px; }
  .vx-logo-img { height: 60px; }
  .vx-progress-wrap{
    width: min(90%, 560px);
    gap: 8px;
  }

  .vx-run-row{
    gap: 10px;
  }
  .vx-run-pct{
    min-width: 40px;
    font-size: 12px;
  }
  
  .vx-progress{ height: 9px; }
}


/* Generate/Stop row with live % on the right */
.vx-run-row{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.vx-run-pct{
  min-width: 44px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  color: var(--vx-gold-soft);
  text-shadow: 0 0 8px rgba(240,195,60,.25);
  letter-spacing: .02em;
}
