@font-face {
    font-family: "Quicksand";
    src: url("../fonts/Quicksand-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

 body {
            font-family: Arial, sans-serif;
            text-align: center;
            background-color: #222;
            color: white;
        }
        .videomaincontainer {
            display: flex;
            justify-content: center;
            margin-top: 30px;
            
        }
        #video {
            max-width:700px;
            max-height:700px;
            overflow: hidden;
            border-radius: 15px;
            /* max-height:calc(100vh - 330px); */
            /* max-height:calc(100% - 80px); */
            
        }
        canvas {
            position: absolute;
            top: -10px;
            left: 0;
            width: 80%;
            max-width: 800px;
            pointer-events: none;
        }
        #controls {
            margin-top: 20px;
            padding: 10px;
            /* background: #333; */
            color: #333;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            max-width: 400px;
        }
        #controls label {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .videocontainer {
            position:relative;
            border-radius: 15px;
            overflow: hidden;
        }

        #controls span {
            width: 40px;
        }

        #corrections {
            position: absolute;
            top: 0;
            left: 0;
            
            width: 100%;
            justify-content: center;
            display: flex;
        }

        .corrections {
            height: 55px;
            color: rgb(1, 1, 5);
            margin-top: 10px;
            width: calc(100% - 20px);
            box-sizing: border-box;
            border-radius: 7px;
            padding: 9px;
            font-family: sans-serif;
            font-size: 15px;
            opacity: 1;
            resize: none;
            font-weight: 300;
            background-color: rgba(252, 245, 255, 0.8);
        }

        .corrections:focus {
            border: none;
            outline: none;
        }



        .container { max-width: 100%; margin: auto; 
            min-height: 100px;
        }
              video { width: 100%; display: block; margin-bottom: 20px; }
              .controls { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 10px; }
              .timeline { height: 50px;position: relative;background: #edeef3;}
              .timeline-container { 
                  position: relative; width: 100%;  margin-top: 10px; 
                  border-radius: 10px;
                  padding-left: 3px;
                 /* overflow-x: auto;*/
              }

              .timeline-main-container {
                /* padding: 0 7px; */
              }
              .timeline-blocs { position: relative; height: 100%; display: flex; align-items: center; transition: width 0.2s;}
              .subtitle-block { position: absolute; height: 30px; background: rgba(0, 0, 255, 0.5); cursor: grab; border-radius: 5px; overflow: hidden; display: flex; align-items: center;transition: width 0.5s;}
              .handle { 
                  position: absolute;
                  width: 1px;
                  height: 77%;
                  background: #ffffff;
                  cursor: ew-resize;
                  opacity: .7;
              }
              .handle-left { left: 3px; }
              .handle-right { right: 3px; }
                     .cursor { 
                  position: absolute;
                   top: 0; 
                  width: 3px;
                  height: 60px;
                  background: red;
                  bottom: 0;
                  opacity: 0.3;
                  border-radius: 2px;
                  /*transition: left 1s;*/
              }
                   .cursor.dragged {
                  transition: left 0s;  
               }
                    #timeline-main-container{
                  overflow-y: hidden;
                  position: relative;
                  height: 75px
              }
              .cursor svg {
              position: absolute;
              transform: translateX(calc(-50% + 0.5px)) translateY(-15px);
              fill: red;
          }
              .zoom-slider {width: 200px;}








.subtitle-style-panel {
  font-family: "Quicksand", sans-serif;
  max-width: 800px;
  margin: auto;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sbt-selector-block {
  margin-bottom: 2rem;
}

.sbt-selector {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
}

.controls-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.control {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
}

.control label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.control input[type="range"],
.control input[type="color"],
.control input[type="text"],
.control select {
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
}

.control span {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: #555;
}

.control.checkboxes label {
  display: inline-block;
  margin-right: 1rem;
  font-weight: normal;
}

.action-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.action-buttons button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: bold;
  background-color: #0062ff;
  color: white;
  transition: background 0.3s ease;
}

.action-buttons button:hover {
  background-color: #004ecc;
}

.action-buttons button:not(.primary) {
  background-color: #e2e8f0;
  color: #333;
}

