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

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

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

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

a {
    color: #6567C9;
    text-decoration: none;
}
  
a.link:focus, a.link:hover {
    color: #ff9349;
    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: #6567C9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.x-button {
    height: 40px;
    padding: 0px 14px;
    background: #6567C9;
    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, #0078d4 .39%, #8661c5 51.23%, #ff9349 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.x-gradient-block {
    color: #3f3f3f;
    background: linear-gradient(107.54deg, #e6eff7 .39%, #eeebf5 51.23%, #fcf4ee 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, #0078d4 .39%, #8661c5 51.23%, #ff9349 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: inherit;
    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, #0078d4 .39%, #8661c5 51.23%, #ff9349 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 #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%;
}


/* .section::before {
    content: "";
    position: relative;
    left: -32px;
    width: 2px;
    height: 32px;
    background-color: rgb(32, 163, 196);
}

.section::after {
    content: "";
    position: relative;
    right: -32px;
    width: 2px;
    height: 32px;
    background-color: rgb(32, 163, 196);
} */
/* 
.figure {
    margin: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.figure div {
    margin-top: 4px;
    color: black;
    font-size: 16px;
    font-weight: 400;
} */

.bibtex {
    margin: 32px 96px;
    padding: 0px 24px;
    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, #0078d4 .39%, #8661c5 51.23%, #ff9349 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;
}

/* UMAS3D rebuilt project page. The shared TRELLIS viewer styles remain above. */
@font-face {
    font-family: "DM Serif Display";
    src: url("../fonts/dm-serif-display/DMSerifDisplay-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "DM Serif Display";
    src: url("../fonts/dm-serif-display/DMSerifDisplay-Italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope/Manrope-wght.ttf") format("truetype");
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

* { font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; }

body { color: #161a27; background: #fff; letter-spacing: 0; }

#main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 64px 28px 56px;
}

.project-header { text-align: center; }

#title {
    margin: 0;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(38px, 5vw, 50px);
    font-weight: 400;
    font-style: italic;
    line-height: 1.12;
    letter-spacing: -0.03em;
    background: linear-gradient(100deg, #006dcc, #554bc4, #c65378);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.paper-teaser { width: min(92%, 940px); margin: 36px auto 48px; }
.paper-teaser img { display: block; width: 100%; height: auto; }

#abstract { width: min(100%, 920px); margin: 0 auto; padding: 0; background: transparent; border-radius: 0; }
#abstract::before { content: none; }
#abstract h2, #demo-title, #task-title { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; }
#abstract h2, #demo-title { margin: 0 0 18px; font-size: clamp(32px, 4vw, 38px); line-height: 1.16; letter-spacing: -0.02em; }
#abstract h2 { color: #151925; text-align: center; }

.abstract-box {
    padding: 26px 30px;
    border: 1px solid rgba(120, 120, 160, 0.08);
    border-radius: 16px;
    background: linear-gradient(100deg, rgba(231, 242, 255, 0.72), rgba(244, 238, 255, 0.66), rgba(255, 242, 233, 0.62));
}
.abstract-box p { margin: 0; color: #303746; font-size: 18px; font-weight: 500; line-height: 1.76; text-align: left; }
.abstract-box .abstract-highlight { margin-bottom: 12px; color: #161d30; font-weight: 700; }

#umas3d-demo { margin-top: 72px; }
#demo-title { text-align: left; background: linear-gradient(107.54deg, #006dcc .39%, #5b4ac6 51.23%, #d86476 100%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.demo-intro { margin: 0 0 20px; color: #222c3e; font-size: 18px; font-weight: 700; line-height: 1.6; text-align: left; }
.demo-intro-action { color: #353b77; }

#task-title { margin: 28px 0 0; font-size: clamp(34px, 4.4vw, 40px); line-height: 1.16; letter-spacing: -0.02em; text-align: center; background: linear-gradient(100deg, #006dcc, #554bc4, #c65378); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
#task-description { margin: 8px 0 20px; color: #4a5364; font-size: 14px; font-weight: 600; line-height: 1.55; text-align: center; }

#demo-grid { width: min(1200px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; row-gap: 36px; }

.demo-group { min-width: 0; }

.demo-card { position: relative; box-sizing: border-box; min-height: 306px; padding: 0 20px 20px; overflow: hidden; border: 1px solid #e5e5ed; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px rgba(25, 25, 45, 0.09); cursor: pointer; outline: none; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.demo-card:hover, .demo-card:focus-visible { border-color: #a8a9df; box-shadow: 0 8px 23px rgba(40, 40, 82, 0.18); transform: translateY(-2px); }

.demo-card-combination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; min-height: 56px; margin: 0 -20px 18px; padding: 0 16px; border-bottom: 1px solid #e4e7f2; color: #1d2840; background: linear-gradient(100deg, #f2f6ff, #f8f4ff); font-family: "DM Serif Display", Georgia, serif; font-size: 19px; font-weight: 400; line-height: 1.2; letter-spacing: -0.015em; text-align: center; }

.modality-badge { position: absolute; top: 14px; left: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 92px); padding: 4px 8px; border-radius: 999px; color: #514fa5; background: rgba(239, 238, 255, 0.92); font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap; }
.modality-token { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid rgba(64, 63, 147, 0.55); border-radius: 4px; color: #3e3b92; background: #fff; font-size: 10px; font-weight: 700; }
.demo-glb-badge { position: absolute; top: 14px; right: 14px; z-index: 1; padding: 4px 9px; color: #fff; border-radius: 999px; background: #6567c9; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }

.demo-card-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.source-panel, .edited-panel { min-width: 0; }
.demo-view-label { margin: 0 0 10px; color: #20293c; font-family: "DM Serif Display", Georgia, serif; font-size: 16px; font-weight: 400; letter-spacing: 0.01em; text-align: center; }
.source-panel video, .edited-panel video { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: #f4f4f7; }
.instruction-text { min-height: 2.7em; margin: 12px 4px 0; color: #333; font-size: 13px; font-style: italic; font-weight: 400; line-height: 1.4; text-align: center; }

#task-navigation { width: min(1200px, calc(100vw - 32px)); min-height: 48px; margin: 14px auto 0; display: flex; align-items: center; justify-content: center; gap: 12px; }
.task-nav-list { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.task-nav-arrow { width: 38px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 999px; cursor: pointer; color: #fff; background: #6567c9; box-shadow: 0 2px 6px rgba(47, 45, 103, 0.22); font-size: 18px; line-height: 1; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.task-nav-arrow:hover, .task-nav-arrow:focus-visible { transform: scale(1.05); box-shadow: 0 4px 10px rgba(47, 45, 103, 0.3); }
.task-nav-item { padding: 6px 10px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; color: #3f485c; background: transparent; font-size: 13px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; transition: color 0.2s ease, background 0.2s ease; }
.task-nav-item:hover, .task-nav-item:focus-visible { color: #4f4da1; background: #f0efff; }
.task-nav-item.active { color: #fff; border-color: #6567c9; background: #6567c9; }
.template-acknowledgement { margin: 22px 0 0; color: #354052; font-size: 17px; font-weight: 550; text-align: left; }
.x-handwriting { font-family: inherit; font-size: 14px; font-style: italic; font-weight: 400; color: #333; }

@media (max-width: 1040px) { #demo-grid { width: min(100%, calc(100vw - 28px)); } }
@media (max-width: 640px) { #main { padding: 48px 14px 38px; } .paper-teaser { margin: 32px auto 42px; } #umas3d-demo { margin-top: 54px; } #demo-grid { width: 100%; grid-template-columns: 1fr; row-gap: 28px; } .demo-card { min-height: 0; padding: 0 14px 14px; } .demo-card-combination { min-height: 46px; margin: 0 -14px 16px; font-size: 17px; } .demo-card-pair { gap: 14px; } .demo-glb-badge { top: 11px; right: 11px; } #task-navigation { width: 100%; gap: 6px; } .task-nav-list { gap: 2px; } .task-nav-item { padding: 5px 7px; font-size: 12px; } }

/* Instruction-only modal: no model viewer or result preview is loaded here. */
body.instruction-modal-open { overflow: hidden; }

#instruction-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
}

#instruction-modal-overlay.is-open { display: flex; }

#instruction-modal {
    box-sizing: border-box;
    width: min(820px, 90vw);
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.instruction-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px 14px;
    border-bottom: 1px solid #eeeeF3;
}

.instruction-modal-header h2 {
    margin: 0;
    color: #252531;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
}

.instruction-close {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: #4f4f5c;
    background: #f2f2f7;
    font-size: 23px;
    line-height: 1;
}

.instruction-close:hover,
.instruction-close:focus-visible { color: #fff; background: #6567c9; }

.instruction-modal-content { padding: 22px 26px 28px; }
.instruction-section + .instruction-section { margin-top: 22px; }

.instruction-section-title {
    margin-bottom: 8px;
    color: #333342;
    font-size: 15px;
    font-weight: 700;
}

.instruction-text-box {
    padding: 14px 16px;
    border: 1px solid #e4e6f2;
    border-radius: 10px;
    color: #222;
    background: #f7f9ff;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
}

.instruction-image {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

.instruction-empty { margin: 0; color: #555; font-size: 16px; }

@media (max-width: 640px) {
    #instruction-modal-overlay { padding: 14px; }
    #instruction-modal { width: 100%; max-height: 85vh; }
    .instruction-modal-header { padding: 18px 18px 12px; }
    .instruction-modal-content { padding: 18px; }
    .instruction-modal-header h2 { font-size: 22px; }
    .instruction-text-box { font-size: 16px; }
}
