/* ============================================
   CTF 题目卡片 - 现代简约风格
   ============================================ */

.challenge-card {
    background: #ffffff;
    border: 1px solid #e8e9eb;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 0.01rem 0.1rem rgba(0, 0, 0, 0.05);
}

.challenge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(101, 176, 254, 0.15);
    border-color: #65b0fe;
}

.challenge-card .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 6px;
    font-weight: 500;
}

.card-title {
    font-size: 1.0rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

.cardbody {
    min-height: 100px;
}

.text-warning, .text-primary, .text-success {
    font-weight: 500;
}

.text-muted {
    color: #6b7280 !important;
}

.challenge-type small {
    font-size: 0.75rem;
}

/* 筛选标签激活状态 */
.active-type {
    color: #1890ff !important;
    font-weight: 600;
}

.challenge-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.challenge-item:hover {
    background-color: #f9fafb;
}

.challenge-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.challenge-info {
    font-size: 0.9rem;
    font-weight: 500;
}

.challenge-meta {
    font-size: 0.8rem;
}
#page-loading-overlay {
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#toast-container .alert {
    max-width: 300px;
    margin-bottom: 10px;
    opacity: 0.9;
    transition: opacity 0.15s linear;
}

#toast-container .alert:hover {
    opacity: 1;
}

.custom-info-card {
    border: none;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
  }
  
  .custom-info-card.border-left-warning {
    border-left: 4px solid #ffc107;
  }
  
  .custom-info-card-body {
    padding: 1.25rem;
  }
  
  .custom-info-card-title {
    color: rgb(19, 132, 150);
    font-weight: bold;
    margin-bottom: 0.75rem;
    font-size: 1rem;
  }
  


/* 题目提示 */


.custom-info-card-text a {
  color: #007bff;
  text-decoration: none;
}

.custom-info-card-text a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* 修改图片选择器以匹配 markdown 生成的结构 */
.challenge-description img,
.challenge-hint img,
.custom-info-card-text img {  /* 添加这个选择器 */
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
}

/* 添加其他 markdown 元素的样式 */





/* 删除线样式 */





/* 题目结束 */



/* 对于大图片，我们可以设置一个最大高度 */
@media (min-width: 768px) {  /* 在中等及以上屏幕尺寸时应用 */
    .challenge-description img,
    .challenge-hint img {
        max-height: 400px;  /* 或者您认为合适的任何高度 */
        width: auto;        /* 允许宽度自适应以保持比例 */
    }
}

/* 保持链接的蓝色样式 */
.challenge-description a,
.challenge-hint a {
    color: #007bff;
    text-decoration: none;
}

.challenge-description a:hover,
.challenge-hint a:hover {
    color: #0056b3;
    text-decoration: underline;
}

  .challenge-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.challenge-card-header {
    background-color: #f8f9fa;
    padding: 0.75rem 1.25rem;
    border-bottom: none;
}

.challenge-card-title {
    font-size: 1.25rem;
}

.challenge-card-body {
    padding: 1.25rem;
}


.container-link:hover {
    text-decoration: underline;
  }
  
  .countdown-wrapper {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #5f6368;
  }
  
  .countdown-container {
    display: flex;
    margin-left: 10px;
  }
  
  .countdown-block {
    margin: 0 2px;
  }
  
  .countdown-digits {
    background-color: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 2px 4px;
  }
  
  .countdown-digits span {
    display: inline-block;
    color: #1a73e8;
    font-size: 16px;
    font-weight: bold;
    width: 12px;
    text-align: center;
  }
  
  .fas, .far {
    margin-right: 5px;
  }

 
  
  .containers-info {
    display: flex;
    align-items: center;
  }
  
  .url-display {
    font-size: 14px;
    color: #1a73e8;
  }
  
  .container-link {
    color: #1a73e8;
    text-decoration: none;
    font-weight: bold;
  }
  
  .container-link:hover {
    text-decoration: underline;
  }

  .btns-info {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
}

/* ============================================
   排序选项 - 现代标签风格
   ============================================ */

.ctf-sort-option,
.ctf-sort-option:link,
.ctf-sort-option:visited {
    text-decoration: none !important;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    background: transparent;
}

.ctf-sort-option:hover,
.ctf-sort-option:active {
    text-decoration: none !important;
    color: #65b0fe;
    background: rgba(101, 176, 254, 0.08);
}

.ctf-sort-option.ctf-sort-selected {
    font-weight: 600;
    color: #65b0fe;
    background: rgba(101, 176, 254, 0.12);
    text-decoration: none !important;
}

.ctf-sort-option i {
    margin-right: 6px;
    font-size: 0.9em;
}

.spinner-border-xs {
    width: 0.75rem;
    height: 0.75rem;
    border-width: 0.15em;
}

.vertical-separator {
  display: inline-block;
  width: 1px;
  height: 10px;
  background-color: #bbb; /* 使用更柔和的灰色 */
  margin: 0 2px; /* 控制左右间距 */
}



