/* ========================================
   ADD.CSS - 附加样式
   AUHJK CMS Template
   ======================================== */

/* 额外工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* 清除浮动 */
.clear { clear: both; }
.clearfix::after { content: ''; display: table; clear: both; }

/* 图片自适应 */
.img-responsive { max-width: 100%; height: auto; display: block; }
.img-rounded { border-radius: var(--radius-md); }
.img-circle { border-radius: 50%; }
.img-thumbnail { padding: 4px; background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: var(--radius-sm); }

/* 间距 */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.pt-20 { padding-top: 20px; }
.pt-30 { padding-top: 30px; }
.pb-20 { padding-bottom: 20px; }
.pb-30 { padding-bottom: 30px; }

/* 颜色 */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: #10b981 !important; }
.text-danger { color: #ef4444 !important; }
.text-warning { color: #f59e0b !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-accent { background-color: var(--accent) !important; }
.bg-dark { background-color: var(--dark-bg) !important; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gradient-primary); color: white; }
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }

/* 卡片 */
.card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 20px 24px;
  background: rgba(139, 92, 246, 0.05);
  border-bottom: 1px solid var(--dark-border);
  font-weight: 600;
}
.card-body { padding: 24px; }
.card-footer {
  padding: 15px 24px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--dark-border);
}

/* 徽章 */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
}
.badge-primary { background: var(--primary); color: white; }
.badge-accent { background: var(--accent); color: white; }
.badge-success { background: #10b981; color: white; }
.badge-danger { background: #ef4444; color: white; }

/* 警告框 */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.alert-info { background: rgba(59, 130, 246, 0.1); border-color: #3b82f6; color: #60a5fa; }
.alert-success { background: rgba(16, 185, 129, 0.1); border-color: #10b981; color: #34d399; }
.alert-warning { background: rgba(245, 158, 11, 0.1); border-color: #f59e0b; color: #fbbf24; }
.alert-danger { background: rgba(239, 68, 68, 0.1); border-color: #ef4444; color: #f87171; }

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--dark-border);
  text-align: left;
}
.table th {
  background: rgba(139, 92, 246, 0.05);
  font-weight: 600;
  color: var(--text-primary);
}
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* 代码块 */
code {
  padding: 2px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--accent);
}
pre {
  padding: 20px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}
pre code {
  padding: 0;
  background: none;
  color: var(--text-secondary);
}

/* 引用块 */
blockquote {
  margin: 20px 0;
  padding: 20px 24px;
  background: rgba(139, 92, 246, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* 进度条 */
.progress {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* 分割线 */
.divider {
  height: 1px;
  background: var(--dark-border);
  margin: 30px 0;
}
.divider-dashed { background: none; border-top: 1px dashed var(--dark-border); }

/* 标签 */
.label {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--dark-border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.label:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* 动画 */
.fade-in { animation: fadeIn 0.5s ease forwards; }
.slide-up { animation: fadeInUp 0.5s ease forwards; }
.bounce { animation: bounce 1s ease infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 占位图 */
.placeholder {
  background: linear-gradient(90deg, var(--dark-card) 25%, var(--dark-hover) 50%, var(--dark-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Flex工具 */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* 网格 */
.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.col { padding: 0 10px; flex: 1; }
.col-2 { flex: 0 0 16.666666%; padding: 0 10px; }
.col-3 { flex: 0 0 25%; padding: 0 10px; }
.col-4 { flex: 0 0 33.333333%; padding: 0 10px; }
.col-6 { flex: 0 0 50%; padding: 0 10px; }

@media (max-width: 768px) {
  .col-2, .col-3, .col-4, .col-6 { flex: 0 0 100%; }
}

/* 显示/隐藏 */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }

@media (max-width: 768px) {
  .d-none-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .d-none-desktop { display: none !important; }
}

/* 溢出 */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* 定位 */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* 边框 */
.border { border: 1px solid var(--dark-border); }
.border-top { border-top: 1px solid var(--dark-border); }
.border-bottom { border-bottom: 1px solid var(--dark-border); }
.border-left { border-left: 1px solid var(--dark-border); }
.border-right { border-right: 1px solid var(--dark-border); }
.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 50%; }

/* 阴影 */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-none { box-shadow: none; }

/* 鼠标 */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-move { cursor: move; }

/* 用户选择 */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* 过渡 */
.transition { transition: var(--transition); }

/* 层级 */
.z-1 { z-index: 1; }
.z-10 { z-index: 10; }
.z-100 { z-index: 100; }
.z-1000 { z-index: 1000; }

/* 文本截断 */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-break {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 行高 */
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.75; }

/* 字体 */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

/* 对齐 */
.align-middle { vertical-align: middle; }
.align-top { vertical-align: top; }
.align-bottom { vertical-align: bottom; }

/* 动画延迟 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
