/* Costomize Slider */
.slider-navigation-next {
    margin-top: -32px !important;
    color: white !important;
    background: #ef4444 !important;
}

.slider-navigation-previous {
    margin-top: -32px !important;
    color: white !important;
    background: #ef4444 !important;
}

.slider-page {
    color: white !important;
    background: #ef4444 !important;
}

* {
    font-family: 'Avenir', 'Avenir Next Cyr', 'Config', 'Microsoft YaHei';
}

a {
    color: #ef4444;
    text-decoration: none;
}

a.link:focus, a.link:hover {
    color: #d946ef;
    text-decoration: none;
}

body {
    position: relative;
    margin: 0px;
    padding: 0px;
}

p {
    position: relative;
    margin: 16px;
    color: black;
    font-size: 16px;
    font-weight: 500;
    text-align: justify;
}

p span {
    font-weight: 600;
}

video {
    width: 100%;
    height: auto;
}

.x-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.x-column {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    flex-direction: column;
}

.x-center-text {
    margin: 16px 32px;
    text-align: center;
}

.x-left-align {
    display: flex;
    align-items: center;
    justify-content: left;
    flex-wrap: nowrap;
}

.x-right-align {
    display: flex;
    align-items: center;
    justify-content: right;
    flex-wrap: nowrap;
}

.x-flex-spacer {
    flex: 1;
}

.x-labels {
    position: absolute;
    top: 8px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: left;
    flex-direction: row-reverse;
}

.x-label {
    height: 20px;
    padding: 0px 6px;
    margin: 0px 2px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    background: #ef4444;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.x-button {
    height: 40px;
    padding: 0px 14px;
    background: #ef4444;
    color: white;
    border-radius: 50px;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.x-button.small {
    height: 32px;
    padding: 0px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

.x-button:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
}

.x-gradient-font {
    background: linear-gradient(107.54deg, #f97316 .39%, #ef4444 51.23%, #d946ef 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.x-gradient-block {
    color: #3f3f3f;
    background: linear-gradient(107.54deg, #fff1e6 .39%, #fdeaea 51.23%, #fdeafb 100%);
    border-radius: 16px;
}

.x-gradient-border {
    position: relative;
    padding: 1px;
    margin: 3px;
    border: 3px;
    background: white;
    background-clip: padding-box;
    border: solid border transparent;
    border-radius: 16px;
}

.x-gradient-border::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -3px;
    border-radius: 16px;
    background: linear-gradient(107.54deg, #f97316 .39%, #ef4444 51.23%, #d946ef 100%);
}

.x-section-title {
    margin: 64px 0px 16px 0px;
    padding-left: 16px;
    color: black;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: left;
}

.x-section-title.small {
    margin: 8px 0px 4px 0px;
    padding-left: 4px;
    font-size: 20px;
    font-weight: 700;
}

.x-note {
    color: rgb(96, 96, 96);
    font-size: 16px;
    font-weight: 500;
}

.x-card {
    position: relative;
    margin: 8px;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.x-card.clickable {
    cursor: pointer;
}

.x-card.clickable:hover {
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
    transform: scale(1.02);
}

.x-card .caption {
    margin: 8px 0px;
    height: 80px;
    display: flex;
    align-items: start;
    justify-content: center;
}

.x-handwriting {
    width: 100%;
    font-family: 'Segoe Print';
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: black;
    text-align: justify;
}

.x-image-prompt {
    height: calc(100% - 2px);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid black;
}

.x-image-prompt img {
    max-width: 100%;
    max-height: 100%;
}

#main {
    max-width: 1000px;
    margin: 0px auto;
    padding-top: 100px;
    padding-bottom: 200px;
}

#logo {
    width: 70%;
    min-width: 350px;
    margin: 0px auto;
    display: flex;
    align-items: start;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: gray;
}

#title {
    margin-bottom: 32px;
    color: black;
    font-size: 54px;
    font-weight: 700;
    /* white-space: nowrap; */
    text-align: center;
}

#authors {
    width: 80%;
    margin: 8px auto;
    color: black;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    /* white-space: nowrap; */
}

