/*
 * RSTOJ 网站皮肤：活泼渐变（vivid）
 * 加载顺序：css.php 末尾、kid_theme.css 之后（全站最后一个样式表）
 * 设计语言：紫→粉主渐变 + 琥珀/青绿点缀；彩色难度胶囊、四色标签、悬停微动效
 * 仅做视觉覆盖，不改功能结构；关闭皮肤（OJ_SKIN=default）即完全还原
 */

:root {
  --vx-purple: #6d5cff;
  --vx-violet: #9b5cff;
  --vx-pink:   #ff5c8a;
  --vx-amber:  #ffb64d;
  --vx-teal:   #2fbf9b;
  --vx-bg:     #fbfaff;
  --vx-ink:    #1c1b29;
  --vx-ink2:   #44425a;
  --vx-muted:  #7a7890;
  --vx-line:   #e8e6f2;
}

/* ===== 整体页面 ===== */
body {
  background: linear-gradient(160deg, #fbfaff 0%, #f5f2ff 55%, #fdf3f7 100%) !important;
  color: var(--vx-ink) !important;
}

/* ===== 顶部导航：白底 + 渐变 logo + 紫色激活态 ===== */
#page-header.ui.menu {
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid var(--vx-line) !important;
  box-shadow: 0 2px 12px rgba(109, 92, 255, .08) !important;
}
#page-header .header.item span {
  background: linear-gradient(120deg, #6d5cff 20%, #ff5c8a 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--vx-purple) !important;
}
#page-header .item {
  color: var(--vx-muted) !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  margin: 6px 3px !important;
  transition: color .15s ease, background .15s ease !important;
}
#page-header .item:hover {
  color: var(--vx-purple) !important;
  background: #f1efff !important;
}
#page-header .item.active {
  color: var(--vx-purple) !important;
  background: #f1efff !important;
  box-shadow: none !important;
}
#page-header .ui.dropdown.item,
#page-header .ui.dropdown.item > i.icon {
  color: var(--vx-muted) !important;
}

/* 用户下拉菜单：白卡片 + 紫色悬停 */
#page-header .ui.dropdown .menu {
  background: #FFFFFF !important;
  border: 1px solid var(--vx-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 28px rgba(109, 92, 255, .16) !important;
  padding: 6px !important;
}
#page-header .ui.dropdown .menu > .item {
  color: var(--vx-ink2) !important;
  background: transparent !important;
  border-radius: 9px !important;
  margin: 2px 0 !important;
  transform: none !important;
}
#page-header .ui.dropdown .menu > .item:hover,
#page-header .ui.dropdown .menu > .item:focus {
  background: #f1efff !important;
  color: var(--vx-purple) !important;
  transform: none !important;
}
#page-header .ui.dropdown .menu > .item span#red {
  color: var(--vx-pink) !important;
}

/* ===== 登录/注册按钮 ===== */
#page-header .ui.button {
  border-radius: 11px !important;
  font-weight: 650 !important;
}
#page-header .ui.primary.button {
  background: linear-gradient(135deg, #6d5cff, #8a5cff) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px -4px rgba(109, 92, 255, .55) !important;
}

