body {
    padding: 0;
    margin: 0;
  }

  main {
    display: flex;
    height: calc(100vh - 50px);
    overflow: hidden;
  }

  /* Split.js styles */
  .split {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .gutter {
    background-color: #e0e0e0;
    background-repeat: no-repeat;
    background-position: 50%;
    cursor: col-resize;
    position: relative;
  }

  .gutter:hover {
    background-color: #6200ee;
    transition: background-color 0.3s;
  }

  .gutter.gutter-horizontal {
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
  }

  canvas {
    border: 1px solid #ddd;
    max-width: 100%;
    margin-bottom: 15px;
  }

  .mdc-top-app-bar__row {
    height: 50px !important;
  }

  .mdc-top-app-bar--fixed-adjust {
    padding-top: 50px !important;
  }

  video {
    width: 100%;
    max-width: 100%;
    max-height: 60vh;
    margin-bottom: 10px;
    margin-right: auto;
    margin-left: auto;
    background: #000;
  }

  #videourl {
    margin-right: 130px;
  }

  #videowidth, #snapdelay{
    margin-bottom: 1rem;
    max-width: 84px;
    width: auto;
    padding: 0 4px;
  }
  #videowidth .mdc-floating-label,
  #snapdelay .mdc-floating-label{
    left: 4px;
  }
  #snapdelay{
    margin-left: 8px;
  }

  #videoInfo {
    background-color: #eee;
    display: none;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 13px;
  }

  main>div {
    padding: 20px 12px;
  }

  .select-source {
    padding: 12px;
  }
 .video-preview{
    text-align: center;
 }
  .instructions {
    padding: 12px;
    flex-wrap: wrap;
  }

  .toolbar-menu {
    color: #fff !important;
    padding-right: 12px;
  }

  .video_data {
    min-width: 300px;
  }

  .video_output {
    min-width: 300px;
  }

  .instructions ul {
    margin-bottom: -5px;
  }

  .play-controls{
    font-size: 28px !important;
  }

  .mdc-touch-target-wrapper {
    position: absolute;
    top: 22px;
    right: 12px;
  }

  .mdc-text-field--filled {
    background-color: #fff !important;
  }

  .mdc-text-field--filled:active {
    background-color: #fff !important;
  }

  .snap_photo_btn {
    margin-bottom: 7px;
    margin-left: 15px;
  }

  .buttons {
    display: flex;
  }

  .buttons h4 {
    padding-right: 15px;
    font-family: Roboto;
    font-weight: normal;
    color: rgba(0, 0, 0, 0.87);
  }

  .space {
    width: 20px;
  }

  .mdc-card{
    font-family: Roboto, sans-serif;
    padding: 8px;
    margin: 4px 0;
  }

  .snap_button {
    background: #6200ee;
    border: 0;
    border-radius: 4px;
    padding: 0 15px 2px;
    font-size: inherit;
    color: #fff;
    cursor: pointer;
    box-shadow: 0px 5px 3px -3px rgba(0, 0, 0, 0.50);
    height: 37px;
    margin: 10px 0;
  }

  .snap_button:hover {
    background: #8731ff;
    transition: all 0.3s;
  }

  .snap_button:active {
    background: #c49dff;
  }

  .canvas-container{
    margin-top:16px;
    text-align: center;
    position: relative;
    padding-bottom: 40px;
    box-sizing: border-box;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
  }
  #videoControls > div{
    margin: 8px 0;
  }
  #videoControls .button-container{
    text-align: center;
  }
  #videoControls button{
    font-size: 2em;
    border-radius: 5px;
    background-color: #eee;
    border: 1px solid #aaa;
    display: inline-flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  #videoControls button:hover{
    background-color: #ddd;
    transform: translateY(-1px);
  }
  
  #videoControls button:active{
    transform: translateY(0);
  }
  
  #slider{
    width: 100%;
  }
  #videoControls button > span{
    font-size: 16px;
  }

  #snap{
    margin: 0;
    width: 88px;
  }
  
  #snap2{
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    width: 130px;
  }
  #snap_each{
    border: 0px;
    background-color: #c49dff;
    border-radius: 0 .5rem .5rem 0;
    height: 36px;
    width: 94px;
    cursor: pointer;
  }

  .output-container{
    flex: 0 1 19%;
    position: relative;
  }
  
  .output {
    object-fit: contain;
    height: auto;
    width: 100%;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
  }
  
  .output:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
  
  .output-container label{
    font-size: 0.75em;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 3px;
    border-radius: 3px;
    position: absolute;
    right: 3px;
    bottom: 6px;
    max-width: 82%;
    pointer-events: none;
  }
  .output-remove{
    position: absolute;
    top: 4px;
    right: 3px;
    background: #dc3545;
    color: #fff;
    padding: 2px 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75em;
    opacity: 0;
    transition: opacity 0.2s;
    border: none;
    font-weight: bold;
  }
  
  .output-remove:hover{
    background: #c82333;
  }
  
  .output-container:hover .output-remove {
    opacity: 1;
  }
  
  #outputs{
    display: flex; 
    gap: 1%; 
    flex-wrap: wrap;
  }
  
  .output.selected {
    border-color: #6200ee;
    box-shadow: 0 0 0 2px rgba(98, 0, 238, 0.3);
  }
  
  /* Progress bar styles */
  .progress-container {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid #e0e0e0;
  }
  
  .progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
  }
  
  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6200ee, #8731ff);
    transition: width 0.3s ease;
    width: 0%;
  }
  
  .progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-bottom: 8px;
  }
  
  @media (max-width:1166px){
    #videoControls button {
        font-size: 24px;
    }
  }
  
  @media (max-width:1023px){
    main{
      flex-direction: column;
      height: auto;
    }
    .video_data{
      width: 100% !important;
    }
    .video_output{
      width: 100% !important;
    }
    video{
      max-height: 50vh;
    }
    .canvas-container {
      max-height: 500px;
    }
    .gutter {
      display: none;
    }
  }
  @media (max-width:600px){
    #videoControls button {
      font-size: 20px;
    }
  }
  @media (max-width:480px){
    #snap{
      width: 80px;
      height: 54px;
    }
    #snap2{
      width: 85px;
      height: 54px;
    }
    #snap_each{
      height: 54px;
      width: 64px;
    }
    #videoControls > div{
      display: flex;
      justify-content: space-between;
    }
    #videoControls button {
      font-size: 3vw ;
      padding: 4px 4px;
    }
    #videoControls button > span{
      display: block;
      text-align: center;
      font-size: 3vw;
    }
    .play-controls{
      font-size: 5vw !important;
    }
    .output-container{
      flex: 0 1 31%;
    }
    #outputs{
      gap: 3px; 
    }
    .output-container label{
      font-size: 3vw;
    }  
  }