#authors div {
    margin: 0px 16px;
}

#institution {
    margin: 8px 32px;
    color: black;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    /* white-space: nowrap; */
}

#institution div {
    margin: 0px 16px;
}

#conference {
    margin: 16px 32px;
    color: gray;
    font-size: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

#abstract {
    position: relative;
    margin: 32px;
    padding: 16px 24px;
    color: #3f3f3f;
    font-size: 16px;
    font-weight: 500;
    text-align: justify;
    border-radius: 16px;
}

#abstract::before {
    content: "Abstract:";
    font-weight: 700;
    margin-right: 8px;
}


#links {
    margin: 16px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    /* white-space: nowrap; */
}

#links div {
    margin: 4px 8px;
    width: 140px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#links a {
    width: 100px;
    height: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    background: linear-gradient(107.54deg, #f97316 .39%, #ef4444 51.23%, #d946ef 100%) fixed;
    border-radius: 50px;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#links a:hover {
    width: 105px;
    height: 21px;
    font-size: 17px;
    box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.75);
}

#links a.disabled {
    background-color: rgb(192, 192, 192);
}

#links a.disabled:hover {
    background-color: rgb(192, 192, 192);
}

#links a::before {
    /* use !important to prevent issues with browser extensions that change fonts */
    font-family: 'icomoon' !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;

    /* Better Font Rendering =========== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    margin-right: 8px;
}

#links #paper::before {
    content: "\e000";
    font-size: 18px;
}

#links #arxiv::before {
    content: "\e001";
    font-size: 20px;
}

#links #code::before {
    content: "\e002";
    font-size: 20px;
}

#links #dataset::before {
    content: "\e005";
    font-size: 20px;
}

#links #poster::before {
    content: "\e004";
    font-size: 20px;
}

#links #video::before {
    content: "\e003";
    font-size: 20px;
}

#links #demo::before {
    content: "\e005";
    font-size: 20px;
}

#teaser {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* #teaser::after {
    content: "";
    position: absolute;
    top: 0px;
    left: calc(50% - 50vw);
    width: 100vw;
    height: 100%;
    background: gray;
    opacity: 0.5;
    z-index: -1;
} */

#teaser .label div {
    height: 100%;
    width: 100%;
    font-size: 36px;
    font-weight: 700;
    line-height: 150%;
    text-align: center;
}

#teaser div {
    height: 100%;
}



.bibtex {
    margin: 32px auto;
    padding: 16px 32px;
    font-family: consolas, monospace;
    white-space: pre;
    text-wrap: wrap;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bottombar {
    position: absolute;
    bottom: 0px;
    height: 60px;
    width: 100%;
    background: linear-gradient(107.54deg, #f97316 .39%, #ef4444 51.23%, #d946ef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    user-select: none;
}

#bottombar .row {
    width: 80%;
    padding: 0px 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

#bottombar div {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
}

#bottombar div a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
}

#bottombar div a:hover {
    color: rgba(255, 255, 255, 1);
    font-size: 12px;
}

#bottombar div span {
    font-weight: 700;
}

.x-editing-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.x-editing-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.x-editing-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.x-editing-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.x-editing-image-column img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

.x-editing-prompt-column {
    flex: 1.4;
}

.x-editing-prompt-text {
    padding: 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
    height: 100%;
    overflow: auto;
    line-height: 1.4;
}

.x-label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
    text-transform: uppercase;
}

.edited-prompt-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 16px;
    border-radius: 12px;

    font-family: 'Avenir Next', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #333;

    white-space: nowrap;
    display: inline-block;
    width: auto;
    max-width: none;

    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.prompt-title {
    font-weight: 700;
    margin-right: 8px;
    color: #5f5f5f;
}

.prompt-text {
    font-weight: 500;
    color: #333;
}

/* ============================================================
   TanGO additions: animated gradient, hover, scroll reveal,
   before/after comparison slider
   ============================================================ */

