.vgdiv{
    margin-top: 0.75rem;
}
.vg-lf{
    width: calc(100% - 20rem);
    display: inline-block;
    float: left;
    border: 1px solid #e8e8fd;
}
.night .vg-lf{
    border: 1px solid #444;
}
.vg-lr{
    width: 20rem;
    display: inline-block;
    float: right;
    padding-left: 0.75rem;
}
.vg-lr>div{
    border: 1px solid #e8e8fd;
    padding: 0.25rem;
    border-radius: 3px;
}
.night .vg-lr>div{
    border: 1px solid #444;
}
.vgsetup{
    border: 1px solid #e8e8fd;
    margin-bottom: 0.25rem;
    padding: 0.5rem;
    border-radius: 3px;
    position: relative;
}
.night .vgsetup{
    border: 1px solid #444;
}
.vgsetup .txtop{
    height: 1.2rem;
    line-height: 1.2rem;
    margin-bottom: 0.5rem;
}
.night .vgsetup .txtop{
    color:#aaa;
}
.vgsetup .txtop span{
    font-size: 0.6rem;
    float: right;
}
.vgbuts>div{
    width: 50%;
    float: left;
    display: inline-block;
    text-align: center;
    padding: 0.25rem;
}
.vgbuts>div span{
    height: 1.8rem;
    line-height: 1.8rem;
    display: block;
    border: 1px solid #e8e8fd;
    border-radius: 3px;
    cursor: pointer;
}
.night .vgbuts>div span{
    border: 1px solid #444;
    color: #aaa;
}
#setStartBtn,#setEndBtn,.night #setStartBtn,.night #setEndBtn{
    background-color: #06b672;
    border: 1px solid #06b672;
    color: #fff;
}
#gifzhiliang{
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
}
.subtitle {
    color: #a0b3d6;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}
.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
@media (max-width: 1000px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}
.video-section {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.preview-container {
    position: relative;
    background: black;
    border-radius: 3px;
    overflow: hidden;
}
.video-container {
    position: relative;
    overflow: hidden;
    height: 17rem;
}
#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
#cropOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}
#cropRect {
    position: absolute;
    border: 2px solid #4cc9f0;
    background: rgba(76, 201, 240, 0.2);
    cursor: move;
    display: none;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.6);
}
.controls-container {
    background: rgba(0, 0, 0, 0.7);
    border-top: 1px solid #2c3a5c;
}
.custom-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.custom-controls button {
    background: none;
    border: none;
    color: #a0b4d6;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.custom-controls button:hover {
    background: rgba(72, 149, 239, 0.2);
}
.progress-container {
    flex: 1;
    height: 0.3rem;
    background: #1d2b4e;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}
#videoProgress {
    height: 100%;
    background: linear-gradient(90deg, #4895ef, #4cc9f0);
    width: 0%;
    border-radius: 3px;
}
.time-display {
    font-size: 0.6rem;
    color: #a0b3d6;
    min-width: 5rem;
    text-align: center;
    font-family: monospace;
}
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}
.output-section {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}
.section-title {
    font-size: 1.5rem;
    color: #4895ef;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c3a5c;
}
.gif-preview {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0d1429, #141e3c);
    border-radius: 12px;
    overflow: hidden;
    min-height: 300px;
    margin-bottom: 20px;
    border: 2px dashed #2c3a5c;
}
.gif-preview img {
    max-width: 100%;
    max-height: 100%;
    display: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}
.placeholder {
    color: #5a6b92;
    text-align: center;
    padding: 30px;
    font-size: 1.1rem;
}
.conversion-controls {
    margin-top: auto;
}
.progress-container-bar {
    height: 12px;
    background: #1d2b4e;
    border-radius: 6px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
#conversionProgress {
    height: 100%;
    background: linear-gradient(90deg,#4895ef, #4cc9f0);
    width: 0%;
    transition: width 0.3s;
}
.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #4cc9f0;
    border-radius: 50%;
    z-index: 10;
}
.handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.selection-instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: none;
}
.vgsetup{

}
.resgif{
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #e8e8fd;
    border-radius: 3px;
    margin-top: 0.75rem;
    display: none;
}
.night .resgif{
    border: 1px solid #444;
}
.gifloads{
    font-size: 0.6rem;
    color: #06b672;
}
.gifloads i{
    margin-right: 0.25rem;
    font-size: 0.6rem;
}
.resimgdisplay img{
    max-width: 100%;
}
.resimgdisplay span{
    height: 1.8rem;
    line-height: 1.8rem;
    display: inline-block;
    padding: 0 1.5rem;
    border: 1px solid #e8e8fd;
    margin: 0.75rem 0 0.5rem 0;
    cursor: pointer;
}
.night .resimgdisplay span{
    border: 1px solid #444;
    color: #aaa;
}
.novidemtip{
    position: absolute;
    width: 100%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #aaa;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    font-size: 1rem;
}
@media screen and (max-width: 1180px){
    .vg-lf{
        width: 100%;
    }
    .vg-lr{
        width: 100%;
        padding-left:0;
    }
}