/* ===== NE教育专升本 - 公共样式 ===== */
:root {
  --primary: #660874;
  --primary-light: #88349b;
  --primary-lighter: #a855c0;
  --primary-bg: #faf5fc;
  --primary-bg2: #f3e8f7;
  --accent-green: #10b981;
  --accent-green-bg: #ecfdf5;
  --accent-orange: #f59e0b;
  --accent-orange-bg: #fffbeb;
  --accent-blue: #3b82f6;
  --accent-blue-bg: #eff6ff;
  --accent-red: #ef4444;
  --accent-red-bg: #fef2f2;
  --bg: #ffffff;
  --bg-gray: #f8f9fa;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --nav-height: 44px;
  --tab-height: 56px;
  --capsule-width: 87px;
  --capsule-height: 32px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Phone Frame */
.phone-frame {
  width: 375px;
  height: 812px;
  background: var(--bg);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 2px #1a1a2e;
  display: flex;
  flex-direction: column;
}

/* Status Bar */
.status-bar {
  height: 44px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.status-bar .time { font-size: 14px; font-weight: 700; }
.status-bar .icons { display: flex; gap: 6px; align-items: center; }

/* Nav Bar */
.nav-bar {
  height: var(--nav-height);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.nav-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
}
.nav-back {
  position: absolute;
  left: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #000;
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 16px;
  transition: background 0.2s;
  text-decoration: none;
}
.nav-back:hover { background: var(--bg-gray); }

/* WeChat Capsule */
.nav-capsule {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  height: var(--capsule-height);
  width: var(--capsule-width);
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
}
.nav-capsule .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #999;
}
.nav-capsule .line {
  width: 1px; height: 16px;
  background: #d0d0d0;
}
.nav-capsule .oval {
  width: 16px; height: 8px;
  border: 2px solid #999;
  border-radius: 4px;
}

/* Content Area */
.page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}
.page-content::-webkit-scrollbar { display: none; }
.page-content { -ms-overflow-style: none; scrollbar-width: none; }

/* Bottom Tab Bar */
.tab-bar {
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
  z-index: 100;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-decoration: none;
}
.tab-item .tab-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.tab-item .tab-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s;
}
.tab-item.active .tab-label { color: var(--primary); font-weight: 600; }

/* Section Title */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  padding: 16px 12px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

/* Cards */
.card {
  margin: 0 12px 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.card:active { transform: scale(0.98); }

/* Form */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; }
.form-input {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: 14px;
  outline: none; transition: border 0.2s; background: var(--bg-gray);
  color: var(--text);
}
.form-input:focus { border-color: var(--primary); }
.form-select {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: 14px;
  outline: none; background: var(--bg-gray); color: var(--text);
}
textarea.form-input { resize: vertical; font-family: inherit; }