/* Authors row */
.x-authors { font-size: 18px; font-weight: 600; }
.x-authors a { color: #ef4444; }
.x-authors a:hover { color: #d946ef; }

/* Card hover lift */
.x-card {
    transition: transform .25s ease, box-shadow .25s ease;
}
.x-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

/* Scroll-triggered reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Before/After comparison slider */
.x-compare-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 16px;
}
.ba-slider {
    position: relative;
    width: 460px;
    max-width: 92vw;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
    background: #f5f5f5;
}
.ba-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.ba-slider .ba-after-wrap {
    position: absolute;
    inset: 0;
    width: 50%;
    overflow: hidden;
    border-right: 3px solid #fff;
}
.ba-slider .ba-after-wrap img { width: auto; max-width: none; }
.ba-slider .ba-label {
    position: absolute;
    top: 12px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(2px);
}
.ba-slider .ba-label.left  { left: 12px; }
.ba-slider .ba-label.right { right: 12px; }
.ba-slider .ba-handle {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 40px;
    margin-left: -20px;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ba-slider .ba-handle::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 3px;
    background: #fff;
    box-shadow: 0 0 6px rgba(0,0,0,.4);
}
.ba-slider .ba-knob {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(107.54deg, #f97316, #ef4444 50%, #d946ef);
    box-shadow: 0 2px 10px rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}
.ba-caption {
    text-align: center;
    font-size: 14px;
    color: #5f5f5f;
    margin-top: 8px;
}

/* Figure / video blocks (paper figures, preview video) */
.x-figure {
    margin: 16px auto 8px;
    text-align: center;
}
.x-figure img,
.x-figure video {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    background: #fff;
    display: block;
    margin: 0 auto;
}

/* ============================================================
   TanGO result card (distinct layout for Editing Results)
   ============================================================ */
.tango-result {
    padding: 20px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #f0e6ea;
}
.tr-example {
    display: inline-block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: linear-gradient(107.54deg, #f97316, #ef4444 50%, #d946ef);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* don't lift while the user is dragging the 3D models */
.tango-result:hover { transform: none; box-shadow: 0 8px 22px rgba(0,0,0,.07); }

.tr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.tr-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 320px;
    font-size: 17px;
    font-weight: 600;
    color: #2b2b2b;
}
.tr-tag {
    flex: none;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(107.54deg, #f97316, #ef4444 50%, #d946ef);
}
.tr-refs {
    flex: none;
    display: flex;
    gap: 12px;
}
.tr-thumb {
    position: relative;
    flex: none;
    width: 76px;
    height: 92px;          /* thumbnail + label */
}
/* small (cropped) view by default; anchored to its top-right corner so the
   hover-zoom grows down-left into the visible card area */
.tr-thumb-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    cursor: zoom-in;
    z-index: 1;
    transition: width .28s cubic-bezier(.2,.7,.2,1),
                height .28s cubic-bezier(.2,.7,.2,1),
                box-shadow .28s ease;
}
/* zoom on hover; full image shown (contain), shrinks back on mouse-out */
.tr-thumb-img:hover {
    width: 320px;
    height: 320px;
    object-fit: contain;
    z-index: 60;
    box-shadow: 0 18px 48px rgba(0,0,0,.34);
    cursor: zoom-out;
}
.tr-thumb-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    color: #8a8a8a;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.tr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 720px) {
    .tr-grid { grid-template-columns: 1fr; }
}
.tr-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tr-label {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #6b6b6b;
    letter-spacing: .03em;
}
.tr-label-ours {
    background: linear-gradient(107.54deg, #f97316, #ef4444 50%, #d946ef);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tr-cell model-viewer {
    width: 100%;
    height: 260px;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f2f2f4 100%);
    --poster-color: transparent;
}
/* highlight the "Ours" column */
.tr-ours {
    position: relative;
    padding: 8px;
    margin: -8px;
    border-radius: 16px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(107.54deg, #f97316, #ef4444 50%, #d946ef) border-box;
    border: 2px solid transparent;
    box-shadow: 0 8px 26px rgba(217, 70, 239, 0.18);
}
.tr-ours model-viewer { background: radial-gradient(circle at 50% 35%, #fff 0%, #fbeef6 100%); }