/* ===== 容器与卡片 ===== */
.ui.container { border-radius: 14px !important; }
.ui.segment {
  border: 1px solid var(--vx-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px -6px rgba(28, 27, 41, .10) !important;
  background: #FFFFFF !important;
}
.ui.segment:hover {
  box-shadow: 0 8px 22px -10px rgba(109, 92, 255, .28) !important;
}
.ui.card, .ui.cards > .card {
  border: 1px solid var(--vx-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px -6px rgba(28, 27, 41, .10) !important;
  transition: transform .16s ease, box-shadow .16s ease !important;
}
.ui.card:hover, .ui.cards > .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -14px rgba(109, 92, 255, .35) !important;
}
.card > .content > .header, .ui.card .header { color: var(--vx-ink) !important; }

/* attached 标题/内容块（首页、题目页通用骨架） */
.ui.attached.header {
  border-radius: 14px 14px 0 0 !important;
  font-weight: 700 !important;
  color: var(--vx-ink) !important;
  background: #fdfcff !important;
}
.ui.bottom.attached.segment {
  border-radius: 0 0 14px 14px !important;
}

/* ===== 按钮：圆润 + 微动效 ===== */
.ui.button {
  border-radius: 11px !important;
  font-weight: 650 !important;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease !important;
}
.ui.button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.ui.button:active { transform: translateY(0) scale(.98); }
.ui.primary.button,
.ui.teal.button,
.ui.green.button {
  background: linear-gradient(135deg, #6d5cff, #8a5cff) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -4px rgba(109, 92, 255, .5) !important;
}
.ui.positive.button { background: linear-gradient(135deg, #2fbf9b, #31c98f) !important; color: #fff !important; }
.ui.negative.button,
.ui.red.button { background: linear-gradient(135deg, #ff5c8a, #ff7a5c) !important; color: #fff !important; }

/* ===== 表格 ===== */
.ui.table thead th {
  background: #fdfcff !important;
  color: #a6a4ba !important;
  font-weight: 650 !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .86em !important;
}
.ui.table tr:hover td { background: #fbfaff !important; }
.ui.table { border-radius: 14px !important; overflow: hidden; }

/* ===== 标签：四色轮换软底 ===== */
.ui.label {
  border-radius: 8px !important;
  font-weight: 600 !important;
  background: #f1efff !important;
  color: #6d5cff !important;
}
.ui.basic.label { background: #f1efff !important; }
.ui.label:nth-of-type(4n+2) { background: #e5f7f4 !important; color: #0f9582 !important; }
.ui.label:nth-of-type(4n+3) { background: #fff3dd !important; color: #c07a10 !important; }
.ui.label:nth-of-type(4n+4) { background: #ffe9f0 !important; color: #d43b7a !important; }
.ui.green.label  { background: #e8f9ef !important; color: #199a55 !important; }
.ui.orange.label { background: #fff3dd !important; color: #c07a10 !important; }
.ui.purple.label { background: #f1efff !important; color: #6d3fd6 !important; }
.ui.red.label    { background: #ffe9ec !important; color: #d43b5e !important; }
.ui.blue.label   { background: #e6f0ff !important; color: #2160d3 !important; }
.ui.teal.label   { background: #e5f7f4 !important; color: #0f9582 !important; }

/* ===== 难度胶囊（difficulty.inc.php 内联色，!important 覆盖为同色系更饱和版本） ===== */
.oj-diff-badge { font-weight: 700 !important; }
.oj-diff-filter {
  background: #fdfcff !important;
  border: 1.5px solid var(--vx-line) !important;
  border-radius: 14px !important;
}
.oj-diff-pill {
  border-radius: 999px !important;
  font-weight: 600 !important;
  background: #fff !important;
  border: 1.5px solid var(--vx-line) !important;
  color: var(--vx-muted) !important;
  transition: all .14s ease !important;
}
.oj-diff-pill:hover { border-color: var(--vx-purple) !important; color: var(--vx-purple) !important; }
.oj-diff-pill.on {
  background: linear-gradient(135deg, #6d5cff, #8a5cff) !important;
  border-color: transparent !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 10px -3px rgba(109, 92, 255, .5) !important;
}

/* ===== 分页 ===== */
.ui.pagination.menu {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.ui.pagination.menu .item {
  border-radius: 9px !important;
  margin: 0 2px !important;
  color: var(--vx-muted) !important;
  background: #fff !important;
  border: 1px solid var(--vx-line) !important;
}
.ui.pagination.menu .item.active {
  background: linear-gradient(135deg, #6d5cff, #8a5cff) !important;
  color: #fff !important;
  border-color: transparent !important;
  font-weight: 700 !important;
}

/* ===== 输入框 ===== */
.ui.input input, .ui.selection.dropdown {
  border-radius: 11px !important;
  border-color: var(--vx-line) !important;
}
.ui.input input:focus { border-color: var(--vx-purple) !important; }

/* ===== 题目页侧栏块 ===== */
.prob-side .side-block { border-radius: 14px !important; }

/* ===== 标题装饰（接管儿童主题的星星） ===== */
h1, h2, h3 { color: var(--vx-ink) !important; }
h2::before { content: none !important; }

/* ===== 首页英雄横幅：紫→粉渐变 ===== */
.kid-hero {
  background: linear-gradient(105deg, #6d5cff 0%, #9b5cff 45%, #ff5c8a 100%) !important;
  border-radius: 20px !important;
  box-shadow: 0 14px 34px -12px rgba(109, 92, 255, .5) !important;
}
.kid-hero-text h1 { color: #fff !important; }
.kid-hero-text p  { color: rgba(255, 255, 255, .88) !important; }
.kid-btn-orange { background: linear-gradient(135deg, #ffffff, #f2f0ff) !important; color: #6d5cff !important; }
.kid-btn-teal   { background: rgba(255, 255, 255, .18) !important; color: #fff !important; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55) !important; }

/* ===== 快捷入口卡片 ===== */
.kid-quick {
  border: 1px solid var(--vx-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 3px 10px -6px rgba(28, 27, 41, .12) !important;
}
.kid-quick:hover {
  box-shadow: 0 12px 24px -10px rgba(109, 92, 255, .35) !important;
  text-decoration: none !important;
}
.kid-quick b { color: var(--vx-ink) !important; }
.kid-quick small { color: var(--vx-muted) !important; }

/* ===== 页脚 ===== */
#footer, footer { color: var(--vx-muted) !important; }

/* ===== 移动端 ===== */
@media (max-width: 991px) {
  #page-header.ui.menu { background: #fff !important; }
}
