.gif-frame-viewer-page{
  max-width:1320px;
  margin:0 auto;
  padding:34px 18px 46px;
  color:var(--text);
}
.gif-frame-viewer-page *{
  box-sizing:border-box;
}
.gif-frame-viewer-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(120,90,255,.22);
}
.gfv-intro{
  max-width:900px;
  margin:0 auto 24px;
  text-align:center;
  color:#c9c9d6;
  font-size:clamp(15px,2vw,18px);
  line-height:1.6;
}
.gfv-upload{
  position:relative;
  margin:0 auto 22px;
  padding:24px 18px;
  text-align:center;
  border:2px dashed rgba(255,255,255,.16);
  border-radius:20px;
  background:linear-gradient(135deg,rgba(125,91,255,.12),rgba(0,210,255,.08));
  cursor:pointer;
  transition:.2s ease;
}
.gfv-upload:hover,.gfv-upload.gfv-dragover{
  border-color:var(--link);
  box-shadow:0 0 28px rgba(120,90,255,.18);
  transform:translateY(-1px);
}
.gfv-upload-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:18px;
  font-weight:800;
  color:#fff;
  cursor:pointer;
}
.gfv-upload input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}
.gfv-upload p{
  margin:10px 0 0;
  color:#bfc0cc;
}
.gfv-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:18px;
  align-items:start;
}
.gfv-main{
  display:grid;
  gap:18px;
}
.gfv-panel,.gfv-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);
}
.gfv-panel{
  padding:16px;
}
.gfv-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.gfv-panel-head h2{
  margin:0;
  color:var(--link);
  font-size:20px;
}
.gfv-view-tools{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.gfv-view-tools button{
  width:36px;
  height:34px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  transition:.18s ease;
}
.gfv-view-tools button:hover{
  background:rgba(255,255,255,.12);
  transform:translateY(-1px);
}
#gfvZoomValue{
  min-width:54px;
  text-align:center;
  color:#d7d7e6;
  font-weight:700;
}



.gfv-canvas-wrap{
  position:relative;
  width:100%;
  height:clamp(320px,58vh,620px);
  overflow:auto;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(45deg,rgba(255,255,255,.045) 25%,transparent 25%),
    linear-gradient(-45deg,rgba(255,255,255,.045) 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,rgba(255,255,255,.045) 75%),
    linear-gradient(-45deg,transparent 75%,rgba(255,255,255,.045) 75%);
  background-size:22px 22px;
  background-position:0 0,0 11px,11px -11px,-11px 0;
}
.gfv-canvas-stage{
  position:relative;
  min-width:100%;
  min-height:100%;
}
.gfv-canvas-wrap.gfv-no-grid{
  background:rgba(0,0,0,.18);
}
.gfv-canvas-wrap canvas{
  position:absolute;
  max-width:none;
  max-height:none;
  image-rendering:auto;
}
#gfvOnionCanvas{
  opacity:.35;
  pointer-events:none;
  z-index:1;
}
#gfvMainCanvas{
  z-index:2;
}


.gfv-layout,
.gfv-main,
.gfv-panel,
.gfv-canvas-wrap{
  min-width:0;
  max-width:100%;
}
.gfv-panel{
  overflow:hidden;
}
.gfv-canvas-wrap{
  overflow:auto;
  contain:layout paint;
  overscroll-behavior:contain;
}
.gfv-canvas-stage{
  max-width:none;
}



