body {
    min-height: 100%;
    padding: 2em 2em;

    background-color: #fff;
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}
.video-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 940px;
    margin: 0 auto;
}
.video-item {
    flex: 1;
    max-width: 50%;
}
.video-item video {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}
@media (max-width: 768px) {
    .video-container {
        flex-direction: column;
    }
    .video-item {
        max-width: 100%;
    }
}

.section {
    display: block;
    max-width: 940px;
    margin: 0 auto;
}

.carousel-container {
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
    overflow-x: auto;
    white-space: nowrap;
}
.carousel-container .carousel-item video {
    width: 320px;
    height: 180px;
    object-fit: cover;
}

.carousel-item {
    display: inline-block;
}
.carousel-item.show {
    display: block;
  }
  
.carousel-item:not(.show) {
display: none;
}
.click-and-move-overlay {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none; /* Allows clicking through to the iframe */
    text-align: center; /* Centers the text horizontally */
}

.click-and-move-overlay .tldr {
    margin: 0;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.7); /* Semi-transparent background */
    border-radius: 5px;
    font-size: 14px; /* Adjust as needed */
    text-wrap: nowrap;
}

.click-and-move-overlay .inline-image {
    height: 20px;
    vertical-align: middle;
}

/* New styles for centering and consistency */
.video-carousel-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0px;
    margin-bottom: 20px;
}

.container hr {
    flex-basis: 100%; height: 0; margin: 0; border: 0;
    page-break-after: always; /* CSS 2.1 syntax */
    break-after: always; /* CSS 3 syntax */
    width: 100%;
}

.iframe-container {
    position: relative;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1); /* Uniform shadow in all directions */
    height: 600px;
    border-radius: 20px;
    width: 97%;
    overflow: hidden;
    margin: 10px auto; /* Center the container and add vertical space */
}
@media (max-width: 768px) {
    .iframe-container {
        height: 400px;
    }
}

.iframe-container .iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
iframe.show {
    display: block;
  }
  
iframe:not(.show) {
display: none;
}

.title {
    margin-top: 0px;
    margin-bottom: 0px;
    font-family: 'Montserrat',sans-serif;
    color: #4d4d4d;
    font-size: 60px;
    line-height: 80px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
}

.subheader {
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 32px;
    line-height: 48px;
    font-weight: 500;
    letter-spacing: 0;
    text-align: center;
}

.tldr {
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: 0;
    display: block;
    width: 100%;
}

.title-row {
    margin-top: 20px;
}

.base-row {
    display: flex;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
}

.base-col {
    position: relative;
    min-height: 1px;
    padding-left: 0px;
    padding-right: 0px;
    width: 100%;
}

.author-text {
    font-family: 'Open Sans',sans-serif;
    color: #488af3;
    font-size: 20px;
    font-weight: 400;
    text-decoration: none;
    text-wrap: nowrap;
    line-height: 32px;
}

.text-star {
    position: relative;
    top: -7px;
    display: inline-block;
    margin: 0px;
    font-size: 10px;
}

#uc-berkeley {
    padding-top: 10px;
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 20px;
    font-weight: 400;
    margin: 0px;
    letter-spacing: 0;
}

#equal-contrib {
    padding-top: 10px;
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
}

.icon-col {
    width: 33.3%;
}

.icon-img {
    margin-right: auto;
    margin-bottom: 1px;
    margin-left: auto;
    padding-top: 0px;
}

.link-labels {
    width: 60%;
    margin-top: 5px;
}

.link-block {
    display: inline-block;
    max-width: 33%;
}

.link-labels-text {
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 14px;
}

#main-video {
    width: 100%;
    margin-top: 0px;
    margin-bottom: 10px;
    border-radius: 15px;
}

#addtl-video {
    width: 100%;
    /* max-width: 750px; */
    margin-top: 0px;
    margin-bottom: 10px;
    border-radius: 15px;
}

#pipeline-img {
    width: 60%;
    max-width: 560px;
    margin-top: 10px;
    margin-right: 20px;
    margin-bottom: 10px;
}

#why-lerf-img {
    width: 30%;
    max-width: 560px;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 20px;
}
.separator {
    display: block !important;
    height: 1px !important;
    width: 100% !important;
    /* margin: 1em 0 !important;
    background-color: #eee !important;
    clear: both !important; */
  }
#why-lerf{
    padding-top: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

