/* ==========================================================================
   赛练中心 · 浅蓝质感主题（sailian.css）
   在 template/bs3/css.php 末尾加载，覆盖 bootstrap3 + white.css
   配色：主 #2C80E8 / 辅 #5AA8F5 / 深 #1F66B8 / 浅底 #EAF3FE / 描边 #cfe3fb
   作用范围：问题、来源/分类、排名、竞赛&作业、状态、提交、题目详情等全站页面
   ========================================================================== */

/* ---------- 1. 基础 ---------- */
body {
  background: #f4f9ff;
  background-image: linear-gradient(180deg, #f7fbff 0%, #eaf3fd 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #24384d;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 10px;
}

a { color: #2C80E8; }
a:hover, a:focus { color: #1F66B8; text-decoration: none; }

h1, h2, h3, h4, h5 { color: #1f4e79; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

hr { border-top-color: #e3eefb; }

::selection { background: #cfe6ff; color: #14497f; }

/* ---------- 2. 导航栏 ---------- */
.navbar-default {
  background: #fff;
  border-color: #dbeafe;
  border-radius: 0;
  box-shadow: 0 1px 4px rgba(44, 128, 232, .08);
  margin-bottom: 0;
}
.navbar-default .navbar-nav > li > a { color: #3a5570; }
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus { background: #F2F8FF; color: #1F66B8; }
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
  background: #EAF3FE;
  color: #1F66B8;
  border-radius: 5px;
}
.navbar-default .navbar-brand { color: #1F66B8; font-weight: 700; }
.navbar-default .navbar-toggle { border-color: #cfe3fb; }
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus { background: #EAF3FE; }
.navbar-default .navbar-toggle .icon-bar { background: #2C80E8; }
.navbar-default .navbar-collapse { border-color: #e3eefb; }
.navbar-default .navbar-text { color: #5b7691; }

.dropdown-menu {
  border: 1px solid #cfe3fb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(44, 128, 232, .13);
  padding: 6px;
}
.dropdown-menu > li > a { color: #3a5570; border-radius: 6px; padding: 7px 14px; }
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus { background: #EAF3FE; color: #1F66B8; }
.dropdown-menu > .divider { background-color: #e8f1fc; margin: 5px 0; }

/* ---------- 3. 主内容卡片 ---------- */
.container .jumbotron {
  background-color: #fdfeff;
  background-image: linear-gradient(180deg, #f7fbff 0%, #eaf3fd 100%);
  border: 1px solid #dfeafd;
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(44, 128, 232, .07);
  padding: 18px 20px 20px;
  margin-top: 16px;
  margin-bottom: 14px;
}
.jumbotron > h2:first-child,
.jumbotron > h3:first-child { margin-top: 4px; }

/* 顶部公告：居中浅蓝提示条（js.php 输出 .sailian-notice） */
.jumbotron > .sailian-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #dbe9f8;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(44, 128, 232, .05);
  color: #1F66B8;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.sailian-notice .sn-ico { flex: 0 0 auto; font-size: 15px; line-height: 1; opacity: .9; }
.sailian-notice .sn-txt { min-width: 0; }
.sailian-notice .sn-txt * {
  font-size: 14px !important;
  color: #1F66B8 !important;
  font-family: inherit !important;
  line-height: 1.6 !important;
}

/* 兼容旧版仍用 marquee 的页面 */
.jumbotron > marquee.toprow {
  margin: 0 0 14px !important;
  padding: 7px 12px !important;
  height: auto !important;
  line-height: 1.6;
  background: #fff !important;
  border: 1px solid #dbe9f8;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(44, 128, 232, .05);
}
.jumbotron > marquee.toprow * {
  font-size: 14px !important;
  color: #1F66B8 !important;
  font-family: inherit !important;
  line-height: 1.6 !important;
}

/* ---------- 4. 表格 ---------- */
.jumbotron table {
  border-collapse: collapse;
}
.table {
  margin-bottom: 14px;
}
.jumbotron table.table {
  background: #fff;
  border: 1px solid #dbe9fb;
  border-radius: 4px;
}
.table > thead > tr > td,
.table > thead > tr > th,
.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td,
.table > tfoot > tr > th { border-color: #eaf2fc; }

/* 表头：HUSTOJ 用 <td class="toprow">，bootstrap 用 <th>，两种都覆盖 */
.table > thead > tr > td,
.table > thead > tr > th,
table tr.toprow > td,
table tr.toprow > th {
  background: #EAF3FE;
  background-image: none;
  color: #1F66B8;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid #d6e8fb;
  white-space: nowrap;
}
.table > tbody > tr > td {
  border-top: 1px solid #eff5fd;
  padding-top: 9px;
  padding-bottom: 9px;
  vertical-align: middle;
  color: #24384d;
  font-size: 13.5px;
}
.table > tbody > tr > td a { color: #2C80E8; }
.table > tbody > tr > td a:hover { color: #1F66B8; text-decoration: underline; }

/* 斑马纹：白色 / 极浅蓝，替换 bootstrap 的灰 */
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #f8fbff; }
.table-striped > tbody > tr:nth-of-type(even) { background-color: #fff; }
.table-striped > tbody > tr:hover { background-color: #F2F8FF; }
.table > tbody > tr.evenrow { background-color: #fff; }
.table > tbody > tr.oddrow { background-color: #f8fbff; }

/* 排名页：前三名名次低调上色（ranklist.php 表格已加 id="ranklist"） */
table#ranklist > tbody > tr:nth-child(1) > td:first-child { color: #D08A00; font-weight: 700; }
table#ranklist > tbody > tr:nth-child(2) > td:first-child { color: #6E859D; font-weight: 700; }
table#ranklist > tbody > tr:nth-child(3) > td:first-child { color: #B5713E; font-weight: 700; }

/* 排名页「日榜/周榜/月榜/年榜」切换：做成小胶囊，避免四个词挤成一串 */
.jumbotron table[align="right"] { margin-bottom: 8px; }
.jumbotron table a[href*="scope="] {
  display: inline-block;
  padding: 3px 10px;
  margin-left: 2px;
  border-radius: 999px;
  font-size: 13px;
}
.jumbotron table a[href*="scope="]:hover { background: #EAF3FE; }

/* ---------- 5. 分页 ---------- */
.pagination { margin: 8px 0 6px; }
.pagination > li { display: inline-block; float: none; }
.pagination > li > a,
.pagination > li > span {
  color: #2C80E8;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  margin: 0 3px;
  padding: 5px 11px;
  font-size: 13px;
  line-height: 1.5;
}
.pagination > li > a:hover,
.pagination > li > a:focus {
  background: #EAF3FE;
  border-color: #a9cdf8;
  color: #1F66B8;
}
.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > a:focus {
  background: linear-gradient(180deg, #5AA8F5 0%, #2C80E8 100%);
  border-color: #2C80E8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(44, 128, 232, .32);
}
.pagination > .disabled > a,
.pagination > .disabled > span {
  color: #a9bccf;
  background: #f6faff;
  border-color: #eaf1fa;
}

/* ---------- 6. 表单 / 按钮 ---------- */
.form-control {
  height: 34px;
  padding: 5px 10px;
  font-size: 13px;
  color: #24384d;
  background: #fff;
  border: 1px solid #cfe3fb;
  border-radius: 8px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus {
  border-color: #5AA8F5;
  box-shadow: 0 0 0 3px rgba(90, 168, 245, .16);
}
.form-control::placeholder { color: #9db4cb; }
select.form-control { padding-top: 6px; }
textarea.form-control { height: auto; }

button.form-control {
  color: #1F66B8;
  font-weight: 500;
  background: #fff;
  cursor: pointer;
}
button.form-control:hover,
button.form-control:focus {
  background: #EAF3FE;
  border-color: #9cc6f7;
  color: #1F66B8;
}

/* 登录 / 注册页的主操作按钮：默认白底太弱，改主色 */
.jumbotron form button[type="submit"].btn-default {
  background: linear-gradient(180deg, #5AA8F5 0%, #2C80E8 100%);
  border-color: #2C80E8;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  /* bootstrap3 给 .btn-default 留了 text-shadow:0 1px 0 #fff，
     白字配白阴影会把笔画糊开，看着发虚 —— 必须去掉 */
  text-shadow: none;
  box-shadow: 0 2px 8px rgba(44, 128, 232, .26);
}
.jumbotron form button[type="submit"].btn-default:hover,
.jumbotron form button[type="submit"].btn-default:focus {
  background: linear-gradient(180deg, #4A9BEF 0%, #1F66B8 100%);
  border-color: #1F66B8;
  color: #fff;
}

.btn { border-radius: 8px; font-size: 13px; text-shadow: none; }
.btn-primary {
  background: linear-gradient(180deg, #5AA8F5 0%, #2C80E8 100%);
  border-color: #2C80E8;
  box-shadow: 0 2px 8px rgba(44, 128, 232, .26);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background: linear-gradient(180deg, #4A9BEF 0%, #1F66B8 100%);
  border-color: #1F66B8;
}
.btn-default { background: #fff; border-color: #cfe3fb; color: #1F66B8; }
.btn-default:hover, .btn-default:focus { background: #EAF3FE; border-color: #9cc6f7; color: #1F66B8; }
.btn-success { background: linear-gradient(180deg, #45C98A, #22A566); border-color: #22A566; }
.btn-danger { background: linear-gradient(180deg, #F07A72, #D9534F); border-color: #D9534F; }
.btn-info { background: linear-gradient(180deg, #5FBFE8, #2E9CCB); border-color: #2E9CCB; }
.btn-warning { background: linear-gradient(180deg, #F5B95C, #E39B22); border-color: #E39B22; }

/* 搜索框组（题目编号 / 来源分类） */
.search-query { min-width: 150px; }

/* ---------- 7. 标签 / 徽章 ---------- */
.label {
  border-radius: 999px;
  padding: .32em .78em;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-shadow: none;
  background-image: none;
  box-shadow: none;
  vertical-align: middle;
}
.label-default { background: #EEF4FB; color: #5b7691; }
.label-primary { background: #EAF3FE; color: #1F66B8; }
.label-success { background: #E3F7EC; color: #17794A; }
.label-info    { background: #E4F3FB; color: #146C8F; }
.label-warning { background: #FFF3E0; color: #A9660B; }
.label-danger  { background: #FDECEC; color: #C0392B; }

.badge { background: #5AA8F5; border-radius: 999px; font-weight: 500; }
.badge.badge-danger { background: #E4635C; }

/* 状态页的结果标签稍作加粗，保证一眼能分辨 */
.table .label { min-width: 46px; display: inline-block; }
.table .label-success { background: #DCF4E7; color: #116B3F; }
.table .label-danger  { background: #FCE6E5; color: #B4332C; }
.table .label-warning { background: #FFF0D6; color: #9A5A00; }

/* ---------- 8. 面板 / 提示 / 其它组件 ---------- */
.panel {
  border: 1px solid #e3eefb;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(44, 128, 232, .06);
  background: #fff;
}
.panel > .panel-heading {
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  border-bottom: 1px solid #e3eefb;
  color: #1f4e79;
  border-radius: 13px 13px 0 0;
  padding: 12px 16px;
}
.panel > .panel-heading h3 { margin: 0; font-size: 16px; font-weight: 700; color: #1f4e79; }
.panel > .panel-footer {
  background: #fbfdff;
  border-top: 1px solid #eef4fc;
  border-radius: 0 0 13px 13px;
}

.alert {
  border: 1px solid #cfe3fb;
  border-radius: 10px;
  background: #F2F8FF;
  color: #1F66B8;
}
.alert-success { background: #EDF9F2; border-color: #c5e9d5; color: #17794A; }
.alert-danger  { background: #FDF0F0; border-color: #f5c9c7; color: #B33A32; }
.alert-warning { background: #FFF7EA; border-color: #f7e0b8; color: #9A5A00; }
.alert-info    { background: #F2F8FF; border-color: #cfe3fb; color: #1F66B8; }

.well {
  background: #F7FBFF;
  border: 1px solid #dfeafd;
  border-radius: 12px;
  box-shadow: none;
}

.nav-tabs { border-bottom-color: #dfeafd; }
.nav-tabs > li > a { color: #5b7691; border-radius: 10px 10px 0 0; border-color: transparent; }
.nav-tabs > li > a:hover { background: #F2F8FF; border-color: transparent; color: #1F66B8; }
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: #1F66B8;
  background: #fff;
  border-color: #dfeafd #dfeafd #fff;
  font-weight: 600;
}

.list-group-item { border-color: #eaf2fc; color: #24384d; }
.list-group-item.active,
.list-group-item.active:hover {
  background: #2C80E8;
  border-color: #2C80E8;
}

.modal-content { border-radius: 14px; border-color: #dfeafd; box-shadow: 0 12px 40px rgba(31, 102, 184, .18); }
.modal-header { border-bottom-color: #eaf2fc; }
.modal-footer { border-top-color: #eaf2fc; }

.progress { border-radius: 999px; box-shadow: none; background: #EDF4FD; height: 10px; }
.progress-bar { background: linear-gradient(180deg, #5AA8F5, #2C80E8); }

pre {
  background: #FBFDFF;
  border: 1px solid #e3eefb;
  border-radius: 10px;
  color: #26435e;
}
code { background: #EEF5FD; color: #1F66B8; border-radius: 4px; }
pre code { background: transparent; color: inherit; }

/* ---------- 9. 页脚 ---------- */
#footer {
  color: #8aa4bd;
  font-size: 12px;
  padding: 16px 0 10px;
}
#footer a { color: #5AA8F5; }

/* ---------- 10. 移动端 ---------- */
@media (max-width: 767px) {
  .container .jumbotron {
    padding: 12px 10px 14px;
    border-radius: 12px;
    margin-top: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .jumbotron table,
  .jumbotron table.table { width: 100% !important; }
  .jumbotron table td,
  .jumbotron table th { padding: 6px 4px; word-break: break-word; }
  .table > tbody > tr > td { font-size: 12.5px; }
  .table > thead > tr > td { font-size: 12px; }
  .pagination > li > a,
  .pagination > li > span { padding: 4px 8px; margin: 0 2px; }
  .navbar-default .navbar-nav > li > a { padding-top: 9px; padding-bottom: 9px; }
  .jumbotron > marquee.toprow { padding: 5px 8px !important; }
}
