/* VVid website — the interactive demos: video templates, Effects Studio physics, AI Studio */

/* shared mini-app chrome */
.mini { border-radius: 16px; overflow: hidden; background: #111217; border: 1px solid #262931; box-shadow: 0 40px 90px -34px rgba(0, 0, 0, 0.9); }
.mini-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0d0e12; border-bottom: 1px solid #1d1f26; font-size: 13px; color: #c9ccd6; }
.mini-bar b { color: #fff; font-weight: 650; }
.mini-bar .sp { margin-left: auto; }
.mbtn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; background: #1d2027; color: #dfe2ea; transition: background-color .3s var(--soft), transform .3s var(--glide); }
.mbtn:hover { background: #272b34; }
.mbtn.blue { background: var(--blue); color: #fff; }
.mbtn.blue:hover { background: #6699ff; }
.mbtn:active { transform: scale(.97); }
.mbtn svg { width: 12px; height: 12px; fill: currentColor; }

/* ---------- video templates ---------- */
.tpl { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 0; }
.fxs .title, .ai .title { font-size: clamp(32px, 3.8vw, 50px); }
.tpl-styles { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: #14151a; border-right: 1px solid #1d1f26; }
.tpl-styles p { font-size: 11px; font-weight: 750; letter-spacing: .1em; color: #7f8390; padding: 2px 6px 6px; }
.tstyle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 9px; text-align: left; font-size: 13.5px; font-weight: 600; color: #cfd2da;
  border: 1px solid transparent; transition: background-color .4s var(--soft), border-color .4s var(--soft), color .4s; }
.tstyle span { font-size: 11px; font-weight: 650; color: #6fa0ff; }
.tstyle[data-mood="Calm"] span { color: #7ce6c4; }
.tstyle[data-mood="Story"] span { color: #b9a4ff; }
.tstyle:hover { background: #1b1d23; color: #fff; }
.tstyle[aria-checked="true"] { background: rgba(79, 140, 255, 0.13); border-color: rgba(79, 140, 255, 0.55); color: #fff; }
.tpl-main { padding: 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tpl-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tpl-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #000; isolation: isolate; }
.tpl-screen .ly { position: absolute; inset: 0; overflow: hidden; }
.tpl-screen .ly img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.tpl-flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.tpl-grade { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .6s var(--soft); }
.tpl-bars::before, .tpl-bars::after { content: ""; position: absolute; left: 0; right: 0; z-index: 4; height: 0; background: #000; transition: height .7s var(--glide); }
.tpl-bars::before { top: 0; } .tpl-bars::after { bottom: 0; }
.tpl-bars { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.tpl-title { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; text-align: center; pointer-events: none; padding: 10px;
  font-family: var(--display); font-weight: 850; color: #fff; font-size: clamp(18px, 2.6vw, 34px); letter-spacing: 0.04em; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); }
.tpl-title b { display: block; opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .5s var(--soft), transform .7s var(--glide); }
.tpl-title b.on { opacity: 1; transform: none; }
.tpl-title small { display: block; font-size: .4em; letter-spacing: .3em; font-weight: 600; opacity: .85; margin-top: 6px; }
.tpl-rec { position: absolute; left: 10px; top: 8px; z-index: 6; font-family: var(--mono); font-size: 12px; color: #fff; text-shadow: 0 0 6px rgba(0, 0, 0, 0.8); display: none; }
/* looks */
.tpl-screen.look-warm .ly img { filter: sepia(.22) saturate(1.25) brightness(1.04); }
.tpl-screen.look-teal .ly img { filter: contrast(1.12) saturate(1.15); }
.tpl-screen.look-teal .tpl-grade { opacity: 1; background: linear-gradient(180deg, rgba(0, 160, 170, 0.22), rgba(255, 140, 50, 0.16)); mix-blend-mode: overlay; }
.tpl-screen.look-teal .tpl-bars::before, .tpl-screen.look-teal .tpl-bars::after { height: 11%; }
.tpl-screen.look-soft .ly img { filter: brightness(1.08) contrast(.9) saturate(1.05); }
.tpl-screen.look-soft .tpl-grade { opacity: 1; background: radial-gradient(80% 80% at 50% 50%, rgba(255, 230, 240, 0.12), rgba(255, 210, 230, 0.28)); mix-blend-mode: screen; }
.tpl-screen.look-vhs .ly img { filter: saturate(1.45) contrast(1.1) hue-rotate(-8deg); }
.tpl-screen.look-vhs .tpl-grade { opacity: 1; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px); animation: roll .25s steps(2) infinite; }
.tpl-screen.look-vhs .tpl-rec { display: block; }
@keyframes roll { to { background-position: 0 3px; } }
.tpl-screen.look-crisp .ly img { filter: contrast(1.16) saturate(1.12); }
.tpl-screen.look-game .ly img { filter: saturate(1.3) contrast(1.08); }
.tpl-info h3 { font-size: 22px; margin-bottom: 4px; }
.tpl-info .mood { font-size: 12.5px; font-weight: 700; color: #6fa0ff; margin-bottom: 10px; }
.tpl-info p { font-size: 14.5px; color: var(--dim); margin-bottom: 16px; min-height: 4.8em; }
.tpl-steps { display: grid; gap: 8px; font-size: 13px; }
.tpl-steps div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 9px; background: #17181e; color: #cfd2da; }
.tpl-steps div span:first-child { color: #7f8390; font-weight: 650; font-size: 11px; letter-spacing: .08em; }
.toggle { width: 34px; height: 19px; border-radius: 999px; background: var(--blue); position: relative; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; }
.tpl-tl { position: relative; border-radius: 10px; background: #14151a; border: 1px solid #1d1f26; padding: 10px 12px 12px; overflow: hidden; }
.tpl-row { position: relative; height: 26px; }
.tpl-row + .tpl-row { margin-top: 6px; }
.tpl-label { position: absolute; left: 0; top: 0; bottom: 0; width: 54px; font-size: 10.5px; font-weight: 600; color: #8b8f9c; display: flex; align-items: center; }
.tpl-lane { position: absolute; left: 58px; right: 0; top: 0; bottom: 0; }
.tpl-wave { display: flex; align-items: center; gap: 2px; height: 100%; }
.tpl-wave i { flex: 1; border-radius: 1px; background: #3b5f8f; height: calc(var(--a) * 100%); transition: background-color .2s; }
.tpl-wave i.lit { background: var(--cyan); }
.tpl-beat { position: absolute; top: 3px; height: 20px; padding: 0 4px; border-radius: 3px; font-size: 9px; font-weight: 800; line-height: 20px; color: #3a2400; background: var(--amber); transform: translateX(-1px); transition: filter .2s, transform .3s var(--pop); }
.tpl-beat.hit { filter: brightness(1.45) drop-shadow(0 0 6px var(--amber)); transform: translateX(-1px) scale(1.12); }
.tpl-clip { position: absolute; top: 1px; bottom: 1px; border-radius: 4px; background: center / cover; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); overflow: hidden;
  transition: left .7s var(--glide), width .7s var(--glide), opacity .4s var(--soft); }
.tpl-clip.on { box-shadow: inset 0 0 0 2px var(--cyan), 0 0 14px -2px var(--cyan); }
.tpl-ph { position: absolute; top: 6px; bottom: 6px; left: 70px; width: 0; pointer-events: none; will-change: transform; }
.tpl-ph::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #ff4a5d; box-shadow: 0 0 8px rgba(255, 74, 93, 0.8); }

/* ---------- Effects Studio physics ---------- */
.fxs { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 54px; align-items: center; }
.ticks { list-style: none; display: grid; gap: 12px; margin-bottom: 28px; }
.ticks li { position: relative; padding-left: 32px; color: #cfd4e0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px; background: var(--tb, rgba(79, 140, 255, 0.13)); border: 1px solid var(--tc, rgba(124, 230, 255, 0.45)); }
.ticks li::after { content: ""; position: absolute; left: 7px; top: 7px; width: 5px; height: 9px; border-right: 2px solid var(--tk, var(--cyan)); border-bottom: 2px solid var(--tk, var(--cyan)); transform: rotate(42deg); }
.ticks.pink { --tb: rgba(255, 95, 184, 0.12); --tc: rgba(255, 95, 184, 0.45); --tk: #ff8ccf; }
.ticks.violet { --tb: rgba(155, 123, 255, 0.13); --tc: rgba(185, 164, 255, 0.45); --tk: #c4b2ff; }
.mats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.mats li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.mats li i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.fx-app .mini-bar .sp { display: flex; gap: 8px; }
.fx-body { display: grid; grid-template-columns: minmax(0, 1fr) 190px; }
.fx-view { position: relative; background: #0f1015; min-width: 0; }
.fx-view canvas { width: 100%; height: auto; aspect-ratio: 16 / 10; cursor: crosshair; touch-action: manipulation; }
.fx-hint { position: absolute; left: 50%; top: 14px; translate: -50% 0; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(8, 9, 14, 0.7); pointer-events: none; transition: opacity .6s var(--soft); white-space: nowrap; }
.fx-hint.gone { opacity: 0; }
.fx-props { padding: 14px; background: #14151a; border-left: 1px solid #1d1f26; display: flex; flex-direction: column; gap: 14px; font-size: 12px; }
.fx-props .ed-cap { font-size: 10px; font-weight: 750; letter-spacing: .1em; color: #7f8390; }
.fx-prop label { display: flex; justify-content: space-between; color: #b9bdc8; margin-bottom: 6px; }
.fx-prop label output { font-family: var(--mono); color: #fff; }
.fx-prop input[type="range"] { width: 100%; accent-color: var(--blue); height: 18px; cursor: pointer; }
.fx-seg-wrap .ed-cap { margin-bottom: 8px; }
.fx-seg { display: flex; gap: 4px; }
.fx-seg button { flex: 1; padding: 5px 0; border-radius: 6px; background: #1d2027; color: #b9bdc8; font-size: 11.5px; font-weight: 600; transition: background-color .3s, color .3s; }
.fx-seg button[aria-pressed="true"] { background: rgba(79, 140, 255, 0.22); color: #fff; box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.6); }
.fx-time { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #0d0e12; border-top: 1px solid #1d1f26; font-family: var(--mono); font-size: 12px; color: #c9ccd6; }
.fx-scrub { flex: 1; height: 4px; border-radius: 2px; background: #262931; position: relative; }
.fx-scrub i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 2px; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); }
.fx-state { color: var(--green); font-family: var(--text); font-weight: 600; }

/* ---------- AI Studio ---------- */
.ai { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 54px; align-items: center; }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #0f1014; border-bottom: 1px solid #1d1f26; }
.ai-head svg { width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ai-head b { display: block; font-size: 15px; color: #fff; }
.ai-head span { font-size: 11.5px; color: #8b8f9c; }
.ai-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 380px; }
.ai-side { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; background: #121318; border-right: 1px solid #1d1f26; }
.ai-side button { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; font-size: 13px; color: #b9bdc8; text-align: left; transition: background-color .4s var(--soft), color .4s; }
.ai-side button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ai-side button:hover { background: #1b1d23; color: #fff; }
.ai-side button[aria-pressed="true"] { background: #213660; color: #fff; }
.ai-main { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ai-main h4 { font-family: var(--display); font-size: 18px; color: #fff; }
.ai-models { font-size: 11.5px; color: #8b8f9c; margin-top: -8px; }
.ai-prompt { min-height: 74px; padding: 10px 12px; border-radius: 8px; background: #17181e; border: 1px solid #2a2d36; font-size: 13.5px; color: #e9ebf0; }
.ai-prompt .caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -2px; background: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips span { padding: 4px 9px; border-radius: 6px; font-size: 11.5px; background: #1b1d23; color: #b9bdc8; border: 1px solid #262931; transition: background-color .4s var(--soft), border-color .4s, color .4s; }
.ai-chips span.on { background: rgba(79, 140, 255, 0.18); border-color: rgba(79, 140, 255, 0.6); color: #fff; }
.ai-go { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: #8b8f9c; }
.ai-bar { flex: 1; height: 4px; border-radius: 2px; background: #22252d; overflow: hidden; }
.ai-bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); }
.ai-result { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; background: #15161b; border: 1px solid #262931; opacity: 0; transform: translateY(8px); transition: opacity .6s var(--soft), transform .8s var(--glide); }
.ai-result.on { opacity: 1; transform: none; }
.ai-thumb { position: relative; width: 112px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #0d0e12; }
.ai-thumb > * { position: absolute; inset: 0; }
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ai-wave { display: flex; align-items: center; gap: 2px; padding: 10px 8px; background: linear-gradient(140deg, #1b2c55, #121a30); }
.ai-wave i { flex: 1; border-radius: 1px; background: var(--cyan); height: calc(var(--a) * 100%); animation: eq 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.09s); }
@keyframes eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.ai-film { background: center / cover; }
.ai-film::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0 4px, transparent 4px 10px) top / 100% 8px no-repeat, repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0 4px, transparent 4px 10px) bottom / 100% 8px no-repeat; }
.ai-look { background: center / cover; }
.ai-look::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49.5%, #fff 49.5% 50.5%, transparent 50.5%); }
.ai-look.film { filter: sepia(.35) saturate(1.3) contrast(1.1); }
.ai-look.glitch { animation: rgb 1.2s steps(3) infinite; }
@keyframes rgb { 0% { filter: none; } 40% { filter: hue-rotate(80deg) saturate(2); transform: translateX(3px); } 60% { filter: hue-rotate(-50deg); transform: translateX(-2px); } 100% { filter: none; } }
.ai-anim { display: grid; place-items: end center; padding-bottom: 18px; background: linear-gradient(160deg, #1b2c55, #121a30); }
.ai-anim i { width: 30px; height: 30px; border-radius: 8px; background: var(--grad); transform-origin: 50% 100%; animation: drop 1.6s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes drop { 0% { transform: translateY(-62px); } 40% { transform: translateY(0) scale(1.25, .7); } 55% { transform: translateY(-16px) scale(.95, 1.08); } 70%, 100% { transform: none; } }
.ai-meta b { display: block; font-size: 13px; color: #fff; margin-bottom: 4px; line-height: 1.35; }
.ai-meta span { font-size: 11.5px; color: #8b8f9c; }
.ai-meta .acts { display: flex; gap: 6px; margin-top: 8px; }
.ai-meta .acts span { padding: 3px 8px; border-radius: 6px; background: #1d2027; color: #dfe2ea; font-size: 11px; }
.ai-also { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; list-style: none; font-size: 14px; color: var(--dim); }
.ai-also li { display: flex; align-items: center; gap: 9px; }
.ai-also li::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); border-radius: 1px; background: #b9a4ff; flex-shrink: 0; }

@media (max-width: 1080px) {
  .tpl { grid-template-columns: 1fr; }
  .tpl-styles { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #1d1f26; scrollbar-width: thin; padding: 12px; }
  .tpl-styles p { display: none; }
  .tstyle { flex-direction: column; align-items: flex-start; gap: 0; width: auto; flex-shrink: 0; padding: 8px 12px; }
  .fxs, .ai { grid-template-columns: 1fr; gap: 40px; }
  .ai-copy { order: -1; }
}
@media (max-width: 720px) {
  .tpl-beat { font-size: 0; width: 3px; padding: 0; }
  .tpl-top { grid-template-columns: 1fr; }
  .tpl-info p { min-height: 0; }
  .tpl-main { padding: 14px; }
  .fx-body { grid-template-columns: 1fr; }
  .fx-props { border-left: 0; border-top: 1px solid #1d1f26; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .fx-props .ed-cap, .fx-props .fx-seg-wrap { grid-column: 1 / -1; }
  .ai-body { grid-template-columns: 1fr; }
  .ai-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #1d1f26; scrollbar-width: none; }
  .ai-side button { flex-shrink: 0; }
  .ai-also { grid-template-columns: 1fr; }
  .mini-bar .hide-sm { display: none; }
}