/* 编辑题目模态框 */
.challenge-edit-modal .modal-content {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.challenge-edit-modal .modal-header {
  padding: 1.5rem 1.5rem 1rem;
}

.challenge-edit-modal .close {
  background: none;
  border: none;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.6;
  outline: none !important;
}

.challenge-edit-modal .close:hover {
  opacity: 1;
}

.challenge-edit-modal .modal-body {
  padding-bottom: 1.5rem;
}

.challenge-edit-modal .form-control {
  border-radius: 6px;
}

.challenge-edit-modal .btn {
  padding: 0.375rem 1rem;
  border-radius: 4px;
}
/* 编辑题目模态框结束 */



/* 删除题目模态框 */
.challenge-delete-modal .modal-content {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.challenge-delete-modal .modal-header {
  padding: 1.5rem 1.5rem 0.5rem;
}

.challenge-delete-modal .close {
  background: none;
  border: none;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.6;
  outline: none !important;
}

.challenge-delete-modal .close:hover {
  opacity: 1;
}
/* 删除题目模态框结束 */

/* 下拉菜单设置题目 */
.dropdown-item {
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}

.dropdown-item i {
  width: 16px;
  margin-right: 8px;
}
/* 下拉菜单设置题目结束 */


/* 比赛类型基础样式 */
.ctf-type {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  padding: 0.4em 0.8em;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ctf-type i {
  margin-right: 0.4em;
  font-size: 0.95em;
}

/* 个人公开赛 */
.ctf-type-individual-public {
  color: #17a2b8;
  background-color: rgba(23, 162, 184, 0.1);
  border: 1px solid rgba(23, 162, 184, 0.2);
}

.ctf-type-individual-public:hover {
  background-color: rgba(23, 162, 184, 0.15);
}

/* 个人内部赛 */
.ctf-type-individual-private {
  color: #b8860b;
  background-color: rgba(184, 134, 11, 0.1);
  border: 1px solid rgba(184, 134, 11, 0.2);
}

.ctf-type-individual-private:hover {
  background-color: rgba(184, 134, 11, 0.15);
}

/* 团队公开赛 */
.ctf-type-team-public {
  color: #28a745;
  background-color: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.ctf-type-team-public:hover {
  background-color: rgba(40, 167, 69, 0.15);
}

/* 团队内部赛 */
.ctf-type-team-private {
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.ctf-type-team-private:hover {
  background-color: rgba(220, 53, 69, 0.15);
}

/* 动画效果 */
.ctf-type:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}


/* ============================================
   CTF 题目页面现代化样式
   ============================================ */

/* 搜索框优化 */
#searchInput {
    font-size: 14px;
    height: 42px;
    transition: all 0.2s ease;
    padding: 10px 16px;
}

#searchInput:focus {
    border-color: #65b0fe !important;
    box-shadow: none;
    outline: none;
}

#search-form .input-group-text {
    background: white;
    border-color: #e5e7eb;
    transition: all 0.2s ease;
    height: 42px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#search-form .input-group-text i {
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s ease;
}

#search-form .input-group:focus-within .input-group-text {
    border-color: #65b0fe !important;
}

#search-form .input-group:focus-within .input-group-text i {
    color: #65b0fe !important;
}

#search-form .input-group:focus-within #searchInput {
    border-color: #65b0fe !important;
}

/* 卡片阴影 */
.card.shadow-sm {
    box-shadow: 0 0.01rem 0.1rem rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #f0f0f0;
}

.card.shadow-sm:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08) !important;
}

/* 筛选卡片 */
.card.border-0.rounded-6 {
    box-shadow: 0 0.01rem 0.1rem rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0 !important;
}

/* 筛选项标题 */
.card-body h6 {
    color: #2c3e50;
    font-size: 15px;
}

/* 筛选链接 */
.card-body a[data-filter] {
    color: #6b7280;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
}

.card-body a[data-filter]:hover {
    color: #65b0fe;
    background: rgba(101, 176, 254, 0.08);
}

.card-body a[data-filter].active-type {
    color: #65b0fe;
    background: rgba(101, 176, 254, 0.12);
    font-weight: 600;
}

/* 分数显示 */
.point-display {
    display: inline-flex;
    align-items: center;
    background-color: #fef3c7;
    color: #92400e;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.point-display i {
    margin-right: 4px;
    color: #f59e0b;
    font-size: 11px;
}

/* 解题次数 */
.text-info {
    font-weight: 600;
    font-size: 12px;
}

/* 题目标签（类型/难度） */
.challenge-card small {
    color: #6b7280;
    font-weight: 500;
}

/* 垂直分隔符优化 */
.vertical-separator {
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: #d1d5db;
    margin: 0 6px;
    vertical-align: middle;
}



/* 题目矩阵标题 */
.border-0.rounded-6.px-3 strong {
    color: #2c3e50;
    font-size: 16px;
}

/* 角标优化 */
.challenge-card .position-absolute span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Bootstrap 分页组件自定义样式 */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: #6b7280;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 0 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    color: #65b0fe;
    background-color: rgba(101, 176, 254, 0.08);
    border-color: #65b0fe;
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(101, 176, 254, 0.15);
    color: #65b0fe;
}

.pagination .page-item.active .page-link {
    background-color: #65b0fe;
    border-color: #65b0fe;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #9ca3af;
    background-color: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

/* 排序区域优化 */
.choice {
    background: white;
    border-radius: 12px;
    padding: 12px 0;
    margin-bottom: 16px;
    box-shadow: 0 0.01rem 0.1rem rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}