/* 基础样式 */
body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    background-image: 
        radial-gradient(at 40% 20%, rgba(255, 255, 255, 0.5) 0px, transparent 20%),
        radial-gradient(at 80% 0%, rgba(255, 255, 255, 0.4) 0px, transparent 20%),
        radial-gradient(at 0% 50%, rgba(245, 247, 250, 0.9) 0px, transparent 20%),
        radial-gradient(at 80% 50%, rgba(255, 255, 255, 0.3) 0px, transparent 20%),
        radial-gradient(at 0% 100%, rgba(255, 255, 255, 0.4) 0px, transparent 20%),
        radial-gradient(at 80% 100%, rgba(255, 255, 255, 0.5) 0px, transparent 20%);
    background-attachment: fixed;
}

/* 统计卡片样式 - 四个卡片在一行显示 */
  .stats-container {
      display: flex;
      justify-content: space-between;
      flex-wrap: nowrap;
      gap: 1rem;
      width: 100%;
  }
  
  .stat-card {
      flex: 1;
      min-width: 0;
      transition: transform 0.3s ease;
  }
  
  .stat-card:hover {
      transform: translateY(-5px);
  }
  
  /* 响应式设计 */
  @media (max-width: 768px) {
      .stats-container {
          flex-wrap: wrap;
      }
      
      .stat-card {
          flex: 0 0 calc(50% - 0.5rem);
          margin-bottom: 1rem;
      }
  }
  
  @media (max-width: 480px) {
      .stat-card {
          flex: 0 0 100%;
          margin-bottom: 1rem;
      }
  }
  
  /* 五个评价维度卡片样式 */
  .row.g-4.mb-5.flex-nowrap {
      margin-bottom: 1rem !important;
  }
  
  /* 竞赛表格卡片样式 */
  .card.shadow.mb-5 {
      margin-bottom: 1.5rem !important;
  }

/* 卡片样式 */
.card {
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: none;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #4a6cf7 0%, #2e4bd4 100%);
    border-color: #4a6cf7;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a5ce7 0%, #1e3bd4 100%);
    border-color: #3a5ce7;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 108, 247, 0.4);
}

.btn-purple {
    background: linear-gradient(135deg, #8a5cf7 0%, #6c42d1 100%);
    border-color: #8a5cf7;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(138, 92, 247, 0.3);
    transition: all 0.3s ease;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #7a4ce7 0%, #5c32d1 100%);
    border-color: #7a4ce7;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(138, 92, 247, 0.4);
}

.btn-blue {
    background: linear-gradient(135deg, #165DFF 0%, #0E45C1 100%);
    border-color: #165DFF;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-blue:hover {
    background: linear-gradient(135deg, #0E45C1 0%, #093294 100%);
    border-color: #0E45C1;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 93, 255, 0.4);
}

/* 表单样式 */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
    outline: none;
}

/* placeholder样式 - 设置为浅蓝色以区分提示内容和已填写内容 */
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #99ccff !important;
    opacity: 1;
}

/* 浏览器兼容性 */
.form-control:-webkit-input-placeholder,
input:-webkit-input-placeholder,
textarea:-webkit-input-placeholder {
    color: #99ccff !important;
}

.form-control:-moz-placeholder,
input:-moz-placeholder,
textarea:-moz-placeholder {
    color: #99ccff !important;
    opacity: 1;
}

/* 桔红色文本样式 */
.text-orange {
    color: #FF7A00 !important;
}

#captcha-canvas {
    background-color: #f5f7fa;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
}

.btn-refresh {
    background-color: #f5f7fa;
    border: 1px solid #e0e6ed;
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background-color: #e9ecef;
}

