.video-to-gif-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 18px 46px;
  color: var(--text);
}
.video-to-gif-page * {
  box-sizing: border-box;
}
.video-to-gif-page h1 {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  text-shadow: 0 0 24px rgba(255, 90, 170, .22);
}
.vtg-intro {
  max-width: 850px;
  margin: 0 auto 24px;
  text-align: center;
  color: #c9c9d6;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
}
.vtg-upload {
  margin: 0 auto 18px;
  padding: 20px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 90, 170, .10), rgba(90, 210, 255, .08)),
    var(--content);
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
}
.vtg-upload.vtg-dragover {
  border-color: var(--link);
  box-shadow: 0 0 0 4px rgba(120, 90, 255, .14), 0 16px 38px rgba(0,0,0,.22);
}
.vtg-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff5aac, #6ad7ff);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.vtg-upload-label:hover {
  filter: brightness(1.08);
}
.vtg-upload input {
  display: none;
}
.vtg-upload p {
  margin: 12px 0 0;
  color: #aaaabd;
  font-size: 14px;
}
.vtg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.vtg-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.vtg-panel,
.vtg-section {
  background: var(--content);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
}
.vtg-panel {
  padding: 16px;
}
.vtg-section {
  margin-top: 22px;
  padding: 18px;
}
.vtg-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.vtg-panel-head h2,
.vtg-section h2 {
  margin: 0;
  color: var(--link);
}
.vtg-panel-head h2 {
  font-size: 20px;
}
.vtg-panel-head span {
  color: #aaaabd;
  font-size: 13px;
  white-space: nowrap;
}
.vtg-video-wrap,
.vtg-result-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 330px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.035) 75%),
    rgba(0,0,0,.26);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
}
.vtg-video-wrap video,
.vtg-result-wrap img {
  display: block;
  max-width: 100%;
  max-height: 330px;
  border-radius: 10px;
}

.vtg-empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #bdbdcc;
  text-align: center;
  padding: 20px;
}
.vtg-empty-preview i {
  font-size: 34px;
  color: var(--link);
  opacity: .85;
}


.vtg-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.vtg-time-field {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
}
.vtg-time-field span {
  color: #9fb2c8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
}
.vtg-time-field input {
  width: 70px;
  min-height: 30px;
  padding: 0 6px;
  color: var(--text);
  text-align: center;
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  outline: none;
}
.vtg-time-field input:focus {
  border-color: rgba(120,180,255,.55);
  box-shadow: 0 0 0 3px rgba(120,180,255,.13);
}
.vtg-time-field button,
.vtg-timeline > button {
  color: #fff;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
}
.vtg-time-field button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
}
.vtg-timeline > button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
}
.vtg-time-field button:hover,
.vtg-timeline > button:hover {
  background: rgba(255,255,255,.14);
}
.vtg-timeline > button.vtg-looping {
  background: linear-gradient(135deg,#19c37d,#6ad7ff);
}



.vtg-control-grid label {
  display: grid;
  gap: 6px;
  color: #d8d8e6;
  font-size: 13px;
  font-weight: 700;
}
.vtg-control-grid input,
.vtg-control-grid select {
  width: 100%;
  min-height: 30px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  outline: none;
}
.vtg-control-grid input[type="range"] {
  padding: 0;
  accent-color: var(--link);
}
.vtg-control-grid input:focus,
.vtg-control-grid select:focus {
  border-color: rgba(120,180,255,.55);
  box-shadow: 0 0 0 3px rgba(120,180,255,.13);
}
.vtg-time-field {
  flex: 1 1 calc(50% - 8px);
}
.vtg-timeline > button {
  flex: 1 1 calc(50% - 8px);
}




.vtg-control-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}
.vtg-control-card,
.vtg-mini-field,
.vtg-crop-card {
  min-height: 54px;
  padding: 8px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
}
.vtg-wide {
  grid-column: span 3;
}
.vtg-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.vtg-control-head span,
.vtg-mini-field span,
.vtg-crop-card span {
  color: #aebed4;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .45px;
  text-transform: uppercase;
}
.vtg-control-head b {
  color: #9fe7ff;
  font-size: 12px;
}
.vtg-mini-field {
  display: grid;
  gap: 5px;
}
.vtg-mini-field input,
.vtg-mini-field select,
.vtg-crop-card input {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  color: var(--text);
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 9px;
  outline: none;
}

.vtg-mini-field select{
  color:#dff5ff;
  background:#1a2230;
  border:1px solid rgba(106,215,255,.22);
}
.vtg-mini-field select:hover{
  background:#202b3b;
}
.vtg-mini-field select:focus{
  background:#243246;
  border-color:#6ad7ff;
}

