/* ============================================================================
   晴空主题 · hydro-theme v1.0  （黄岐小学信息学甲组定制皮肤）
   ----------------------------------------------------------------------------
   设计参照：
     · 洛谷 —— 简洁的信息层级、清晰的功能分区、丰富的状态配色
     · 现代教育类产品 —— 圆润造型、柔和阴影、呼吸感留白、微交互反馈
   实现方式：纯 CSS 覆盖层，不改动任何核心文件；
             移除本插件即可 100% 还原默认外观。
   范围：仅作用于浅色主题（theme--light），深色主题保持原样不受影响。
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
.theme--light {
    --th-brand: #4e7cfe;
    --th-brand-2: #8b5cf6;
    --th-ink: #1b2a4a;
    --th-text: #3d4a5c;
    --th-muted: #8391a6;
    --th-link: #3d74f0;
    --th-link-hover: #2458d0;
    --th-bg: #f3f6fc;
    --th-card: #ffffff;
    --th-line: #e9eef7;
    --th-line-soft: #f1f4fa;
    --th-green: #12a150;
    --th-red: #e5484d;
    --th-amber: #d97706;
    --th-radius: 16px;
    --th-radius-sm: 10px;
    --th-shadow: 0 1px 2px rgba(27, 42, 74, .03), 0 10px 28px rgba(27, 42, 74, .05);
    --th-shadow-hover: 0 4px 12px rgba(27, 42, 74, .08), 0 16px 40px rgba(27, 42, 74, .09);
}

/* ---------- 页面底色：冷调浅蓝灰 + 顶部柔和光晕 ---------- */
.theme--light body,
.theme--light #panel {
    background-color: var(--th-bg) !important;
}
.theme--light #panel {
    background-image:
        radial-gradient(1000px 340px at 8% -100px, rgba(78, 124, 254, .10), transparent 70%),
        radial-gradient(1000px 340px at 92% -100px, rgba(139, 92, 246, .09), transparent 70%) !important;
}
.theme--light body {
    color: var(--th-text);
}

/* ---------- 顶部导航：从"黑色工具条"到"品牌渐变" ---------- */
.theme--light .nav.nav,
.theme--light .nav.slideout-menu,
.theme--light .nav--shadow {
    background: linear-gradient(100deg, #4e7cfe 0%, #6a63ff 55%, #8b5cf6 100%) !important;
    box-shadow: 0 2px 14px rgba(78, 124, 254, .32) !important;
}
.theme--light .nav .nav__item,
.theme--light .nav .nav__list--secondary a,
.theme--light .nav .menu__link {
    color: rgba(255, 255, 255, .93) !important;
}
.theme--light .nav .nav__item:hover,
.theme--light .nav .nav__item:focus {
    background: rgba(255, 255, 255, .16) !important;
    border-color: transparent !important;
    color: #fff !important;
}
/* 激活项：顶部色条改为底部圆角下划线（更轻盈） */
.theme--light .nav .nav__item {
    border-top-color: transparent !important;
}
.theme--light .nav .nav__item.nav--active {
    position: relative;
    border-top-color: transparent !important;
    color: #fff !important;
}
.theme--light .nav .nav__item.nav--active::after {
    content: '';
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 3px;
    height: 3px;
    border-radius: 2px;
    background: #ffc94d;
}
/* 站点 logo：踏浪OJ（自带白色圆角底板，适配渐变导航） */
.theme--light .nav__logo {
    height: 36px !important;
    width: auto !important;
    margin: 12px 5px !important;
    opacity: .98;
}
/* 导航里的下拉菜单：白色圆角卡片 */
.theme--light .nav .menu,
.theme--light .nav .dropdown-target.menu {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 24px rgba(27, 42, 74, .16) !important;
    border: 1px solid var(--th-line) !important;
    overflow: hidden;
}
.theme--light .nav .menu .menu__link {
    color: var(--th-text) !important;
}
.theme--light .nav .menu .menu__link:hover {
    background: #f2f6ff !important;
    color: var(--th-link) !important;
}

/* ---------- 卡片（.section）：圆角 + 轻悬浮 ---------- */
.theme--light .section {
    background: var(--th-card) !important;
    border: 1px solid var(--th-line) !important;
    border-radius: var(--th-radius) !important;
    box-shadow: var(--th-shadow) !important;
    transition: box-shadow .2s ease, transform .2s ease;
}
.theme--light .section__header {
    padding: 18px 20px 4px !important;
}
.theme--light .section__body:not(.no-padding) {
    padding: 12px 20px 20px !important;
}
.theme--light .section__title {
    color: var(--th-ink) !important;
    font-weight: 700 !important;
    letter-spacing: .2px;
}
/* 标题前的品牌色小竖条 */
.theme--light .section__title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: .92em;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--th-brand), var(--th-brand-2));
    margin-right: .55em;
    vertical-align: -.08em;
}

