/* ===== 有空发 Time Market - 主样式文件 ===== */
/* Web2.0 小清新简约风 + Q 版灵动可爱视觉语言 */

/* ===== CSS 变量定义 ===== */
:root {
  /* 主色调 - 晴空蓝 */
  --color-primary: #7B93FF;
  --color-primary-light: #9BA8FF;
  --color-primary-dark: #5F75E8;

  /* 辅助色 */
  --color-mint: #90E0EF;
  --color-mint-dark: #7DD3C0;
  --color-peach: #FCA5A5;
  --color-peach-light: #FFB5B5;
  --color-cream: #FFE485;
  --color-cream-dark: #FFD966;

  /* 中性色 */
  --bg-body: #F9FAFB;
  --bg-card: #FFFFFF;
  --border-light: #E5E7EB;
  --border-dark: #D1D5DB;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #9CA3AF;

  /* 功能色 */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #3B82F6;

  /* 圆角规范 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 阴影系统 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(123,147,255,0.1);
  --shadow-lg: 0 8px 24px rgba(123,147,255,0.15);
  --shadow-hover: 0 8px 24px rgba(123,147,255,0.2);

  /* 字体系统 */
  --font-family: 'Nunito', 'Varela Round', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 40px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ===== 通用容器 ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-icon {
  font-size: 28px;
}

.section-more {
  color: var(--color-primary);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.section-more:hover {
  color: var(--color-primary-dark);
  transform: translateX(4px);
}

.section-tag {
  background: linear-gradient(135deg, var(--color-mint), var(--color-mint-dark));
  color: white;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ===== 按钮样式 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
  outline: none;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  box-shadow: 0 4px 12px rgba(123,147,255,0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(123,147,255,0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border-light);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-action {
  background: linear-gradient(135deg, var(--color-peach), var(--color-peach-light));
  color: white;
}

.btn-action:hover {
  box-shadow: 0 6px 20px rgba(252,165,165,0.4);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 16px 36px;
  font-size: var(--text-lg);
}

.btn-success {
  background: linear-gradient(135deg, var(--color-success), #34D399);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--color-danger), #F87171);
  color: white;
}

/* ===== 卡片样式 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* ===== 标签/徽章 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.badge-primary {
  background: rgba(123,147,255,0.1);
  color: var(--color-primary);
}

.badge-success {
  background: rgba(16,185,129,0.1);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(245,158,11,0.1);
  color: var(--color-warning);
}

.badge-danger {
  background: rgba(239,68,68,0.1);
  color: var(--color-danger);
}

/* ===== 输入框样式 ===== */
.input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: all 0.3s ease;
  background: var(--bg-card);
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(123,147,255,0.1);
}

.input::placeholder {
  color: var(--text-muted);
}

/* ===== 页面过渡动画 ===== */
.page-transition {
  animation: fadeIn 0.4s ease-out;
}

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

/* ===== 加载动画 ===== */
.loading {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

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

.empty-state-text {
  font-size: var(--text-lg);
  margin-bottom: 24px;
}

/* ===== 工具类 ===== */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.hidden { display: none; }
.visible { visibility: visible; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 32px 0;
  }
}
