/* ============================================
   科目三模拟灯光考试系统 - 样式表
   极客网络科技工作室
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #1677ff;
  --blue-hover: #4096ff;
  --blue-bg: #e6f4ff;
  --blue-border: #91caff;
  --green: #52c41a;
  --green-bg: #f6ffed;
  --orange: #fa8c16;
  --orange-bg: #fff7e6;
  --red: #ff4d4f;
  --red-bg: #fff2f0;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text-1: #1a1a2e;
  --text-2: #595959;
  --text-3: #8c8c8c;
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 6px 16px rgba(0,0,0,0.1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 52px;
  --bottom-nav-h: 60px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* RTL Uyghur */
body.rtl {
  direction: rtl;
  font-family: 'UKij Tuz Tom', 'Microsoft Uighur', 'ALKATIP Tor', 'PingFang SC', sans-serif;
}

a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- SVG Icon System --- */
.icon {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  fill: currentColor;
}
.icon svg { width: 100%; height: 100%; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* --- Header --- */
.app-header {
  height: var(--header-h);
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo svg { width: 18px; height: 18px; fill: #fff; }

.header-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

.lang-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1.4;
}
.lang-btn:active { background: rgba(255,255,255,0.3); }

/* --- Watermark --- */
.watermark-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.watermark-layer::before {
  content: attr(data-text);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-22deg);
  font-size: 18px;
  font-weight: 500;
  color: rgba(0,0,0,0.04);
  white-space: nowrap;
  user-select: none;
  letter-spacing: 4px;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #fff;
  border-top: 1px solid var(--border-light);
  display: flex;
  z-index: 100;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.04);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-3);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
}

.nav-item .icon { width: 22px; height: 22px; }
.nav-item span { font-size: 11px; font-weight: 500; }
.nav-item.active { color: var(--blue); }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--blue);
  border-radius: 0 0 2px 2px;
}

/* --- Page Container --- */
.page-body {
  padding: 12px;
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}

.page-section { display: none; }
.page-section.active { display: block; animation: fadeUp 0.25s ease; }

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