/* ---------- 数据表格：柔和表头、斑马纹、悬停高亮 ---------- */
.theme--light .data-table thead th {
    background: #f6f8fd !important;
    color: #5f7392 !important;
    font-weight: 600 !important;
    border-bottom: 1px solid var(--th-line) !important;
}
.theme--light .data-table tbody td {
    border-bottom: 1px solid var(--th-line-soft) !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
}
.theme--light .data-table tbody tr {
    transition: background-color .15s ease;
}
.theme--light .data-table tbody tr:nth-child(2n) {
    background-color: #fafbfe !important;
}
.theme--light .data-table tbody tr:hover {
    background-color: #f1f6ff !important;
}

/* ---------- 评测状态：从"生硬色块字"到"柔和药丸" ---------- */
.theme--light .record-status--text {
    display: inline-block !important;
    padding: .18em .72em !important;
    border-radius: 999px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.7 !important;
}
.theme--light .record-status--text.pass {
    background: var(--th-ok-bg) !important;
    color: var(--th-green) !important;
}
.theme--light .record-status--text.fail {
    background: var(--th-bad-bg) !important;
    color: var(--th-red) !important;
}
.theme--light .record-status--text.pending {
    background: var(--th-warn-bg) !important;
    color: var(--th-amber) !important;
}

/* ---------- 记录列表里的"重测 / 取消成绩"等行内按钮 ---------- */
.theme--light .data-table button.link {
    background: #eef3ff;
    border: 1px solid #dfe8fb;
    border-radius: 7px;
    padding: 1px 8px;
    font-size: 12.5px !important;
    color: #3d6be0 !important;
    margin-right: 4px;
    transition: background .15s ease;
}
.theme--light .data-table button.link:hover {
    background: #e0eaff;
    text-decoration: none;
}

/* ---------- 标签（题库/题目页）：药丸化 ---------- */
.theme--light .chip-list__item,
.theme--light .problem__tag-item {
    display: inline-block;
    padding: .22em .8em;
    border-radius: 999px;
    background: #eef3ff;
    color: #3d6be0;
    font-size: 13px;
    line-height: 1.7;
    margin: .12em .18em .12em 0;
    transition: background .15s ease, color .15s ease;
}
.theme--light a.chip-list__item:hover,
.theme--light a.problem__tag-item:hover {
    background: #dfe9ff;
    color: #2458d0;
    text-decoration: none;
}