.subtitle-style-panel--v2,
.subtitle-style-panel--v2 * {
  box-sizing: border-box;
}

.subtitle-style-panel--v2 {
  --ns-panel-accent: #6d5dfc;
  --ns-panel-accent-dark: #5444ed;
  --ns-panel-ink: #171629;
  --ns-panel-muted: #6e6b80;
  --ns-panel-line: #e8e6f0;
  --ns-panel-soft: #f6f5fb;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  color: var(--ns-panel-ink);
  text-align: left;
  background:
    radial-gradient(circle at top right, rgba(109, 93, 252, 0.1), transparent 35%),
    #fff;
  border: 1px solid rgba(23, 22, 41, 0.08);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(27, 24, 55, 0.1);
}

.subtitle-style-panel--v2 .subtitle-style-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ns-panel-line);
}

.subtitle-style-panel--v2 .subtitle-style-panel__eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ns-panel-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subtitle-style-panel--v2 h2 {
  margin: 0;
  color: var(--ns-panel-ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}

.subtitle-style-panel--v2 p {
  margin: 0.4rem 0 0;
  color: var(--ns-panel-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.subtitle-style-panel--v2 .subtitle-style-panel__count {
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem;
  color: var(--ns-panel-accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(109, 93, 252, 0.1);
  border: 1px solid rgba(109, 93, 252, 0.15);
  border-radius: 999px;
}

.subtitle-style-panel--v2 .sbt-selector-block {
  margin: 1.5rem 0 1.75rem;
  padding: 1rem;
  background: var(--ns-panel-soft);
  border: 1px solid var(--ns-panel-line);
  border-radius: 16px;
}

.subtitle-style-panel--v2 .subtitle-style-panel__section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.subtitle-style-panel--v2 .subtitle-style-panel__section-heading--controls {
  margin: 0 0 1rem;
}

.subtitle-style-panel--v2 .subtitle-style-panel__section-heading label,
.subtitle-style-panel--v2 .subtitle-style-panel__section-title {
  display: block;
  margin: 0;
  color: var(--ns-panel-ink);
  font-size: 0.95rem;
  font-weight: 750;
}

.subtitle-style-panel--v2 .subtitle-style-panel__section-heading p {
  margin-top: 0.2rem;
  font-size: 0.78rem;
}

.subtitle-style-panel--v2 .sbt-selector {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 2.5rem 0.65rem 0.8rem;
  color: var(--ns-panel-ink);
  font-size: 0.85rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  background-color: #fff;
  border: 1px solid #dcd9e8;
  border-radius: 11px;
}

.subtitle-style-panel--v2 .sbt-selector:disabled {
  color: var(--ns-panel-muted);
  background: #efedf5;
  cursor: not-allowed;
}

.subtitle-style-panel--v2 .sbt-import-status {
  margin: 0.5rem 0 0;
  color: var(--ns-panel-accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.subtitle-style-panel--v2 .sbt-import-status:empty {
  display: none;
}

.subtitle-style-panel--v2 #controls.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: var(--ns-panel-ink);
}

.subtitle-style-panel--v2 #controls .control {
  min-width: 0;
  padding: 0.9rem;
  background: #fff;
  border: 1px solid var(--ns-panel-line);
  border-radius: 14px;
}

.subtitle-style-panel--v2 #controls .control--wide {
  grid-column: 1 / -1;
}

.subtitle-style-panel--v2 #controls .control > label,
.subtitle-style-panel--v2 #controls .control > legend {
  display: block;
  margin: 0 0 0.65rem;
  padding: 0;
  color: #464356;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.3;
}

.subtitle-style-panel--v2 #controls .control input[type="text"],
.subtitle-style-panel--v2 #controls .control select {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.7rem;
  color: var(--ns-panel-ink);
  font: inherit;
  background: var(--ns-panel-soft);
  border: 1px solid transparent;
  border-radius: 10px;
}

.subtitle-style-panel--v2 #controls .control input[type="text"]::placeholder {
  color: #9692a5;
}

.subtitle-style-panel--v2 #controls .control__range-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  align-items: center;
  gap: 0.75rem;
}

