:root {
  --primary: #ff9f43;
  --primary-dark: #e67e22;
  --secondary: #ffb142;
  --accent: #ffeaa7;
  --neutral: #f9fafb;
  --neutral-dark: #1f2937;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;
  --border: #e5e7eb;
  --text-light: #6b7280;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--neutral-dark);
  background-color: var(--neutral);
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 培训/课程详情：Tab 栏吸顶（top 由 JS 按页头高度设置） */
#gdlg-training-tabs,
#gdlg-detail-tabs {
    position: sticky;
    z-index: 40;
    background-color: #fff;
}
#gdlg-training-tabs.is-stuck,
#gdlg-detail-tabs.is-stuck {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 培训详情 · 学员评价横向卡片 */
.gdlg-training-reviews-track {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.gdlg-training-review-card {
    scroll-snap-align: start;
    min-height: 180px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
    .gdlg-training-review-card {
        min-height: 200px;
    }
}

#gdlg-training-share-modal .gdlg-training-share-item:focus {
    outline: 2px solid rgba(249, 115, 22, 0.35);
    outline-offset: 2px;
}

/* 卡片样式 */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  background-color: white;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--accent);
}

/* 卡片悬停效果增强 */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 按钮动画效果 */
.btn-primary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* 表单输入框样式 */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #1e40af !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* 资源卡片样式 */
.resource-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.resource-card:hover {
    border-color: #1e40af;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* 列表样式 */
.list-group {
  list-style: none;
  padding: 0;
}

.list-group-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.list-group-item:hover {
  background-color: var(--neutral);
}

.list-group-item.active {
  background-color: var(--accent);
  color: var(--primary);
  font-weight: 500;
}

/* 表格样式 */
.table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background-color: var(--neutral);
  font-weight: 600;
  color: var(--neutral-dark);
}

.table tr:hover {
  background-color: var(--neutral);
}

/* 表单样式 */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--neutral-dark);
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.breadcrumb-item::after {
  content: '>';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb-item:last-child::after {
  display: none;
}

.breadcrumb-item.active {
  color: var(--primary);
  font-weight: 500;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background-color: #1e40af;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .menu-toggle {
    display: block;
    z-index: 1001;
  }
}

/* 无障碍访问 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 焦点样式 */
:focus-visible {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}