.gfv-empty-preview{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:#bfc0cc;
  text-align:center;
  pointer-events:none;
}
.gfv-empty-preview i{
  font-size:42px;
  color:var(--link);
  opacity:.9;
}
.gfv-timeline-box{
  margin-top:14px;
  padding:12px;
  border-radius:15px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.075);
}
.gfv-timeline-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  color:#d9d9e7;
}
.gfv-timeline-head span{
  color:#bfc0cc;
  font-weight:700;
}
#gfvTimeline{
  width:100%;
}
.gfv-frame-strip{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:10px 2px 2px;
}
.gfv-frame-thumb{
  width:58px;
  height:58px;
  flex:0 0 auto;
  border-radius:10px;
  border:2px solid transparent;
  background:rgba(255,255,255,.06);
  cursor:pointer;
  overflow:hidden;
}
.gfv-frame-thumb.gfv-active{
  border-color:var(--link);
  box-shadow:0 0 18px rgba(120,90,255,.24);
}
.gfv-controls{
  position:sticky;
  top:14px;
}
.gfv-meta-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.gfv-meta-grid div{
  min-width:0;
  padding:11px;
  border-radius:13px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.07);
}
.gfv-meta-grid span{
  display:block;
  margin-bottom:5px;
  color:#9fa0ad;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.gfv-meta-grid b{
  display:block;
  overflow:hidden;
  color:#fff;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.gfv-control-group{
  display:grid;
  gap:13px;
  margin-top:16px;
}
.gfv-control-group label{
  display:grid;
  gap:7px;
  color:#d5d5e2;
  font-weight:700;
}
.gfv-control-group select,.gfv-control-group input[type="number"],.gfv-compare-head input{
  width:100%;
  min-height:38px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:11px;
  background:#11131d;
  color:#fff;
  padding:0 10px;
  outline:none;
}
.gfv-control-group select:focus,.gfv-compare-head input:focus{
  border-color:var(--link);
  box-shadow:0 0 0 3px rgba(120,90,255,.14);
}
.gfv-control-group select option{
  background:#11131d;
  color:#fff;
}
.gfv-check{
  display:flex!important;
  grid-template-columns:none!important;
  align-items:center;
  gap:8px!important;
  color:#d5d5e2;
  cursor:pointer;
}
.gfv-check input{
  accent-color:var(--link);
}
#gfvOnionOpacity{
  width:100%;
}
#gfvOnionOpacityValue{
  color:#bfc0cc;
  font-weight:700;
}
.gfv-actions{
  display:grid;
  gap:9px;
  margin-top:16px;
}
.gfv-actions button{
  min-height:42px;
  border:0;
  border-radius:12px;
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition:.18s ease;
}
.gfv-actions button:hover{
  transform:translateY(-1px);
  filter:brightness(1.08);
}
.gfv-action-download{
  background:linear-gradient(135deg,#16b86a,#0f8f56);
}
.gfv-action-soft{
  background:linear-gradient(135deg,#5962ff,#7b4dff);
}
.gfv-action-danger{
  background:linear-gradient(135deg,#d04b5b,#9b2333);
}
.gfv-status{
  margin-top:14px;
  padding:11px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.045);
  color:#cfd0dc;
  border:1px solid rgba(255,255,255,.07);
  line-height:1.45;
}
.gfv-compare-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.gfv-compare-card{
  min-width:0;
  padding:12px;
  border-radius:15px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.075);
  overflow:auto;
}
.gfv-compare-head{
  display:grid;
  grid-template-columns:1fr 90px;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}
.gfv-compare-head span{
  color:#d8d8e6;
  font-weight:800;
}
.gfv-compare-card canvas{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:360px;
  margin:0 auto;
  border-radius:12px;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.07);
}
.gfv-section{
  margin-top:22px;
  padding:18px;
}
.gfv-section h2{
  margin:0 0 12px;
  color:var(--link);
}
.gfv-section ul{
  margin:0;
  padding-left:22px;
}
.gfv-section li{
  margin-bottom:8px;
  color:#c9c9d6;
  line-height:1.55;
}
@media(max-width:1050px){
  .gfv-layout{
    grid-template-columns:1fr;
  }
  .gfv-controls{
    position:static;
  }
}
@media(max-width:720px){
  .gif-frame-viewer-page{
    padding:28px 12px 40px;
  }
  .gfv-panel{
    padding:12px;
  }
  .gfv-panel-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .gfv-view-tools{
    justify-content:flex-start;
  }
  .gfv-canvas-wrap{
    min-height:310px;
  }
  .gfv-meta-grid,.gfv-compare-grid{
    grid-template-columns:1fr;
  }
}