#clip-img {
    width: 100%;
    max-width: 700px;
    margin-top: 20px;
}
#main-img {
    width: 100%;
    max-width: 700px;
    margin-top: 00px;
    margin-bottom: 0px;
}
#double-img {
    width: 40%;
    margin-top: 00px;
    margin-bottom: 0px;
    margin-left: 2%;
    margin-right: 2%;
}
#splash-img {
    width: 100%;
    max-width: 800px;
    margin-top: 0px;
    margin-bottom: 0px;
}
.paragraph {
    margin-top: 0px;
    margin-bottom: 10px;
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    letter-spacing: 0;
    text-align: center;
    display: block;
    width: 100%;
}

.paragraph-center {
    margin-top: 0px;
    /* margin-bottom: 20px; */
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    letter-spacing: 0;
    text-align: center;
}

/* ------------------------------------------------------ */
/* All teaser-slider things                               */
/* ------------------------------------------------------ */
.teaser-slide-row {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 88%;
    margin-left: auto;
    margin-right: auto;
}

.teaser-slide-col {
    flex: 1 0 200px;
    height: 200px;
}

.teaser-slide-arrow {
    display: flex;
    top: 0;
    bottom: 0;
    margin-top: 80px;  /* (200 - 40) / 2 */
    height: 40px;
    background-color: #FBE2B1;
    border: none;
    width: 5%;
    font-size: 30px;
    padding: 0;
    cursor: pointer;
    opacity: 1.0;
    transition: color 100ms;
    justify-content: center;
  }
  
.teaser-slide-arrow:hover,
.teaser-slide-arrow:focus {
    background-color: #FBC661;
    opacity: 1;
}

#teaser-slide-arrow-prev {
    left: 0;
    margin-right: 1%;
    border-radius: 2rem 2rem 2rem 2rem;
}

#teaser-slide-arrow-next {
    right: 0;
    margin-left: 1%;
    border-radius: 2rem 2rem 2rem 2rem;
}

.results-slide-row {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-behavior: smooth;
    height: 141px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 10px;
}

.results-slide-col {
    flex: 1 0 140px;
    height: 140px;
}

.results-slide-arrow {
    display: flex;
    position: absolute;
    height: 50%;
    transform: translateY(-50%);
    top: 50%;
    height: 40px;
    background-color: #FBE2B1;
    border: none;
    width: 5%;
    font-size: 30px;
    padding: 0;
    cursor: pointer;
    opacity: 1.0;
    transition: color 100ms;
    justify-content: center;
  }
  
.results-slide-arrow:hover,
.results-slide-arrow:focus {
    background-color: #FBC661;
    opacity: 1;
}

#results-slide-arrow-prev {
    left: 0;
    margin-right: 1%;
    border-radius: 2rem 2rem 2rem 2rem;
}

#results-slide-arrow-next {
    right: 0;
    margin-left: 1%;
    border-radius: 2rem 2rem 2rem 2rem;
}
.thumbnails {
    /* width: 100%; */
    height: 100px;
    overflow: hidden;
    margin-top: 0px;
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
}
.thumbnail-btn {
    border: none;
    cursor: pointer;
    outline: none;
    background-color: #fff;
    border-radius: 10px;
    opacity: 0.6;
}

.thumbnail-btn:hover   {
    opacity: 1.0;
}

.thumbnail_label {
    font-family: 'Open Sans',sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    letter-spacing: 0;
}


/* ------------------------------------------------------ */

