/* ------ 统一变量 ------ */
:root {
    --bg: #ffffff;
    --bg2: #f8f9fa;
    --text: #111;
    --text2: #555;
    --accent: #377eb8; /* 低饱和蓝，取自你原来的 colorMap */
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, .06);
    --shadow-h: 0 4px 14px rgba(0, 0, 0, .09);
    --gap: 20px;
    --max-width: 1200px;
    --font: "Helvetica Neue", Arial, sans-serif;
}

/* ------ reset ------ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    /*background: var(--bg2);*/
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ------ header / footer ------ */
header, footer {
    padding: 40px calc((100% - var(--max-width)) / 2);
    background: var(--bg);
}

header {
    border-bottom: 1px solid #e6e6e6;
}

footer {
    border-top: 1px solid #e6e6e6;
    text-align: center;
    font-size: 14px;
    color: var(--text2);
}

header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}

header p {
    font-size: 16px;
    color: var(--text2);
}

footer .cite {
    margin-bottom: 4px;
}

footer .enjoy {
    font-style: italic;
    margin-top: 8px;
}

/* ------ grid ------ */
main {
    padding: var(--gap) calc((100% - var(--max-width)) / 2);
}

.row {
    display: flex;
    align-items: center;
    margin-bottom: var(--gap);
}

.row:last-child {
    margin-bottom: 0;
}

.dataset-label {
    width: 160px;
    padding-right: 10px;
    font-size: 20px;
    font-weight: 500;
    color: var(--text2);
    line-height: 1.4;
    padding-left: 20px;
}

.plots {
    flex: 1;
    display: flex;
    gap: var(--gap);
}

/* ------ card ------ */
.plot-box {
    flex: 1 1 0;
    min-width: 260px;
    height: 340px;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}

.plot-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-h);
}

.plot-box canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* ------ labels ------ */
.method-label {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: rgba(255, 255, 255, .85);
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

.plot-tooltip {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}

.plot-box:hover .plot-tooltip {
    opacity: 1;
}

/* ------ fullscreen ------ */
.fullscreen-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
}

.fullscreen-modal.active {
    display: flex;
}

.fullscreen-content {
    width: 100%;
    height: 100%;
    max-width: 1100px;
}

.fullscreen-title {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    color: #000;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background .2s;
}

.close-modal:hover {
    background: #ddd;
}

/* ========== Paper2Video-style 首屏 ========== */
:root {
    --theme: #7c2d92; /* CityU 紫红，可改 */
    --bg: #ffffff;
    --text: #111;
    --text2: #555;
    --radius: 6px;
    --font: "Helvetica Neue", Arial, sans-serif;
}

/* ------ Top Bar ------ */
.top-bar {
    height: 60px;
    background: var(--theme);
    display: flex;
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    color: #fff;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: .5px;
}

/* ------ Hero Paper ------ */
.hero-paper {
    background: var(--bg);
    padding: 80px 20px 60px;
    text-align: center;
}

.paper-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.authors {
    font-size: 1.1rem;
    color: var(--text2);
    margin-bottom: 30px;
}

.links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    border: 1px solid var(--theme);
    color: var(--theme);
    padding: 8px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: background .25s, color .25s;
}

.btn:hover {
    background: var(--theme);
    color: #fff;
}

.tldr {
    max-width: 680px;
    margin: 0 auto 40px;
    font-size: 1.5rem;
    color: var(--text2);
    line-height: 1.6;
}

.teaser {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.teaser-img {
    flex: 1 1 320px;
    max-width: 420px;
    border: 1px solid #e6e6e6;
    border-radius: var(--radius);
    overflow: hidden;
    background: #fafafa;
}

.teaser-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* ------ Grid Area ------ */
.grid-area {
    padding: 60px 20px 20px;
}

.grid-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text);
}

/* 沿用旧 #grid 样式，仅加背景分隔 */
/* ========= 真正的整页圆角 ========= */
html {
    background: #f2f2f7; /* 任意窗框色 */
    height: 100%;
    overflow: auto; /* 让 html 负责滚动 */
}

body {
    position: relative;
    width: 99%; /* 稍小于视口 */
    max-width: 1440px;
    margin: 2vh auto; /* 上下留白 → 出现窗框 */
    min-height: 96vh;
    border-radius: 16px; /* 四角大圆角 */
    overflow: hidden; /* 关键：裁掉溢出 */
    box-shadow: 0 12px 60px rgba(0, 0, 0, .10);
    background: #ffffff; /* 内容白底 */
}

/* 左上角 Logo 再放大 */
.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: .5px;
}

/* ===== BibTeX ===== */
.bibtex-area {
    padding: 60px 20px;
}

.area-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
}

.bib-box {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: var(--radius);
    padding: 20px 60px 20px 20px;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
}

.bib-box pre {
    margin: 0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color: #333;
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    border: 1px solid var(--theme);
    color: var(--theme);
    background: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.copy-btn:hover {
    background: var(--theme);
    color: #fff;
}

hr.fade {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #ccc 50%, transparent 100%);
    margin: 60px 0;
}

footer .cc {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.data-intro {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text2);
}

.data-intro p {
    margin: 6px 0;
}

.data-intro .note,
.data-intro .method-hint {
    margin-top: 12px;
    font-size: 14px;
    color: var(--theme);
}
