/* 红蕊组织 H5 App - 温暖专业风格 */
:root {
  --primary: #B22222;
  --primary-light: #DC3545;
  --primary-dark: #8B0000;
  --accent: #D4A574;
  --bg: #FDF8F5;
  --bg-card: #FFFFFF;
  --text: #2D2D2D;
  --text-muted: #6B6B6B;
  --border: #E8E0DC;
  --shadow: rgba(178, 34, 34, 0.1);
  --radius: 16px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

#app { min-height: 100vh; }

/* 页面容器 */
.page {
  min-height: 100vh;
  padding: 24px 20px;
  animation: fadeIn 0.3s ease;
}

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

/* 首页 */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, #FFF5F0 100%);
}

.logo {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.logo svg { width: 100%; height: 100%; }

.app-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.app-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFF;
  box-shadow: 0 4px 12px var(--shadow);
}

.btn-primary:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

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

.btn-secondary:active {
  background: var(--primary);
  color: #FFF;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

/* 表单 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  transition: border-color 0.2s;
  background: var(--bg-card);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

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

/* 卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 16px;
}

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

.card-title {
  font-size: 18px;
  font-weight: 600;
}

/* 导航 */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}

.nav-item.active { color: var(--primary); }

.nav-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

/* 顶部栏 */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 24px;
}

.header-title {
  font-size: 24px;
  font-weight: 700;
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
}

/* 登录/注册页 */
.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-header {
  text-align: center;
  padding: 40px 0 32px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-form {
  flex: 1;
  padding: 0 20px;
}

.auth-footer {
  text-align: center;
  padding: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* Dashboard */
.dashboard { padding-bottom: 80px; }

.greeting {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.greeting-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.action-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.action-card:active { transform: scale(0.98); }

.action-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-icon svg { width: 24px; height: 24px; color: #FFF; }

.action-name {
  font-size: 14px;
  font-weight: 500;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* 产品列表 */
.product-grid {
  display: grid;
  gap: 16px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
}

.product-img {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.product-info { padding: 16px; }

.product-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* 隐藏状态 */
.hidden { display: none !important; }

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
}

/* Toast提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #FFF;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 1000;
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