/* ------------------------------------------------------ */
/* Image compare */
/* ------------------------------------------------------ */
.image-compare {
    max-width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: content-box;
    cursor: pointer;
    user-select: none;
    box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.1);
    border-radius: 15px;
  }
  .image-compare::before {
    /* Prevent selection, similar to user-select: none. */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
  }
  .image-compare img {
    max-width: 100%;
    background: #fff;
    display: block;
  }
  .image-compare img:not(:first-child) {
    position: absolute;
    top: 0;
    height: 100%;
    left: 0;
    object-fit: cover;
    object-position: top left;
    width: 50%;
    overflow: hidden;
    z-index: 1;
  }
  .image-compare-handle {
    height: 100%;
    width: 0.5em;
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    z-index: 20;
  }
  .image-compare-handle i {
    background: #fff;
    border-radius: 50%;
    line-height: 2em;
    width: 2em;
    display: block;
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    text-align: center;
    box-shadow: 0em 0.1em 0.5em rgba(0, 0, 0, 0.1);
  }
  .inline-image {
    display: inline-block;
    vertical-align: top;
    height: 1em;  /* This makes the image height match the text */
    width: auto;  /* Maintain aspect ratio */
    margin: 5px;  /* Add some space around the image */
}
  .image-compare-handle::before {
    /* Centered line! */
    box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.4);
    content: "";
    height: 100%;
    position: absolute;
    left: -1px;
    right: -1px;
    background: #fff;
  }
  .image-compare-before,
  .image-compare-after {
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    position: absolute;
    overflow: hidden;
  }
  .image-compare-before > div,
  .image-compare-after > div {
    position: absolute;
    bottom: 0.5em;
    background: #fff;
    line-height: 1.5em;
    text-align: center;
    padding: 0.2em 0.6em;
    border-radius: 0.5em;
    white-space: nowrap;
    box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.2);
  }
  .image-compare-before > div {
    z-index: 2;
    left: 0.5em;
  }
  .image-compare-after > div {
    z-index: 0;
    right: 0.5em;
  }
/* ------------------------------------------------------ */

:root {
    --opacity: 50;
}

#canvas {
    position: absolute;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}

#canvas-overlay {
    position: absolute;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    /* opacity: var(--opacity); */
    filter: opacity(var(--opacity));
    transition-property: filter;
    transition-duration: 0.5s;
}

#main-results {
    width: 100%;
    margin-top: 0px;
    margin-bottom: 0px;
    text-align: center;
    background-color: white;
    border-radius: 15px;
    -webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);
    overflow: hidden;
}

/* #main-results > div {
    height: 200px;
    background-color: red;
} */

.videos {
    visibility: hidden;
    position: absolute;
    width: 1%;
}

#opacity {
    font-family: 'Open Sans',sans-serif;
    color: #3c3c3c;
    font-size: 20px;
    line-height: 20px;
}

.viewer-bar {
    width: 33.3333%;
}

.switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 34px;
    margin-left: 15px;
    margin-top: 5px;
  }
  
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(36px);
    -ms-transform: translateX(36px);
    transform: translateX(36px);
}

.video-bar {
    width: 100%;
    margin-top: -50px;
    margin-left: 0px;
    margin-right: 0px;
    margin-bottom: 20px;
    height: 40px;
    position: relative;
    z-index: 41;  /* the image-compare bar is 40. */
}

.video-btn {
    width: 40px;
    height: 40px;
    padding: 8px 6px 8px 6px;
    margin: 0px 10px 0px 0px;
    cursor: pointer;
    outline: none;
    border: none;
    color: #000;
    background-color: #FBE2B1;
    padding-bottom: 8px;
    border-radius: 10px;
    box-shadow: 0em 0.1em 0.5em rgba(0, 0, 0, 0.4);
}

.video-btn:hover {
    background-color: #FBC661;
}

.video-export {
    text-align: right;
}

#play-btn {
    border-radius: 20px;
    padding: 0px;
}

.switch .labels {
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 14px;
    font-family: sans-serif;
    transition: all 0.2s ease-in-out;
}

.switch .labels::after {
    content: attr(data-off);
    position: absolute;
    right: 8px;
    color: #4d4d4d;
    opacity: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease-in-out;
}

.switch .labels::before {
    content: attr(data-on);
    position: absolute;
    left: 11px;
    color: #ffffff;
    opacity: 0;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease-in-out;
}

.switch input:checked~.labels::after {
    opacity: 0;
}

.switch input:checked~.labels::before {
    opacity: 1;
}

#opacity-col {
    text-align: left;
}

.citation {
    /* // set background color to gray; */
    background-color: #eaeaea;
    text-align: left;
    border-radius: 10px;
    padding-top: 3px;
}

.citation > h1 {
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 10px;
    padding: 10px;
}
.citation > pre {
    margin-bottom: 10px;
    margin-left: 10px;
    padding: 10px;
}

.citation > p {
    margin-left: 20px;
}

#codecell0 {
    margin-bottom: 10px;
    margin-left: 10px;
    overflow-y: scroll;
}

.add-top-padding{
    margin-top: 10px;
}