/* 下拉联想框样式 */
.suggestions-list {
    position: absolute !important;
    z-index: 9999 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid #e0e6ed !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    width: 100% !important;
    top: 100% !important;
    left: 0 !important;
    margin-top: 0.125rem !important;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(224, 230, 237, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 页脚样式 */
footer {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid rgba(224, 230, 237, 0.5);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #2c3e50;
}

/* 链接样式 */
a {
    color: #4a6cf7;
    transition: color 0.3s ease;
}

a:hover {
    color: #3a5ce7;
    text-decoration: none;
}

/* 编辑个人信息页面的明暗相间行间效果 */
.bg-light-row {
    background-color: rgba(248, 249, 250, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.bg-dark-row {
    background-color: rgba(233, 236, 239, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 表格样式 */
table {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    line-height: 1.5; /* 调整表格全局行高 */
    font-size: 14px !important; /* 设置表格字体大小为14px */
}

/* 时间列特殊样式 - 用于IP地址页面 */
table td.time-column {
    font-size: 8px !important; /* 设置小字体确保一行显示 */
    white-space: nowrap !important; /* 禁止换行 */
    background-color: rgba(255, 240, 240, 0.5) !important; /* 添加背景色便于观察 */
    max-width: 150px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    padding: 8px 12px !important; /* 调整表头内边距 */
    line-height: 1.5 !important; /* 调整表头行高 */
    font-size: 14px !important; /* 设置表头字体大小为14px */
}

td {
    padding: 8px 12px !important; /* 调整单元格内边距 */
    line-height: 1.5 !important; /* 调整单元格行高 */
    font-size: 14px !important; /* 设置单元格字体大小为14px */
}

tr {
    line-height: 1.5 !important; /* 调整表格行高 */
    min-height: auto !important; /* 移除最小高度限制 */
}

/* 徽章样式 */
.badge {
    border-radius: 20px;
    padding: 0.4em 0.8em;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 标签页样式 */
.nav-tabs {
    border-bottom: 2px solid #e0e6ed;
}

.nav-tabs .nav-item .nav-link {
    border-radius: 8px 8px 0 0;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-item .nav-link.active {
    color: #4a6cf7;
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #e0e6ed #e0e6ed #4a6cf7;
    border-width: 2px 2px 3px;
}

/* 灰色背景样式 */
.bg-gray {
    background-color: #f5f7fa !important;
    color: #6c757d !important;
}

/* 阴影效果增强 */
.shadow-sm {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* 数据统计卡片特殊样式 - 移除阴影 */
.data-stats-card {
    box-shadow: none !important;
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .btn, .form-control {
    animation: fadeIn 0.5s ease-out;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card {
        border-radius: 8px;
    }
    .btn {
        border-radius: 6px;
        padding: 0.4rem 0.8rem;
    }
    .form-control {
        border-radius: 6px;
    }
}

/* 管理员页面专用样式 */

/* 侧边栏样式 - 紧贴左侧 */
#admin-sidebar {
    left: 0 !important;
    margin-left: 0 !important;
    border-right: 1px solid #e9ecef;
}

/* 管理员侧边栏导航选中状态样式 */
#admin-sidebar .nav-item {
    margin-bottom: 4px;
}

#admin-sidebar .nav-link {
    border-radius: 4px;
    transition: all 0.3s ease;
}

#admin-sidebar .nav-link.active {
    background-color: #007bff;
    color: white !important;
    border-radius: 4px;
}

/* 主内容区域样式 - 移除最大宽度限制 */
main {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 确保管理员页面的容器没有最大宽度限制 */
.admin-layout {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 管理员内容区域样式 */
.admin-content {
    width: calc(100% - 250px); /* 减去侧边栏宽度 */
    max-width: none;
    margin: 0;
    padding: 1.5rem;
}

/* 管理员页面中的所有container-fluid容器 */
body:has(#admin-sidebar) .container-fluid,
body:has(.admin-layout) .container-fluid,
main.admin-content .container-fluid {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0;
}

/* 确保管理员页面的基础容器没有边距 */
body:has(#admin-sidebar) .container,
body:has(.admin-layout) .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .admin-content {
        width: 100%;
    }
}