/* ---------- 列表条目（比赛/训练/作业/讨论）：圆角 + 悬停 ---------- */
.theme--light .contest__item,
.theme--light .training__item,
.theme--light .homework__item,
.theme--light .discussion__item,
.theme--light .section__list__item {
    border-radius: 12px;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.theme--light .contest__item:hover,
.theme--light .training__item:hover,
.theme--light .homework__item:hover,
.theme--light .discussion__item:hover {
    background-color: #f6f9ff !important;
}
/* 比赛状态色条：由直角变圆角、颜色更柔和 */
.theme--light .page--contest_main .contest__item.live {
    border-left-color: #f9708a !important;
}
.theme--light .page--contest_main .contest__item.ready {
    border-left-color: #6aa5ff !important;
}

/* ---------- 比赛列表的"沉浸式"大卡片：修复白底白字 ----------
   官方给 .immersive--content 配的是白字（默认放在深色底上）；
   本皮肤把 .section 统一刷成了白卡 → 白字落在白底上什么都看不见。
   这里给沉浸卡恢复深色渐变底，正在进行=暖橙渐变（醒目）、未开始=蓝紫渐变。 */
.theme--light .section.immersive--content {
    background: linear-gradient(100deg, #4e7cfe 0%, #6a63ff 55%, #8b5cf6 100%) !important;
    border: none !important;
    box-shadow: 0 6px 22px rgba(78, 124, 254, .28) !important;
    color: #fff !important;
}
.theme--light .section.immersive--content.section--contest.live {
    background: linear-gradient(100deg, #ff8a5c 0%, #f65e7c 100%) !important;
    box-shadow: 0 6px 22px rgba(246, 94, 124, .30) !important;
}
.theme--light .section.immersive--content h1,
.theme--light .section.immersive--content h2,
.theme--light .section.immersive--content h3,
.theme--light .section.immersive--content .info li,
.theme--light .section.immersive--content .status_title,
.theme--light .section.immersive--content p,
.theme--light .section.immersive--content a:not(.button):not(.detail-button) {
    color: #fff !important;
}
.theme--light .section.immersive--content .info {
    opacity: .95;
}
.theme--light .section.immersive--content .info .icon {
    opacity: .9;
}

/* ---------- 题面排版（.typo）：呼吸感与可读性 ---------- */
.theme--light .typo {
    color: var(--th-text);
    line-height: 1.85;
}
.theme--light .typo h1,
.theme--light .typo h2,
.theme--light .typo h3,
.theme--light .typo h4 {
    color: var(--th-ink);
    font-weight: 700;
    line-height: 1.45;
}
.theme--light .typo h2 {
    margin-top: 1.7em;
    padding-bottom: .32em;
    border-bottom: 1px solid var(--th-line);
}
.theme--light .typo h3 {
    margin-top: 1.4em;
}
.theme--light .typo a:not(.user-profile-name):not(.media-link):not(.button) {
    color: var(--th-link);
}
.theme--light .typo a:not(.user-profile-name):not(.media-link):not(.button):hover {
    color: var(--th-link-hover);
}
.theme--light .typo code {
    background: #f1f5fb;
    border-radius: 6px;
    padding: .1em .42em;
    color: #c24061;
    font-size: .92em;
}
.theme--light .typo pre,
.theme--light pre {
    background: #f8fafd !important;
    border: 1px solid var(--th-line) !important;
    border-radius: 12px !important;
}
.theme--light .typo pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.theme--light .typo blockquote {
    border-left: 4px solid #c9d8ff !important;
    border-radius: 0 10px 10px 0;
    background: #f7f9ff;
    padding: 8px 16px;
    color: var(--th-text);
}

/* ---------- 题目页右侧栏菜单 ---------- */
.theme--light .section--problem-sidebar .menu {
    margin: 4px 8px 10px;
}
.theme--light .menu__link {
    border-radius: 9px;
    transition: background-color .15s ease, color .15s ease;
}
.theme--light .section--problem-sidebar .menu__link:hover {
    background: #f2f6ff;
    color: var(--th-link);
    text-decoration: none;
}
.theme--light .section--problem-sidebar .menu__link.highlight {
    color: var(--th-link);
    background: #eef3ff;
}

/* ---------- 按钮：主按钮渐变化 ---------- */
.theme--light .button:not(.codicon) {
    border-radius: var(--th-radius-sm) !important;
    transition: box-shadow .18s ease, transform .18s ease, filter .18s ease, background-color .18s ease;
}
.theme--light .button.primary:not(.codicon) {
    background: linear-gradient(135deg, #4e7cfe, #7b5cf6) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(78, 124, 254, .32);
}
.theme--light .button.primary:not(.codicon):hover,
.theme--light .button.primary:not(.codicon):focus {
    filter: brightness(1.06);
    box-shadow: 0 5px 18px rgba(78, 124, 254, .42);
    transform: translateY(-1px);
}
.theme--light .button:not(.codicon):not(.primary):hover {
    transform: translateY(-1px);
}

/* ---------- 表单控件 ---------- */
.theme--light input.textbox,
.theme--light textarea.textbox,
.theme--light span.textbox,
.theme--light select.select {
    border: 1px solid #e2e8f3 !important;
    border-radius: var(--th-radius-sm) !important;
    background: #fbfcfe !important;
    color: var(--th-text) !important;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.theme--light input.textbox:focus,
.theme--light textarea.textbox:focus,
.theme--light select.select:focus {
    border-color: var(--th-brand) !important;
    box-shadow: 0 0 0 3px rgba(78, 124, 254, .15) !important;
    outline: none !important;
    background: #fff !important;
}

/* ---------- 分页 ---------- */
.theme--light .pager.pager-bottom,
.theme--light .pager.pager-bottom .pager__item {
    border-top-color: transparent !important;
}
.theme--light .pager__item {
    border-radius: 8px;
    transition: background-color .15s ease, color .15s ease;
}
.theme--light .pager__item:hover {
    background: #eef3ff;
    text-decoration: none;
}

/* ---------- 页脚：融入底色，弱化边框 ---------- */
.theme--light .footer {
    background: transparent !important;
    color: var(--th-muted) !important;
}
.theme--light .footer__category {
    border-bottom-color: transparent !important;
}
.theme--light .footer a {
    color: #7c89a0 !important;
}
.theme--light .footer a:hover {
    color: var(--th-link) !important;
}
.theme--light .footer__extra-link-item {
    opacity: .9;
}

/* ---------- 细节：滚动条 / 选中色 / 链接过渡 ---------- */
.theme--light .section hr {
    border: 0 !important;
    height: 1px !important;
    background: var(--th-line) !important;
}
.theme--light ::selection {
    background: rgba(78, 124, 254, .18);
}
.theme--light ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.theme--light ::-webkit-scrollbar-thumb {
    background: #ccd6e8;
    border-radius: 999px;
    border: 2px solid var(--th-bg);
}
.theme--light ::-webkit-scrollbar-thumb:hover {
    background: #b4c2da;
}
.theme--light ::-webkit-scrollbar-track {
    background: transparent;
}

/* ---------- 移动端顶栏保持一致 ---------- */
.theme--light .header--mobile {
    background: linear-gradient(100deg, #4e7cfe, #8b5cf6) !important;
}
.theme--light .header--mobile,
.theme--light .header--mobile a {
    color: #fff !important;
}

/* ---------- 尊重"减少动态效果"偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    .theme--light .section,
    .theme--light .button:not(.codicon),
    .theme--light .data-table tbody tr {
        transition: none !important;
    }
    .theme--light .button.primary:not(.codicon):hover,
    .theme--light .button:not(.codicon):not(.primary):hover {
        transform: none;
    }
}

/* ---------- 平铺导航（2026-10-24 v4）：单行 + 垂直居中，沿用原蓝紫渐变底 ---------- */
.nav_more{display:none !important}

/* 导航条本体：沿用原渐变，高度由内容决定 */
.theme--light .nav.nav{
  height:auto !important;
  min-height:0 !important;
  padding:0 !important;
}
.theme--light .nav.nav > .row{padding:0 !important;margin:0 !important;max-width:100% !important;width:100% !important}
.theme--light .nav.nav .columns{padding:0 16px !important}

/* 列表：单行 flex，垂直居中；不写死 height，避免与内部 a 的高度冲突 */
.theme--light .nav__list--main{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  min-height:56px !important;
  height:auto !important;
  gap:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:visible !important;
}
.theme--light .nav__list--main > .nav__list-item{
  float:none !important;
  margin:0 !important;
  padding:0 !important;
  display:flex !important;
  align-items:center !important;
  height:auto !important;
  min-height:56px !important;
  line-height:1 !important;
  position:relative;
}

/* LOGO：钉在最左，与导航文字同一条水平中线 */
.theme--light .nav__list--main > .nav__list-item:first-child{margin-right:8px !important}
.theme--light .nav__list--main .nav__logo{
  display:block !important;
  height:30px !important;
  width:auto !important;
  max-height:30px !important;
  margin:0 !important;
  vertical-align:middle !important;
}
.theme--light .nav__list--main > .nav__list-item:first-child > a{
  display:flex !important;
  align-items:center !important;
  min-height:56px !important;
}

/* 导航文字：紧凑、居中、不换行；颜色沿用原主题白字（此处不改配色，只改布局） */
.theme--light .nav__list--main > .nav__list-item > .nav__item{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:36px !important;
  height:auto !important;
  padding:0 6px !important;
  font-size:14.5px !important;
  line-height:36px !important;
  white-space:nowrap !important;
  border-radius:6px;
  margin:0 !important;
}
/* 去掉原主题的小三角下划线装饰，避免与中线错位（激活态保留底部圆角下划线） */
.theme--light .nav__list--main > .nav__list-item > .nav__item::before{display:none !important}

/* 窄屏：允许横向滚动，不折行、不回到「更多」 */
@media (max-width:1100px){
  .theme--light .nav__list--main{overflow-x:auto !important;overflow-y:hidden !important;scrollbar-width:none}
  .theme--light .nav__list--main::-webkit-scrollbar{display:none}
}

/* 正文顶部留白由 /flatnav.js 按实测导航高度设置，这里只兜底 */
#panel{margin-top:56px !important}

/* 右侧 Hydro 下拉（nav__list--secondary）：从第二行提到同一行右端 */
.theme--light .nav.nav > .row{display:flex !important;align-items:center !important;justify-content:space-between !important}
.theme--light .nav.nav > .row > .columns{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:nowrap !important;
  width:100% !important;
  max-width:100% !important;
}
.theme--light .nav__list--secondary{
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  margin:0 0 0 6px !important;
  padding:0 !important;
  min-height:56px !important;
  height:auto !important;
  float:none !important;
  flex:0 0 auto;
}
.theme--light .nav__list--secondary > .nav__list-item{
  float:none !important;
  display:flex !important;
  align-items:center !important;
  height:auto !important;
  min-height:56px !important;
  margin:0 !important;
  padding:0 !important;
}
.theme--light .nav__list--secondary .nav__item,
.theme--light .nav__list--secondary a{
  display:flex !important;
  align-items:center !important;
  min-height:36px !important;
  padding:0 7px !important;
  font-size:13.5px !important;
  line-height:36px !important;
  white-space:nowrap !important;
}

/* 页面主体：nav 已 fixed 且由 /flatnav.js 补足留白，去掉 .main 自带的大段顶部内边距 */
.theme--light #panel > .main,
.theme--light .main{
  padding-top:16px !important;
}