.subtitle-style-panel--v2 #controls input[type="range"] {
  width: 100%;
  margin: 0;
  padding: 0;
  accent-color: var(--ns-panel-accent);
}

.subtitle-style-panel--v2 #controls .control__range-field output {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.45rem;
  color: #555166;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  background: var(--ns-panel-soft);
  border-radius: 8px;
}

.subtitle-style-panel--v2 #controls .control__color-field {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 42px;
  padding: 0.35rem 0.55rem;
  background: var(--ns-panel-soft);
  border-radius: 10px;
}

.subtitle-style-panel--v2 #controls input[type="color"] {
  width: 34px;
  height: 30px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.subtitle-style-panel--v2 #controls .control__color-field span {
  width: auto;
  color: #555166;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.subtitle-style-panel--v2 #controls .control__toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}

.subtitle-style-panel--v2 #controls .control__toggles legend {
  width: 100%;
}

.subtitle-style-panel--v2 #controls .control__toggles label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.5rem 0.7rem;
  color: #555166;
  font-size: 0.78rem;
  font-weight: 650;
  background: var(--ns-panel-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

.subtitle-style-panel--v2 #controls .control__toggles label:has(input:checked) {
  color: var(--ns-panel-accent-dark);
  background: rgba(109, 93, 252, 0.1);
  border-color: rgba(109, 93, 252, 0.2);
}

.subtitle-style-panel--v2 #controls .control__toggles input {
  margin: 0;
  accent-color: var(--ns-panel-accent);
}

.subtitle-style-panel--v2 .action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ns-panel-line);
}

.subtitle-style-panel--v2 .neural-sub-button,
.subtitle-style-panel--v2 .action-buttons .neural-sub-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 0.65rem 1rem;
  color: #4f4b61;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  background: var(--ns-panel-soft);
  border: 1px solid var(--ns-panel-line);
  border-radius: 10px;
  box-shadow: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.subtitle-style-panel--v2 .neural-sub-button:hover {
  color: var(--ns-panel-ink);
  background: #eeecf7;
  border-color: #d9d5e8;
  transform: translateY(-1px);
}

.subtitle-style-panel--v2 .neural-sub-button--primary,
.subtitle-style-panel--v2 .action-buttons .neural-sub-button--primary {
  color: #fff;
  background: var(--ns-panel-ink);
  border-color: var(--ns-panel-ink);
}

.subtitle-style-panel--v2 .neural-sub-button--accent,
.subtitle-style-panel--v2 .action-buttons .neural-sub-button--accent {
  color: #fff;
  background: var(--ns-panel-accent);
  border-color: var(--ns-panel-accent);
}

.subtitle-style-panel--v2 .neural-sub-button--primary:hover,
.subtitle-style-panel--v2 .neural-sub-button--accent:hover {
  color: #fff;
  background: var(--ns-panel-accent-dark);
  border-color: var(--ns-panel-accent-dark);
}

.subtitle-style-panel--v2 input:focus-visible,
.subtitle-style-panel--v2 select:focus-visible,
.subtitle-style-panel--v2 button:focus-visible,
.subtitle-style-panel--v2 a:focus-visible {
  outline: 3px solid rgba(109, 93, 252, 0.25);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .subtitle-style-panel--v2 {
    border-radius: 18px;
  }

  .subtitle-style-panel--v2 .subtitle-style-panel__header,
  .subtitle-style-panel--v2 .subtitle-style-panel__section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .subtitle-style-panel--v2 .subtitle-style-panel__count {
    align-self: flex-start;
  }

  .subtitle-style-panel--v2 #controls.controls-grid {
    grid-template-columns: 1fr;
  }

  .subtitle-style-panel--v2 #controls .control--wide {
    grid-column: auto;
  }

  .subtitle-style-panel--v2 .action-buttons .neural-sub-button {
    width: 100%;
  }
}

















/* TIMELINE */

.subtitle-text {
    font-size: 11px;
    line-height: 10px;
    white-space: nowrap;
    width: calc(100% - 0px);
    padding: 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    opacity: .8;
    font-weight: 500;
}

.subtitle-block {
    padding: 5px;
}




/* PROGRESS BAR */

#progress-bar {
    border-radius: 10px;
}
