@charset "utf-8";

/* 自定义样式（配合 Tailwind 使用，全部放入 layer，避免覆盖工具类） */

@layer base {
  body {
    font-family: "微软雅黑", "Microsoft YaHei", "PingFang SC", "Helvetica Neue",
      Arial, sans-serif;
    font-size: 14px;
    color: #222;
    letter-spacing: 0;
    text-align: left;
    background-color: #eeedfc;
    -webkit-text-size-adjust: none;
    -webkit-tap-highlight-color: transparent;
  }
  a {
    color: #222;
    text-decoration: none;
    cursor: pointer;
  }
}

@layer components {
  /* 区块标题（紫色竖线） */
  .sec-title {
    font-size: 18px;
    font-weight: bold;
    padding: 10px 0 10px 10px;
  }
  .sec-title::before {
    content: "";
    border-left: 6px solid #bc45fb;
    margin-right: 10px;
  }

  /* 内页区块标题（蓝紫色竖线） */
  .page-title {
    font-size: 20px;
    padding: 10px 0;
  }
  .page-title::before {
    content: "";
    border-left: 6px solid #5246f2;
    margin-right: 10px;
  }

  /* 桌面端导航 */
  .main-nav a {
    position: relative;
    font-size: 18px;
    transition: color 0.3s;
  }
  .main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -16px;
    width: 100%;
    border-bottom: 0 solid #bc45fb;
    opacity: 0;
    transition: all 0.3s;
  }
  .main-nav a:hover,
  .main-nav a.active {
    color: #bc45fb;
  }
  .main-nav a:hover::after,
  .main-nav a.active::after {
    border-bottom-width: 6px;
    opacity: 1;
  }

  /* 首页快捷按钮 */
  .quick-btn {
    background-color: #edecfe;
    color: #000;
    transition: all 0.3s;
  }
  .quick-btn svg {
    width: 24px;
    height: 24px;
    margin-right: 4px;
    color: #cc39ff;
    flex-shrink: 0;
    transition: color 0.3s;
  }
  .quick-btn:hover,
  .quick-btn.active {
    background-color: #5546fb;
    color: #fff;
  }
  .quick-btn:hover svg,
  .quick-btn.active svg {
    color: #fff;
  }

  /* 图片按钮：报名参赛 / 下载参赛手册 */
  .buttonbm {
    display: inline-block;
    width: 129px;
    height: 38px;
    background: url(../images/buttonbm2.png) no-repeat;
    background-size: contain;
  }
  .buttondl {
    display: inline-block;
    width: 140px;
    height: 36px;
    background: url(../images/buttondl2.png) no-repeat;
    background-size: contain;
  }
  .buttonbm:hover,
  .buttondl:hover {
    opacity: 0.8;
  }

  /* 分页（配合 inc/page.volt 的类名） */
  .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 20px 0;
    margin: 0;
  }
  .pagination li {
    list-style: none;
  }
  .pagination li a,
  .pagination li > span {
    display: inline-block;
    min-width: 32px;
    height: 32px;
    line-height: 32px;
    padding: 0 8px;
    box-sizing: border-box;
    text-align: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #222;
    font-size: 14px;
    transition: all 0.2s;
  }
  .pagination li a:hover {
    border-color: #5545fb;
    color: #5545fb;
  }
  .pagination li.active a {
    background: #5545fb;
    border-color: #5545fb;
    color: #fff;
  }
  .pagination li.disabled span {
    color: #bbb;
  }
  .pagination li.pagination_title span {
    border: none;
    background: transparent;
    color: #666;
  }
  .pagination li.pagination_title span span {
    display: inline;
    padding: 0;
    border: none;
    line-height: inherit;
    min-width: 0;
  }
  .pagination .glyphicon-step-backward::before {
    content: "首";
  }
  .pagination .glyphicon-step-forward::before {
    content: "尾";
  }
  @media (max-width: 767px) {
    .hidden-xs {
      display: none;
    }
  }

  /* bootstrap tooltip 最小样式（c.js 表单校验错误提示用；绝对定位浮层，不占布局空间） */
  .tooltip {
    position: absolute;
    z-index: 1070;
    display: block;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0;
    word-wrap: break-word;
  }
  .tooltip.in {
    opacity: 1;
  }
  .tooltip.top {
    margin-top: -3px;
    padding: 5px 0;
  }
  .tooltip.right {
    margin-left: 3px;
    padding: 0 5px;
  }
  .tooltip.bottom {
    margin-top: 3px;
    padding: 5px 0;
  }
  .tooltip.left {
    margin-left: -3px;
    padding: 0 5px;
  }
  .tooltip-inner {
    max-width: 220px;
    padding: 4px 10px;
    color: #fff;
    text-align: center;
    background-color: #e5533d;
    border-radius: 4px;
  }
  .tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
  }
  .tooltip.top .tooltip-arrow {
    bottom: 0;
    left: 50%;
    margin-left: -5px;
    border-width: 5px 5px 0;
    border-top-color: #e5533d;
  }
  .tooltip.bottom .tooltip-arrow {
    top: 0;
    left: 50%;
    margin-left: -5px;
    border-width: 0 5px 5px;
    border-bottom-color: #e5533d;
  }
  .tooltip.left .tooltip-arrow {
    top: 50%;
    right: 0;
    margin-top: -5px;
    border-width: 5px 0 5px 5px;
    border-left-color: #e5533d;
  }
  .tooltip.right .tooltip-arrow {
    top: 50%;
    left: 0;
    margin-top: -5px;
    border-width: 5px 5px 5px 0;
    border-right-color: #e5533d;
  }

  /* 表单校验状态（c.js highlight/unhighlight 添加的类名） */
  input.error,
  select.error,
  textarea.error {
    border-color: #e5533d !important;
  }

  /* bootbox / bootstrap 模态框最小样式（新页面无 bootstrap CSS 时保证弹窗正常） */
  .modal-open {
    overflow: hidden;
  }
  .modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    outline: 0;
  }
  .modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: #000;
  }
  .modal-backdrop.fade {
    opacity: 0;
  }
  .modal-backdrop.in {
    opacity: 0.5;
  }
  .modal-dialog {
    position: relative;
    width: auto;
    margin: 80px 16px;
  }
  @media (min-width: 768px) {
    .modal-dialog {
      max-width: 600px;
      margin: 100px auto;
    }
    .modal-dialog.modal-sm {
      max-width: 320px;
    }
  }
  @media (min-width: 992px) {
    .modal-dialog.modal-lg {
      max-width: 900px;
    }
  }
  .modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  }
  .modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: bold;
  }
  .modal-header .close,
  .bootbox-close-button {
    float: right;
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: #999;
    cursor: pointer;
  }
  .modal-body {
    padding: 18px;
    font-size: 14px;
    line-height: 1.6;
  }
  .modal-footer {
    padding: 12px 18px;
    border-top: 1px solid #eee;
    text-align: right;
  }
  .modal .btn {
    display: inline-block;
    margin-left: 8px;
    padding: 7px 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .modal .btn:hover {
    border-color: #9f53b7;
    color: #9f53b7;
  }
  .modal .btn-primary {
    background: #9f53b7;
    border-color: #9f53b7;
    color: #fff;
  }
  .modal .btn-primary:hover {
    background: #b764d2;
    color: #fff;
  }
  .fade {
    transition: opacity 0.15s linear;
    opacity: 0;
  }
  .fade.in {
    opacity: 1;
  }

  /* 移动端汉堡按钮 */
  .menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    transition: all 0.3s;
  }
  .menu-btn span + span {
    margin-top: 5px;
  }
  .menu-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-btn.open span:nth-child(2) {
    opacity: 0;
  }
  .menu-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Tailwind 的 `collapse` 工具类（visibility:collapse）与 bootstrap 3 的 .collapse 类同名，
   会把旧页面的折叠导航整个隐藏。放在 layer 外强制恢复可见性。
   注意：因此新页面不要使用 Tailwind 的 collapse 工具类。 */
.collapse {
  visibility: visible;
}
