/* custom fixes (hydro agent) */
.main{transform:translateZ(0);-webkit-transform:translateZ(0);isolation:isolate}
.nav{will-change:transform;-webkit-transform:translateZ(0);transform:translateZ(0)}
.page--record_detail pre.line-numbers,.page--record_detail pre.hydro-record-code{overflow-x:auto}
.page--record_detail pre.line-numbers>code,.page--record_detail pre.hydro-record-code>code{white-space:pre!important;font-size:.875rem!important;line-height:1.5!important;overflow-x:auto}
/* problem difficulty square + homepage month heatmap */
.hydro-pdiff{display:inline-block;width:.72rem;height:.72rem;border-radius:.18rem;margin-right:.35rem;vertical-align:-.05rem;background:#9fa0a0}
.hydro-pdiff.d1{background:#E74C3C}.hydro-pdiff.d2,.hydro-pdiff.d3,.hydro-pdiff.d4{background:#F39C12}.hydro-pdiff.d5{background:#FADB14}.hydro-pdiff.d6{background:#52C41A}.hydro-pdiff.d7{background:#00B8D4}.hydro-pdiff.d8{background:#3B82F6}.hydro-pdiff.d9{background:#9D3DCF}.hydro-pdiff.d10{background:#052242}
.hydro-month{margin-top:.9rem;padding-top:.7rem;border-top:1px dashed rgba(127,127,127,.25)}
.hydro-month__title{font-size:.82rem;font-weight:700;color:#4a7ab8;margin-bottom:.45rem}
[data-mantine-color-scheme="dark"] .hydro-month__title{color:#8bbde6}
.hydro-month__grid{display:grid;grid-template-columns:repeat(31,1fr);gap:2px}
.hydro-month__grid i{aspect-ratio:1;border-radius:2px;background:rgba(127,127,127,.2)}
.hydro-month__grid i.l1{background:#9be9a8}.hydro-month__grid i.l2{background:#40c463}.hydro-month__grid i.l3{background:#1e8e3a}.hydro-month__grid i.l4{background:#0b5d24}
.hydro-month__today{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;margin-top:.6rem;font-size:.75rem;color:#8a8f98}
.hydro-month__today b{color:#4a7ab8;font-weight:700}
[data-mantine-color-scheme="dark"] .hydro-month__today b{color:#8bbde6}
.hydro-month__today a{display:inline-block;padding:.04rem .5rem;border-radius:999px;background:rgba(82,196,26,.3);color:#fff;text-decoration:none}
.hydro-month__today i{font-style:normal;color:#8a8f98}

/* difficulty pills (modern) */
.hydro-pill{display:inline-flex;align-items:center;padding:.12rem .55rem;border-radius:999px;font-size:.72rem;font-weight:700;line-height:1.5;white-space:nowrap}
.hydro-pill.d0{background:rgba(127,127,127,.2);color:#8a8f98}
.hydro-pill.d1,.hydro-pill.d2{background:#E74C3C;color:#fff}
.hydro-pill.d3,.hydro-pill.d4{background:#F39C12;color:#fff}
.hydro-pill.d5,.hydro-pill.d6{background:#F6C445;color:#4d3800}
.hydro-pill.d7{background:#147D3D;color:#fff}
.hydro-pill.d8{background:#38BDF8;color:#0c4a6e}
.hydro-pill.d9{background:#7C3AED;color:#fff}
.hydro-pill.d10{background:#111827;color:#fff}
.hydro-pdiff.d1,.hydro-pdiff.d2{background:#E74C3C}.hydro-pdiff.d3,.hydro-pdiff.d4{background:#F39C12}.hydro-pdiff.d5,.hydro-pdiff.d6{background:#F6C445}.hydro-pdiff.d7{background:#147D3D}.hydro-pdiff.d8{background:#38BDF8}.hydro-pdiff.d9{background:#7C3AED}.hydro-pdiff.d10{background:#111827}

/* rounded-rect pills + home 30-day card (reversible) */
.hydro-pill{border-radius:.375rem;margin-left:0}
.page--problem_main td.col--difficulty{text-align:left}
.hydro-month__grid{grid-template-columns:repeat(10,1fr);gap:3px}
.hydro-month-card{background:linear-gradient(135deg,rgba(74,122,184,.10),rgba(74,122,184,.03))!important;border:1px solid rgba(74,122,184,.2)!important;border-radius:14px!important;margin-top:1rem}
.hydro-month-card .hydro-month{padding:.2rem 0 0}
.hydro-month-card .hydro-month__grid i{border-radius:3px}

/* all-white pill text */
.hydro-pill.d5,.hydro-pill.d6,.hydro-pill.d8{color:#fff!important}

/* rate water circle */
.rate-circle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;border-radius:50%;overflow:hidden;background:rgba(127,127,127,.12);border:1px solid rgba(127,127,127,.22);vertical-align:middle;box-shadow:inset 0 2px 6px rgba(0,0,0,.08)}
.rate-circle__fill{position:absolute;left:0;right:0;bottom:0;height:var(--rate,0%);background:linear-gradient(to top,#2563eb,#3b82f6);transition:height .4s ease}
.rate-circle b{position:relative;z-index:1;font-size:.62rem;font-weight:800;color:#0f172a;text-shadow:0 0 2px #fff,0 0 2px #fff,0 0 3px #fff;line-height:1}
[data-mantine-color-scheme="dark"] .rate-circle{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.16)}

/* water circle v2 (light blue, wavy, bold white no shadow) */
.rate-circle__fill{background:linear-gradient(180deg,#cdeaff,#6db6ff)}
.rate-circle b{color:#fff!important;font-weight:900!important;text-shadow:none!important}
.rate-circle__fill::before,.rate-circle__fill::after{content:"";position:absolute;left:-20%;width:140%;height:10px;background:#d8f1ff;border-radius:45% 45% 0 0;opacity:.85;pointer-events:none}
.rate-circle__fill::before{top:-3px;animation:hydroWaveA 2.4s ease-in-out infinite}
.rate-circle__fill::after{top:-7px;height:14px;opacity:.45;animation:hydroWaveB 3.4s ease-in-out infinite}
@keyframes hydroWaveA{0%,100%{transform:translateX(0)}50%{transform:translateX(-8px)}}
@keyframes hydroWaveB{0%,100%{transform:translateX(-8px)}50%{transform:translateX(6px)}}

/* rate water all light blue, white text only */
.rate-circle__fill{background:#9fd8ff}
.rate-circle__fill::before,.rate-circle__fill::after{background:#b7e2ff;opacity:.9}

/* rate water plain blue */
.rate-circle__fill{background:#3b82f6}
.rate-circle__fill::before,.rate-circle__fill::after{display:none}

/* problem tags follow title color */
.page--problem_detail .problem__tag-item,
.page--problem_detail .problem__tag-link,
.page--problem_detail .problem__tag-item:hover,
.page--problem_detail .problem__tag-link:hover{color:#646464!important}
.theme--dark.page--problem_detail .problem__tag-item,
.theme--dark.page--problem_detail .problem__tag-link,
.theme--dark.page--problem_detail .problem__tag-item:hover,
.theme--dark.page--problem_detail .problem__tag-link:hover{color:#bdbdbd!important}

/* restore sticky/fixed sidebars: neutralize old compositing layer on .main */
.main{transform:none!important;-webkit-transform:none!important;isolation:auto!important}

/* training rate+diff same column */
.col--rate-diff{white-space:nowrap}
.col--rate-diff .rate-circle{margin-right:.45rem;vertical-align:middle}

/* training rate/difficulty right aligned + divider */
.page--training_detail .col--rate-diff{text-align:right;padding-left:1rem!important}
.page--training_detail td.col--rate-diff{border-left:1px solid rgba(127,127,127,.22)}
.page--training_detail th.col--rate-diff{border-left:1px solid rgba(127,127,127,.22)}

/* training rate/difficulty divider match status/problem line */
.page--training_detail td.col--rate-diff,.page--training_detail th.col--rate-diff{border-left:1px solid #e4e4e4!important}
.theme--dark.page--training_detail td.col--rate-diff,.theme--dark.page--training_detail th.col--rate-diff{border-left:1px solid #2b2b2b!important}

/* training rate/difficulty divider white */
.page--training_detail td.col--rate-diff,.page--training_detail th.col--rate-diff{border-left:1px solid #ffffff!important}

/* homepage csp left column under card */
.csp-left{flex:0 0 300px;min-width:300px;display:flex;flex-direction:column;gap:10px}
.csp-left .hydro-month-card{margin-top:0}
.csp-left .hydro-month__grid{grid-template-columns:repeat(10,1fr)}

/* home streak chip */
.hydro-month__streak{display:inline-block;margin-left:.5rem;padding:.08rem .6rem;border-radius:999px;background:rgba(255,255,255,.15);color:#fff;font-size:.72rem;font-weight:700;vertical-align:middle}
.hydro-month__title{display:flex;align-items:center;flex-wrap:wrap}

/* homepage 3-month card: bigger, white fonts, 15 columns */
.csp-left{flex:0 0 400px;min-width:400px}
.csp-left .hydro-month-card{font-size:.85rem}
.csp-left .hydro-month__title{font-size:1rem;color:#fff!important}
.csp-left .hydro-month__streak{background:rgba(255,255,255,.18);color:#fff}
.csp-left .hydro-month__grid{grid-template-columns:repeat(15,1fr);gap:4px}
.csp-left .hydro-month__grid i{border-radius:4px}
.csp-left .hydro-month__today,.csp-left .hydro-month__today b,.csp-left .hydro-month__today i{color:#fff!important}
.csp-left .hydro-month__today a{color:#fff!important}
.hydro-month__pop{margin-top:.6rem;padding:.5rem .6rem;border-radius:8px;background:rgba(0,0,0,.22);font-size:.76rem;line-height:1.8;color:#fff}
.hydro-month__pop b{color:#fff}
.hydro-month__pop__tags a{display:inline-block;margin:.1rem .3rem 0 0;padding:.04rem .5rem;border-radius:999px;background:rgba(82,196,26,.35);color:#fff;text-decoration:none}
.hydro-month__pop__tags i{font-style:normal;color:rgba(255,255,255,.75)}

/* homepage 3-month final: width 300, taller, gold fonts */
.csp-left{flex:0 0 300px!important;min-width:300px!important;max-width:300px!important}
.csp-left .hydro-month-card{min-height:320px;padding:1rem .9rem .9rem!important}
.csp-left .hydro-month__title{font-size:1rem;color:#FFD700!important;margin-bottom:.7rem}
.csp-left .hydro-month__grid{gap:3px;margin-bottom:.5rem}
.csp-left .hydro-month__grid i{min-height:15px;min-width:0}
.csp-left .hydro-month__today,.csp-left .hydro-month__today b,.csp-left .hydro-month__today i{color:#FFD700!important}
.csp-left .hydro-month__today a{color:#FFD700!important;background:rgba(255,215,0,.14)}
.hydro-month__streak{display:block!important;text-align:center;margin:.6rem 0 0;padding:.1rem 0;font-size:1rem;font-weight:800;color:#FFD700;letter-spacing:.03em;background:rgba(255,215,0,.08);border-radius:8px}
.hydro-month__pop,.hydro-month__pop b,.hydro-month__pop__tags i{color:#FFD700!important}
.hydro-month__pop__tags a{color:#FFD700!important;background:rgba(255,215,0,.15)}

/* light theme heatmap card brown gradient */
[data-mantine-color-scheme="light"] .hydro-month-card{background:linear-gradient(135deg,#c99b6c,#8a5a2b)!important;border:1px solid rgba(255,255,255,.35)!important}

/* light theme heatmap card lightblue-blue gradient */
[data-mantine-color-scheme="light"] .hydro-month-card{background:linear-gradient(135deg,#cfe8ff,#3b82f6)!important;border:1px solid rgba(255,255,255,.45)!important}


/* light theme heatmap text black */
[data-mantine-color-scheme="light"] .hydro-month__title,
[data-mantine-color-scheme="light"] .hydro-month__today,
[data-mantine-color-scheme="light"] .hydro-month__today b,
[data-mantine-color-scheme="light"] .hydro-month__today i,
[data-mantine-color-scheme="light"] .hydro-month__streak,
[data-mantine-color-scheme="light"] .hydro-month__pop,
[data-mantine-color-scheme="light"] .hydro-month__pop b,
[data-mantine-color-scheme="light"] .hydro-month__pop__tags i{color:#111!important;text-shadow:none!important}
[data-mantine-color-scheme="light"] .hydro-month__today a,
[data-mantine-color-scheme="light"] .hydro-month__pop__tags a{color:#111!important;background:rgba(0,0,0,.08);text-shadow:none!important}
[data-mantine-color-scheme="light"] .hydro-month__streak{background:rgba(0,0,0,.06)}

/* light theme heatmap text white bold */
[data-mantine-color-scheme="light"] .hydro-month__title,
[data-mantine-color-scheme="light"] .hydro-month__today,
[data-mantine-color-scheme="light"] .hydro-month__today b,
[data-mantine-color-scheme="light"] .hydro-month__today i,
[data-mantine-color-scheme="light"] .hydro-month__streak,
[data-mantine-color-scheme="light"] .hydro-month__pop,
[data-mantine-color-scheme="light"] .hydro-month__pop b,
[data-mantine-color-scheme="light"] .hydro-month__pop__tags i{color:#fff!important;font-weight:700!important;text-shadow:none!important}
[data-mantine-color-scheme="light"] .hydro-month__today a,
[data-mantine-color-scheme="light"] .hydro-month__pop__tags a{color:#fff!important;font-weight:700!important;background:rgba(0,0,0,.14);text-shadow:none!important}
[data-mantine-color-scheme="light"] .hydro-month__streak{background:rgba(0,0,0,.12)}

/* homepage heatmap align carousel 420 */
.csp-left .hydro-month-card{min-height:420px!important}

/* homepage heatmap spacing polish */
.csp-left .hydro-month{padding:1.2rem 1rem 1.1rem;display:flex;flex-direction:column}
.csp-left .hydro-month__title{margin-bottom:1.1rem;letter-spacing:.02em}
.csp-left .hydro-month__grid{margin-bottom:1.1rem}
.csp-left .hydro-month__today{padding-top:.9rem;margin-top:0;border-top:1px solid rgba(255,255,255,.22)}
.csp-left .hydro-month__streak{margin-top:1.2rem;margin-bottom:.2rem;padding:.5rem .5rem}
.csp-left .hydro-month__pop{margin-top:1rem}

/* ranking detail columns readable */
.page--ranking col.rp-problem,.page--ranking col.rp-contest{width:6.5rem}
.page--ranking th.col--detail.rp-problem,.page--ranking th.col--detail.rp-contest{white-space:nowrap;overflow:visible}
.page--ranking td.col--detail.rp-problem,.page--ranking td.col--detail.rp-contest{white-space:nowrap;overflow:visible}
.page--ranking .col--rp{width:5rem}

/* ensure total-score (总积分) header fully visible */
.page--ranking .col--rp{width:6rem}
.page--ranking th.col--rp,.page--ranking td.col--rp{white-space:nowrap;overflow:visible}
.page--homepage .col--rp{width:4.25rem}
.page--homepage th.col--rp,.page--homepage td.col--rp{white-space:nowrap;overflow:visible}

/* contest detail info tags follow contest title color */
.page--contest_detail .problem__tag-item{color:#646464!important}
.theme--dark.page--contest_detail .problem__tag-item{color:#bdbdbd!important}


.page--contest_detail .problem__tag-item .user-profile-name{color:inherit!important}
/* hide floating bottom-right omnisearch launcher */
.omnibar{display:none!important}
/* hide floating bottom-right omnisearch launcher */
.omnibar,.omnibar-toggle{display:none!important}

/* 题库：默认收起算法标签，点击“显示算法标签”后可展开 */
.page--problem_main table.hide-problem-tag .problem__tags,
.page--training_detail table.hide-problem-tag .problem__tags{display:none!important}
/* 班级课程：不显示算法标签 */
.ojclass-course .problem__tags{display:none!important}

/* 评测记录：递交时间列加宽，完整显示具体时间 */
.col--submit-at{width:13.5rem!important;min-width:13.5rem!important;max-width:none!important;white-space:nowrap!important}
.record_main__table .col--problem{width:12rem!important;min-width:9rem!important;max-width:13rem!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 排名明细：压缩题目列宽度，加宽时间列完整显示 */
.page--rank_problem_detail .col--user,
.page--rank_contest_problem_detail .col--user,
.page--daily_rank_problems .col--user,
.page--week_rank_problems .col--user,
.page--diligence_streak_problems .col--user{width:14rem!important;min-width:12rem!important}
.page--rank_problem_detail .col--rp,
.page--rank_contest_problem_detail .col--rp,
.page--daily_rank_problems .col--rp,
.page--week_rank_problems .col--rp,
.page--diligence_streak_problems .col--rp{width:12.5rem!important;min-width:12.5rem!important;max-width:none!important;white-space:nowrap!important}

/* 题目积分明细：显示题目标题 */
.hydro-rank-pname{display:block;font-weight:600;line-height:1.35;color:inherit}
.hydro-rank-pname:hover{color:inherit}
.hydro-rank-pid{display:block;font-size:.72rem;opacity:.65;margin-top:2px;white-space:nowrap}

/* 导航栏加宽，避免勤勉榜等被折叠 */
.nav .row{max-width:1540px!important;padding-left:44px!important}

/* 首页热力图：尝试过未完成题按难度分行展示 */
.hydro-attempt .hydro-attempt__list{display:flex;flex-direction:column;gap:4px}
.hydro-attempt .hydro-attempt__list>div{display:flex;flex-wrap:wrap;align-items:center;gap:4px;line-height:1.8}
.hydro-attempt .hydro-attempt__list .hydro-pill{flex:none}
.hydro-attempt .hydro-attempt__list a{
  display:inline-flex;align-items:center;margin:0;padding:2px 10px;border-radius:999px;
  background:rgba(255,215,0,.14);color:#ffd700!important;text-decoration:none;
  font-size:.72rem;white-space:nowrap;transition:background .12s ease,color .12s ease;
}
.hydro-attempt .hydro-attempt__list a:hover{background:rgba(255,215,0,.28);color:#fff!important}
[data-mantine-color-scheme="light"] .hydro-attempt .hydro-attempt__list a{color:#8a6a00!important}
[data-mantine-color-scheme="light"] .hydro-attempt .hydro-attempt__list a:hover{color:#fff!important}