/* Buttons */
.btn-primary {
  display: block;
  width: 100%; padding: 14px; border-radius: 24px;
  background: linear-gradient(135deg, #660874, #88349b);
  color: #fff; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s;
  text-align: center; text-decoration: none;
}
.btn-primary:active { transform: scale(0.98); opacity: 0.9; }
.btn-outline {
  display: inline-block;
  padding: 8px 20px; border-radius: 16px;
  border: 1px solid var(--primary); color: var(--primary);
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: #fff; transition: all 0.2s; text-decoration: none;
  text-align: center;
}
.btn-outline:active { background: var(--primary-bg); }

/* Tags */
.tag {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  font-weight: 500; flex-shrink: 0;
}
.tag-new { background: #fef2f2; color: #ef4444; }
.tag-hot { background: #fffbeb; color: #f59e0b; }
.tag-done { background: #ecfdf5; color: #10b981; }

/* Teacher tags */
.teacher-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.teacher-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: var(--primary-bg); color: var(--primary);
}

/* PDF Preview */
.pdf-preview {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; text-align: center; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.pdf-preview .pdf-icon { font-size: 40px; margin-bottom: 8px; }
.pdf-preview .pdf-name { font-size: 14px; font-weight: 600; color: var(--text); }
.pdf-preview .pdf-size { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.pdf-preview .pdf-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }

/* Course Card */
.course-card {
  margin: 0 12px 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
}
.course-card:active { transform: scale(0.98); }
.course-card .course-title { font-size: 15px; font-weight: 600; color: var(--text); }
.course-card .course-desc { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.course-card .course-action {
  margin-top: 8px; font-size: 12px; color: var(--primary); font-weight: 600;
}

/* Timer Badge */
.timer-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 10px;
  background: var(--primary-bg); color: var(--primary);
  font-size: 12px; font-weight: 600;
}

/* Score Badge */
.score-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.score-up { background: var(--accent-green-bg); color: var(--accent-green); }
.score-down { background: var(--accent-red-bg); color: var(--accent-red); }

/* Toast */
.toast {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0,0,0,0.75); color: #fff;
  padding: 12px 24px; border-radius: 8px;
  font-size: 14px; z-index: 999;
  pointer-events: none; opacity: 0;
  transition: all 0.3s;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.35s ease; }

/* Empty State */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-light);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state .empty-text { font-size: 14px; }

/* Exercise / Exam question */
.question-block {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; margin: 0 12px 10px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.question-num { font-size: 12px; color: var(--primary); font-weight: 600; }
.question-stem { font-size: 15px; color: var(--text); margin: 8px 0; line-height: 1.6; font-weight: 500; }
.option-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; margin-bottom: 8px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.15s;
  font-size: 14px; color: var(--text);
}
.option-item.selected { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); }
.option-item.correct { border-color: var(--accent-green); background: var(--accent-green-bg); }
.option-item.wrong { border-color: var(--accent-red); background: var(--accent-red-bg); }
.option-letter {
  width: 28px; height: 28px; border-radius: 14px;
  background: var(--bg-gray); display: flex; align-items: center;
  justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.option-item.selected .option-letter { background: var(--primary); color: #fff; }

/* Timer bar */
.timer-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--card);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.timer-bar .timer { font-size: 15px; font-weight: 700; color: var(--primary); }
.timer-bar .progress { font-size: 12px; color: var(--text-light); }

/* Wrong book list */
.wrong-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; background: var(--card); margin: 0 12px 8px;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); cursor: pointer;
}
.wrong-item .wrong-num {
  width: 28px; height: 28px; border-radius: 14px;
  background: var(--accent-red-bg); color: var(--accent-red);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.wrong-item .wrong-info { flex: 1; min-width: 0; }
.wrong-item .wrong-question { font-size: 13px; color: var(--text); line-height: 1.5; }
.wrong-item .wrong-meta { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 0 12px 8px; }

/* Icon circles */
.icon-circle {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

/* Points display */
.points-big {
  font-size: 32px; font-weight: 700; color: var(--primary);
  text-align: center; padding: 16px;
}

/* Mall item */
.mall-item {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); cursor: pointer;
  transition: all 0.2s;
}
.mall-item:active { transform: scale(0.98); }
.mall-item .mall-img {
  height: 100px; display: flex; align-items: center;
  justify-content: center; font-size: 36px;
}
.mall-item .mall-info { padding: 10px 12px; }
.mall-item .mall-name { font-size: 13px; font-weight: 600; color: var(--text); }
.mall-item .mall-price { font-size: 16px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.mall-item .mall-price small { font-size: 11px; font-weight: 400; color: var(--text-light); }

/* Order card */
.order-card {
  margin: 0 12px 8px; background: var(--card);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.order-card .order-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.order-card .order-title { font-size: 14px; font-weight: 600; }
.order-card .order-status { font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.order-card .order-info { font-size: 12px; color: var(--text-light); }
.order-card .order-price { font-size: 16px; font-weight: 700; color: var(--primary); margin-top: 8px; }

/* Announcement list */
.announce-list { padding: 12px; }
.announce-item {
  background: var(--card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
}
.announce-item:active { transform: scale(0.98); }
.announce-item .announce-title { font-size: 14px; font-weight: 600; color: var(--text); }
.announce-item .announce-date { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.announce-item .announce-desc { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.5; }

/* Filter tabs */
.filter-tabs { display: flex; padding: 12px; }
.filter-tab {
  flex: 1; text-align: center; padding: 10px;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.filter-tab.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }

/* My header */
.my-header {
  background: linear-gradient(135deg, #660874, #88349b);
  padding: 20px 16px 24px; color: #fff; position: relative; overflow: hidden;
}
.my-header::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px; border-radius: 60px;
  background: rgba(255,255,255,0.08);
}
.my-avatar-wrap { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.my-avatar {
  width: 56px; height: 56px; border-radius: 28px;
  background: rgba(255,255,255,0.2); display: flex; align-items: center;
  justify-content: center; font-size: 24px; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.4);
}
.my-name { font-size: 17px; font-weight: 600; }
.my-role { font-size: 11px; opacity: 0.8; margin-top: 2px; }

/* Search bar */
.search-bar {
  margin: 12px; display: flex; align-items: center;
  background: var(--bg); border-radius: 20px;
  padding: 10px 14px; gap: 8px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.search-bar .search-icon { color: var(--text-light); font-size: 14px; flex-shrink: 0; }
.search-bar input {
  border: none; outline: none; flex: 1; font-size: 13px;
  background: transparent; color: var(--text);
}
.search-bar input::placeholder { color: var(--text-light); }

/* Stat bar */
.stat-bar {
  margin: 0 12px 10px;
  background: linear-gradient(135deg, #660874, #88349b);
  border-radius: var(--radius); padding: 16px; color: #fff;
  display: flex; justify-content: space-around; align-items: center;
}
.stat-bar .stat-item { text-align: center; }
.stat-bar .stat-num { font-size: 24px; font-weight: 700; }
.stat-bar .stat-label { font-size: 11px; opacity: 0.85; margin-top: 2px; }

/* Responsive */
@media (max-width: 400px) {
  .phone-frame { width: 100vw; height: 100vh; border-radius: 0; box-shadow: none; }
}