@media screen and (max-width: 750px) {
    .title {
        font-size: 48px;
        line-height: 60px;
        letter-spacing: 1.5px;
    }

    .subheader {
        font-size: 26px;
        line-height: 40px;
    }

    .gpt-query {
        height: 30px;
        font-size: 2.5vw;
    }

    .slide-arrow {
        margin-top: 20px;
    }
}

@media screen and (max-width: 550px) {
    .title {
        font-size: 36px;
        line-height: 48px;
        letter-spacing: 1px;
    }

    .subheader {
        font-size: 20px;
        line-height: 30px;
    }

    /* .author-text {
        font-size: 12px;
    }

    .author-row {
        height: 35px;
    } */

    /* #uc-berkeley {
        font-size: 12px;
    } */

    #pipeline-img {
        width: 90%;
        max-width: 560px;
        margin-top: 20px;
        margin-right: 0px;
    }

    #why-lerf-img {
        width: 60%;
        max-width: 560px;
        margin-top: 20px;
        margin-left: 0px;
    }

    .slide-arrow {
        margin-top: 15px;
      }
}
/* Image compare utility. */

.image-compare {
    max-width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: content-box;
    cursor: pointer;
    user-select: none;
    box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.1);
  }
  .image-compare::before {
    /* Prevent selection, similar to user-select: none. */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
  }
  .image-compare img {
    max-width: 100%;
    background: #fff;
    display: block;
  }
  .image-compare img:not(:first-child) {
    position: absolute;
    top: 0;
    height: 100%;
    left: 0;
    object-fit: cover;
    object-position: top left;
    width: 50%;
    overflow: hidden;
    z-index: 1;
  }
  .image-compare-handle {
    height: 100%;
    width: 0.5em;
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    z-index: 20;
  }
  .image-compare-handle i {
    background: #fff;
    border-radius: 50%;
    font-size: 20px;
    line-height: 2em;
    width: 2em;
    display: block;
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    text-align: center;
    box-shadow: 0em 0.1em 0.5em rgba(0, 0, 0, 0.4);
  }
  .image-compare-handle::before {
    /* Centered line! */
    box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.4);
    content: "";
    height: 100%;
    position: absolute;
    left: -2px;
    right: -2px;
    background: #fff;
  }
  .image-compare-before,
  .image-compare-after {
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    position: absolute;
    overflow: hidden;
  }
  .image-compare-before > div,
  .image-compare-after > div {
    position: absolute;
    top: 0.5em;
    background: #fff;
    line-height: 1.5em;
    text-align: center;
    padding: 0.2em 0.6em;
    border-radius: 0.5em;
    white-space: nowrap;
    box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.2);
    font-size: 16px;
    height: 24px;
  }
  .image-compare-before > div {
    z-index: 2;
    left: 0.5em;
  }
  .image-compare-after > div {
    z-index: 0;
    right: 0.5em;
  }

  .switcher {
    position: relative;
    overflow: hidden;
    /* box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.1); */
    margin-top: 0em;
    margin-bottom: 0.5em;
    display: block;
    background-color: #FBE2B1;
    border-radius: 10px;
  }
  .switcher > *:not(.switcher-labels) {
    opacity: 1;
    transition: 0.5s all;
    z-index: 1;
  }
  .switcher > *:not(:first-child):not(.switcher-labels) {
    position: absolute;
    top: 0;
  }
  
  .switcher > .switcher-hidden {
    opacity: 0;
    z-index: 0;
  }

  .switcher .switcher-labels {
    text-align: center;
    font-weight: 600;
    padding: 1em 1.5em;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 0.75em;
  }
  
  .switcher .switcher-labels > div {
    white-space: nowrap;
  }
  
  .switcher .switcher-labels label {
    transition: 0.5s all;
    cursor: pointer;
    padding: 0 0.3em;
    color: #000;
    font-size: 16px;
  }
  .switcher .switcher-labels label.switcher-hidden {
    opacity: 0.3;
  }
  .switcher .switcher-labels input {
    vertical-align: middle;
    transform: translateY(-1px);
  }

  label {
    font-size: 18px;
    vertical-align: middle;
  }
  
  input[type="radio"] {
    vertical-align: middle;
  }

  .video-scroll {
    width: 88%;
    max-height: 500px;
    margin: 0 auto;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
}

.video-scroll-card {
    display: inline-block;
    object-fit: cover;
    flex: 1;
    max-width: 100%;
}

.video-scroll-card video{
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

/* .video-scroll-card img {
    width: 100%;
    cursor: pointer;
} */
