/* ==========================================
   跨境导航 - 全局样式系统
   ========================================== */

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: all 0.2s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================
   顶部导航栏
   ========================================== */
.top-nav {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}

.logo span { color: #e94560; }

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  color: #636e72;
  padding: 6px 10px;
  border-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
  color: #e94560;
  background: rgba(233, 69, 96, 0.05);
}

.nav-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.btn-admin {
  background: #e94560 !important;
  color: #fff !important;
}

.btn-admin:hover {
  background: #d63030 !important;
}

.btn-user {
  border: 1px solid #e8e8e8;
  background: #fff;
}

/* ==========================================
   页面头部
   ========================================== */
.page-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 36px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 13px;
  opacity: 0.8;
}

/* ==========================================
   内容区域
   ========================================== */
main {
  min-height: calc(100vh - 200px);
  padding: 24px 0;
}

/* ==========================================
   卡片网格
   ========================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: rgba(233, 69, 96, 0.2);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8f9fa, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 12px;
  color: #636e72;
  line-height: 1.6;
  margin-bottom: 12px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

/* ==========================================
   工具卡片
   ========================================== */
.tool-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s;
  display: block;
}

.tool-card:hover {
  border-color: #e94560;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(233, 69, 96, 0.12);
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #f8f9fa, #e8e8e8);
}

.tool-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.tool-desc {
  font-size: 11px;
  color: #999;
}

/* ==========================================
   分类标题
   ========================================== */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e94560;
  display: inline-block;
}

/* ==========================================
   按钮
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: #e94560;
  color: #fff;
}

.btn-primary:hover {
  background: #d63030;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f8f9fa;
  color: #636e72;
  border: 1px solid #e8e8e8;
}

.btn-secondary:hover {
  background: #e8e8e8;
}

/* ==========================================
   标签徽章
   ========================================== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #f0f0f0;
  color: #636e72;
}

.badge-red { background: #fee2e2; color: #dc2626; }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-green { background: #d1fae5; color: #059669; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.badge-purple { background: #ede9fe; color: #7c3aed; }

/* ==========================================
   表格
   ========================================== */
.data-table {
  width: 100%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.data-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #636e72;
  font-size: 12px;
  text-transform: uppercase;
}

.data-table tr:hover td {
  background: #fafafa;
}

/* ==========================================
   搜索框
   ========================================== */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #e94560;
}

/* ==========================================
   空状态
   ========================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 16px;
  color: #636e72;
  margin-bottom: 8px;
}

/* ==========================================
   Footer
   ========================================== */
footer {
  background: #1a1a2e;
  color: #fff;
  padding: 24px 0;
  text-align: center;
}

footer p {
  font-size: 11px;
  opacity: 0.5;
}

/* ==========================================
   响应式
   ========================================== */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .page-header h1 { font-size: 20px; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
}