/* --- Cards --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 0;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-body { padding: 14px 16px; }
.card-body.no-pad { padding: 0; }

/* --- Status Banner --- */
.status-banner {
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-banner.driving {
  background: linear-gradient(135deg, #52c41a, #389e0d);
  color: #fff;
}

.status-banner.waiting {
  background: linear-gradient(135deg, #fa8c16, #d46b08);
  color: #fff;
}

.status-banner.idle {
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff;
}

.banner-icon {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-icon svg { width: 28px; height: 28px; fill: #fff; }

.banner-info { flex: 1; }
.banner-label { font-size: 12px; opacity: 0.85; margin-bottom: 2px; }
.banner-number { font-size: 36px; font-weight: 800; line-height: 1.1; }
.banner-name { font-size: 14px; margin-top: 2px; }

.banner-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  margin-top: 6px;
}

.pulse-dot {
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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

/* --- Ticket Number Display --- */
.my-ticket-display {
  text-align: center;
  padding: 20px 16px;
}

.ticket-num-big {
  font-size: 56px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.ticket-num-label {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 6px;
}

.ticket-session-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
}

.tag-morning { background: #fff7e6; color: #d46b08; }
.tag-afternoon { background: #e6f4ff; color: #0958d9; }

/* --- Queue List --- */
.queue-list { list-style: none; }

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.queue-item:last-child { border-bottom: none; }
.queue-item:active { background: #fafafa; }

.q-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.q-info { flex: 1; min-width: 0; }
.q-name { font-size: 14px; font-weight: 500; }
.q-phone { font-size: 12px; color: var(--text-3); }

.q-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
}

.q-status.s-waiting { background: var(--orange-bg); color: var(--orange); }
.q-status.s-driving { background: var(--green-bg); color: var(--green); }
.q-status.s-done { background: #f5f5f5; color: var(--text-3); }

.q-status.s-next {
  background: var(--blue-bg);
  color: var(--blue);
  animation: glowBlue 2s ease-in-out infinite;
}

@keyframes glowBlue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,119,255,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(22,119,255,0); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  line-height: 1.4;
}

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:active { background: #0958d9; transform: scale(0.98); }

.btn-success { background: var(--green); color: #fff; }
.btn-success:active { background: #389e0d; }

.btn-warning { background: var(--orange); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }

.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-1);
}
.btn-outline:active { background: #fafafa; }

.btn-block { width: 100%; }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 10px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.btn:disabled { opacity: 0.5; pointer-events: none; }

/* --- Forms --- */
.form-group { margin-bottom: 16px; }

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

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-1);
  background: #fff;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
}

select.form-control { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%238c8c8c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 32px; }

/* --- Verify Page --- */
.verify-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #e6f4ff 0%, #f0f2f5 40%, #fff 100%);
  padding: 24px;
}

.verify-box {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.verify-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(22,119,255,0.25);
}

.verify-logo svg { width: 36px; height: 36px; fill: #fff; }

.verify-title { font-size: 22px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.verify-sub { font-size: 14px; color: var(--text-3); margin-bottom: 28px; }

.verify-input-wrap {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.verify-input-wrap:focus-within { border-color: var(--blue); }

.verify-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 12px;
  padding: 12px 8px;
  color: var(--text-1);
  background: transparent;
}

.verify-input-wrap input::placeholder { color: #d9d9d9; letter-spacing: 12px; }

.verify-hint { font-size: 12px; color: var(--text-3); margin-top: 16px; }

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gray { background: #f5f5f5; color: var(--text-3); }

/* --- Stat Row --- */
.stat-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.stat-box {
  flex: 1;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-num { font-size: 24px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* --- Tables --- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.table th, .table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.table th {
  font-weight: 600;
  color: var(--text-3);
  font-size: 12px;
  background: #fafafa;
  position: sticky;
  top: 0;
}

.table tr:hover td { background: #fafbfc; }

/* --- Modal --- */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

.modal-mask.open { opacity: 1; visibility: visible; }

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s;
}

.modal-mask.open .modal-box { transform: translateY(0) scale(1); }

.modal-head {
  padding: 18px 20px 0;
  font-size: 17px;
  font-weight: 600;
}

.modal-content { padding: 16px 20px; }

.modal-foot {
  padding: 0 20px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* --- Toast --- */
.toast-box {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  max-width: 90vw;
}

.toast-box.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-box.success { border-left: 3px solid var(--green); }
.toast-box.error { border-left: 3px solid var(--red); }
.toast-box.warning { border-left: 3px solid var(--orange); }

/* --- Light Practice --- */
.practice-question {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.pq-label {
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pq-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--text-1);
}

.pq-options { list-style: none; }

.pq-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
}

.pq-opt:active { transform: scale(0.98); }

.pq-opt .opt-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  flex-shrink: 0;
}

.pq-opt.selected { border-color: var(--blue); background: var(--blue-bg); }
.pq-opt.selected .opt-letter { background: var(--blue); color: #fff; }
.pq-opt.correct { border-color: var(--green); background: var(--green-bg); }
.pq-opt.correct .opt-letter { background: var(--green); color: #fff; }
.pq-opt.wrong { border-color: var(--red); background: var(--red-bg); }
.pq-opt.wrong .opt-letter { background: var(--red); color: #fff; }

/* --- Audio Player Card --- */
.audio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.audio-card:active { background: #fafafa; }

.audio-play-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-play-btn svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }

.audio-title { flex: 1; font-size: 14px; font-weight: 500; }
.audio-dur { font-size: 12px; color: var(--text-3); }

/* --- Progress --- */
.progress-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.3s;
}

/* --- Exam Result --- */
.exam-result {
  text-align: center;
  padding: 32px 16px;
}

.result-score {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.result-score.pass { color: var(--green); }
.result-score.fail { color: var(--red); }

.result-label { font-size: 14px; color: var(--text-3); margin-top: 8px; }
.result-msg { font-size: 16px; font-weight: 600; margin-top: 12px; }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
}

.empty-state .icon { width: 48px; height: 48px; color: #d9d9d9; margin: 0 auto 12px; }
.empty-state p { font-size: 14px; }

/* --- Utility --- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-3); }
.text-sm { font-size: 12px; }
.hidden { display: none !important; }

/* --- Responsive --- */
@media (min-width: 768px) {
  .page-body { max-width: 640px; margin: 0 auto; padding: 16px; padding-bottom: calc(var(--bottom-nav-h) + 24px); }
  .bottom-nav { max-width: 640px; left: 50%; transform: translateX(-50%); border-radius: var(--radius) var(--radius) 0 0; }
}

/* --- Admin Sidebar --- */
.admin-sidebar {
  position: fixed;
  left: 0;
  top: var(--header-h);
  bottom: 0;
  width: 200px;
  background: #001529;
  overflow-y: auto;
  z-index: 50;
  padding-top: 8px;
}

.admin-sidebar .side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-sidebar .side-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-sidebar .side-item.active { color: #fff; background: var(--blue); border-left-color: var(--blue); }
.admin-sidebar .side-item .icon { width: 18px; height: 18px; }

.admin-main {
  margin-left: 200px;
  padding: 20px;
  min-height: calc(100vh - var(--header-h));
}

.admin-page { display: none; }
.admin-page.active { display: block; animation: fadeUp 0.2s ease; }

@media (max-width: 768px) {
  .admin-sidebar { width: 52px; }
  .admin-sidebar .side-item span:not(.icon) { display: none; }
  .admin-sidebar .side-item { padding: 11px 0; justify-content: center; }
  .admin-main { margin-left: 52px; padding: 12px; }
}

/* --- Loading --- */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

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

/* ============================================
   2026 新款UI增强
   ============================================ */

/* --- 语言切换按钮固定 --- */
.lang-switch-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(22,119,255,0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--blue);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-switch-btn:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22,119,255,0.3);
}

.lang-switch-btn::before {
  content: '🌐';
  font-size: 14px;
}

body.rtl .lang-switch-btn {
  right: auto;
  left: 12px;
}

/* --- 水印铺满效果 --- */
.watermark-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
  background-image: 
    repeating-linear-gradient(
      -22deg,
      transparent,
      transparent 80px,
      rgba(0,0,0,0.02) 80px,
      rgba(0,0,0,0.02) 81px
    );
}

.watermark-layer::before {
  content: attr(data-text);
  position: absolute;
  font-size: 16px;
  font-weight: 500;
  color: rgba(0,0,0,0.03);
  white-space: nowrap;
  user-select: none;
  letter-spacing: 2px;
  /* 铺满整个页面的水印 */
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: 
    radial-gradient(circle, currentColor 1px, transparent 1px);
  background-size: 120px 120px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-start;
  transform: rotate(-22deg);
  line-height: 120px;
  word-spacing: 100px;
  text-align: left;
}

/* 水印文字重复效果 */
.watermark-layer::after {
  content: attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 14px;
  color: rgba(0,0,0,0.025);
  white-space: normal;
  word-wrap: break-word;
  line-height: 100px;
  letter-spacing: 1px;
  transform: rotate(-22deg);
  transform-origin: center;
  padding: 20px;
  overflow: hidden;
}

/* --- 轮播图样式 --- */
.carousel-container {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  width: 20px;
  border-radius: 3px;
  background: #fff;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

.carousel-container:hover .carousel-nav {
  opacity: 1;
}

.carousel-nav.prev { left: 12px; }
.carousel-nav.next { right: 12px; }

.carousel-nav svg {
  width: 16px;
  height: 16px;
  fill: var(--text-1);
}

/* --- 2026新款卡片增强 --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* --- 玻璃态效果 --- */
.glass-effect {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
}

/* --- 渐变按钮 --- */
.btn-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  transition: all 0.3s;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

/* --- 统计卡片动画 --- */
.stat-box {
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(22,119,255,0.05) 0%, transparent 70%);
  animation: pulse-bg 3s ease-in-out infinite;
}

@keyframes pulse-bg {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* --- 输入框聚焦动画 --- */
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22,119,255,0.1);
  transform: translateY(-1px);
}

/* --- 列表项悬浮效果 --- */
.queue-item {
  transition: all 0.2s ease;
}

.queue-item:hover {
  background: var(--blue-bg);
  transform: translateX(4px);
}

/* --- 加载骨架屏 --- */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- 徽章动画 --- */
.badge {
  transition: all 0.2s;
}

.badge:hover {
  transform: scale(1.05);
}

/* --- 进度条动画 --- */
.progress-fill {
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- 模态框增强 --- */
.modal-mask.open .modal-box {
  animation: modal-enter 0.3s ease;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Toast增强 --- */
.toast-box.show {
  animation: toast-slide 0.3s ease;
}

@keyframes toast-slide {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* --- 响应式优化 --- */
@media (max-width: 375px) {
  .carousel-container { height: 150px; }
  .stat-num { font-size: 20px; }
  .ticket-num-big { font-size: 48px; }
}

/* --- 暗色模式支持（预留） --- */
@media (prefers-color-scheme: dark) {
  /* 可以在这里添加暗色模式样式 */
}

/* --- 打印样式 --- */
@media print {
  .app-header, .bottom-nav, .lang-switch-btn, .watermark-layer {
    display: none !important;
  }
}