.vtg-control-card input[type="range"] {
  width: 100%;
  padding: 0;
  accent-color: var(--link);
}
.vtg-mini-field input:focus,
.vtg-mini-field select:focus,
.vtg-crop-card input:focus {
  border-color: rgba(120,180,255,.55);
  box-shadow: 0 0 0 3px rgba(120,180,255,.13);
}
.vtg-crop-card {
  grid-column: span 6;
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 7px;
}
.vtg-crop-card input {
  min-width: 0;
  text-align: center;
}
@media (max-width: 900px) {
  .vtg-control-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vtg-wide {
    grid-column: span 2;
  }

  .vtg-crop-card {
    grid-column: span 4;
  }
}
@media (max-width: 560px) {
  .vtg-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vtg-wide,
  .vtg-crop-card {
    grid-column: span 2;
  }

  .vtg-crop-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vtg-crop-card span {
    grid-column: span 4;
  }
}





#vtgGifPreview[src] {
  display: block;
}
#vtgGifPreview:not([src]) {
  display: none;
}

#vtgVideo {
  display: none !important;
}
#vtgPreviewCanvas {
  display: block;
  width: 100%;
  height: 330px;
  max-height: 330px;
  background: #000;
  border-radius: 10px;
  cursor: pointer;
  object-fit: contain;
}
@media (max-width: 560px) {
  #vtgPreviewCanvas {
    height: 240px;
    max-height: 240px;
  }
}



.vtg-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.vtg-presets button {
  min-height: 38px;
  color: #dfefff;
  font-weight: 800;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
}
.vtg-presets button:hover {
  border-color: rgba(120,210,255,.45);
  background: rgba(120,210,255,.12);
}
.vtg-progress {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
}
#vtgProgressBar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff5aac, #6ad7ff);
  transition: width .18s ease;
}
@media (max-width: 700px) {
  .vtg-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.vtg-actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.15fr .8fr;
  gap: 10px;
  margin-top: 14px;
}
.vtg-actions button {
  min-height: 44px;
  padding: 0 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}
.vtg-actions button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.vtg-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
  box-shadow: none;
}
.vtg-action-soft {
  background: rgba(255,255,255,.10);
}
.vtg-action-primary {
  background: linear-gradient(135deg,#ff5aac,#7c5cff);
}
.vtg-action-download {
  background: linear-gradient(135deg,#19c37d,#6ad7ff);
}
.vtg-action-danger {
  background: linear-gradient(135deg,#ff4d6d,#c9184a);
}
@media (max-width: 760px) {
  .vtg-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .vtg-actions {
    grid-template-columns: 1fr;
  }
}

.vtg-video-wrap {
  position: relative;
}


#vtgVideo{
  display:none;
}
#vtgPreviewCanvas{
  display:block;
  width:100%;
  max-width:100%;
  min-height:260px;
  background:#000;
  border-radius:10px;
  cursor:pointer;
}









.vtg-section{
  margin-top:24px;
  padding:20px 22px;
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.12);
}

.vtg-section h2{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 16px;
  color:#fff;
  font-size:24px;
  font-weight:900;
  letter-spacing:.3px;
}

.vtg-section h2 i{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  color:#8de8ff;
  font-size:18px;
  background:linear-gradient(135deg,#23364b,#162331);
  border:1px solid rgba(106,215,255,.18);
  border-radius:12px;
}

.vtg-section p{
  margin:0 0 18px;
  color:#c9d5e4;
  font-size:15px;
  line-height:1.75;
}

.vtg-section ul{
  display:grid;
  gap:10px;
  margin:0;
  padding:0;
  list-style:none;
}

.vtg-section li{
  position:relative;
  padding:10px 14px 10px 42px;
  color:#dbe6f2;
  line-height:1.6;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  transition:.18s;
}

.vtg-section li:hover{
  background:rgba(255,255,255,.055);
  border-color:rgba(106,215,255,.18);
  transform:translateX(3px);
}

.vtg-section li::before{
  content:"✓";
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  display:grid;
  place-items:center;
  width:18px;
  height:18px;
  color:#07131d;
  font-size:11px;
  font-weight:900;
  background:linear-gradient(135deg,#6ad7ff,#8cf0d6);
  border-radius:50%;
}

.vtg-section strong{
  color:#fff;
  font-weight:800;
}

@media(max-width:700px){
  .vtg-section{
    padding:18px;
  }

  .vtg-section h2{
    font-size:21px;
  }

  .vtg-section li{
    padding:10px 12px 10px 38px;
  }
}
