/* HUZHU.space — Design System & Homepage Styles */

/* ==================== CSS Variables ==================== */
:root {
  /* Colors */
  --color-primary: #0ea5e9;
  --color-primary-dark: #0284c7;
  --color-primary-light: #e0f2fe;
  --color-primary-rgb: 14, 165, 233;
  --color-secondary: #f59e0b;
  --color-secondary-dark: #d97706;
  --color-secondary-light: #fef3c7;
  --color-success: #22c55e;
  --color-success-light: #dcfce7;
  --color-error: #ef4444;
  --color-error-light: #fee2e2;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;

  /* Backgrounds */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Borders */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0ea5e9, #0284c7);
  --gradient-secondary: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-success: linear-gradient(135deg, #22c55e, #16a34a);
  --gradient-bg: radial-gradient(circle at 20% 0, rgba(14, 165, 233, 0.15) 0, transparent 34%), linear-gradient(180deg, #f0f9ff, #f8fafc);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";
  line-height: 1.5;
}

/* ==================== Page Layout ==================== */
.page {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  padding: 0 var(--space-lg) 0;
  overscroll-behavior: none;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}

/* ==================== Navigation ==================== */
.nav-root {
  position: sticky;
  height: 56px;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 var(--space-lg);
  margin: 0 calc(-1 * var(--space-lg));
}

.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 56px;
  gap: var(--space-md);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.nav-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.nav-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-menu:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

/* ==================== Hero Card ==================== */
.hero-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-top: var(--space-md);
  box-shadow: var(--shadow-md);
}

.hero-brand-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.hero-notify-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.hero-notify-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.hero-notify-btn svg {
  width: 12px;
  height: 12px;
}

.hero-title {
  display: inline;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-title-badge {
  position: relative;
  top: -8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  margin-left: -12px;
  white-space: nowrap;
}

.hero-split {
  display: flex;
  align-items: stretch;
  margin-top: var(--space-md);
  gap: 0;
}

.hero-stat {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md) var(--space-xs);
  text-align: center;
}

.hero-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.2;
}

.hero-stat-value {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1.1;
}

.hero-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero-stat-unit {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.hero-divider {
  flex: 0 0 1px;
  align-self: stretch;
  background: repeating-linear-gradient(180deg, var(--border-color) 0, var(--border-color) 4px, transparent 0, transparent 8px);
  margin: var(--space-sm) 0;
}

.hero-contact {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg);
  cursor: pointer;
  border: none;
  background: var(--bg-surface);
  transition: opacity var(--transition-fast);
  text-align: left;
  font: inherit;
  color: var(--text-primary);
}

.hero-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.hero-contact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-contact-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.hero-contact-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.hero-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-md);
  line-height: 1.4;
}

.hero-contact-arrow {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
}

/* ==================== Below Hero ==================== */
.below-hero {
  margin-top: var(--space-md);
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

/* ==================== Submit Card ==================== */
.submit-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.submit-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.submit-card-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-error);
}

.submit-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: nowrap;
  align-items: stretch;
}

.input-wrap {
  flex: 1;
  position: relative;
}

.submit-input {
  width: 100%;
  padding: 10px 36px 10px var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all var(--transition-normal);
  font-variant-numeric: tabular-nums;
}

.submit-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  background: var(--bg-surface);
}

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

.input-clear {
  position: absolute;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.input-clear:hover {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
  white-space: nowrap;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.4);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-ocr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-ocr:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.05);
}

.btn-ocr:active {
  transform: scale(0.98);
}

.btn-ocr.loading {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

.btn-ocr .lucide {
  width: 16px;
  height: 16px;
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.agree-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==================== Quick Join Button ==================== */
.btn-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
  white-space: nowrap;
}

.btn-quick:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14,165,233,0.4);
}

.btn-quick:active {
  transform: scale(0.97);
}

.btn-quick:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==================== Announcement Bar ==================== */
.announce-bar {
  background: linear-gradient(135deg, var(--color-secondary-light), #fff7ed);
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-sm) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 12px;
  color: var(--color-secondary-dark);
}

.ann-icon {
  flex-shrink: 0;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
}

.ann-icon svg {
  width: 16px;
  height: 16px;
}

.ann-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ann-text-inner {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes marquee {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

.ann-view {
  flex-shrink: 0;
  color: var(--color-secondary-dark);
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 2px;
}

.ann-view svg {
  width: 14px;
  height: 14px;
}

/* ==================== Activity Strip ==================== */
.activity-strip {
  margin-top: var(--space-md);
  display: none;
}

.activity-strip__card {
  background: linear-gradient(180deg, #fefce8, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.activity-strip__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-md);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #92400e;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.activity-strip__close:hover {
  background: var(--bg-surface);
  color: #78350f;
}

.activity-strip__notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 11px;
  color: #92400e;
  margin-bottom: var(--space-md);
  padding-right: 24px;
}

.activity-strip__notice-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-warning);
  color: #78350f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
}

.activity-strip__period {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.activity-strip__period-label {
  font-size: 14px;
  font-weight: 700;
  color: #78350f;
}

.activity-strip__period-date {
  font-size: 12px;
  color: #92400e;
}

.activity-strip__period-status {
  font-size: 11px;
  color: var(--color-error);
  font-weight: 600;
  background: var(--color-error-light);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.activity-strip__status {
  font-size: 16px;
  font-weight: 700;
  color: #451a03;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
  text-align: center;
}

.activity-strip__sub {
  font-size: 12px;
  color: #92400e;
  line-height: 1.4;
  margin-bottom: var(--space-md);
  text-align: center;
}

.activity-strip__actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.activity-strip__btn {
  padding: 8px var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-secondary);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.activity-strip__btn:hover {
  opacity: 0.9;
}

.activity-strip__btn--sub {
  background: var(--bg-surface);
  color: var(--color-secondary-dark);
  border: 1px solid #fde68a;
}

/* ==================== List Card ==================== */
.list-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.list-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='390' height='246' viewBox='0 0 390 246'%3E%3Cg font-family='-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Microsoft YaHei,sans-serif'%3E%3Ctext x='106' y='111' fill='rgba(15,23,42,0.115)' font-size='24' font-weight='760' letter-spacing='2.6' transform='rotate(-24 195 123)'%3E%E4%BA%92%E5%8A%A9%E7%A9%BA%E9%97%B4%3C/text%3E%3Ctext x='106' y='149' fill='rgba(15,23,42,0.092)' font-size='20' font-weight='680' letter-spacing='1.3' transform='rotate(-24 195 123)'%3Ehuzhu.space%3C/text%3E%3C/g%3E%3C/svg%3E"),
    repeating-linear-gradient(-24deg, rgba(15, 23, 42, 0.014) 0 1px, transparent 1px 152px);
  background-position: 52px 16px, 0 0;
  background-repeat: repeat;
  background-size: 390px 246px, auto;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}
.no-watermark .list-card::after { display: none; }

/* ==================== Toolbar ==================== */
.team-count-banner {
  text-align: center;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #9a3412;
  background: linear-gradient(135deg, #FFF7ED, #FFF1E6);
  border: 1px solid #FED7AA;
  border-radius: 10px;
  letter-spacing: 0.5px;
}
.team-count-banner strong {
  color: #ea580c;
  font-size: 18px;
  font-weight: 700;
  margin: 0 2px;
}
.demo-codes {
  min-height: 280px;
}
.demo-code-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  margin-bottom: 8px;
}
.demo-code-info {
  min-width: 0;
}
.demo-code-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}
.demo-code-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.demo-code-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.demo-copy-btn {
  padding: 5px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.demo-copy-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.demo-status.used {
  font-size: 12px;
  color: var(--color-primary, #FF8C00);
  font-weight: 500;
  white-space: nowrap;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: var(--space-md) 0;
}

.btn-icon {
  flex: 0 0 auto;
  min-width: 80px;
  width: 80px;
}

.btn-quick {
  flex: 1;
  min-width: 0;
}

.toolbar-count {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.count-badge {
  display: inline;
  color: var(--color-primary-dark);
  font-size: 16px;
  font-weight: 800;
}

.count-badge.has-count {
  color: var(--color-primary);
}

.count-badge .hot-text {
  animation: hotPulse 1.2s ease-in-out infinite;
  display: inline-block;
}

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

.btn-refresh {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: #6366f1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-refresh:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
}

/* ==================== Tab Bar ==================== */
.tab-bar {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-xs);
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.tab-bar .tab {
  flex: 1;
  text-align: center;
  padding: var(--space-sm) var(--space-md);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  font-weight: 500;
  white-space: nowrap;
}

.tab-bar .tab.active {
  color: var(--color-primary);
  background: var(--bg-surface);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ==================== Code Card ==================== */
.code-card .avatar { display: none !important; }

.code-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.code-card:hover {
  border-color: var(--border-color);
  border-left-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.code-card .body {
  flex: 1;
  min-width: 0;
}

.code-card .code {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.code-wrap {
  position: relative;
  display: inline-block;
}

.code-new-tag {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.3;
  animation: newTagPulse 1.5s ease-in-out infinite;
}

@keyframes newTagPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.code-card .meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.code-card .meta .dot {
  color: var(--border-color);
}

/* ==================== Code Buttons ==================== */
.btn-use {
  flex-shrink: 0;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(var(--color-primary-rgb), 0.25);
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-use:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.35);
}

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

.btn-join {
  flex-shrink: 0;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  background: #fff7ed;
  color: #ea580c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-join:hover {
  background: #ffedd5;
}

.btn-report {
  flex-shrink: 0;
  padding: 4px var(--space-sm);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  color: var(--color-error);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-report:hover {
  background: var(--color-error-light);
}

/* ==================== Empty State ==================== */
.empty-state {
  text-align: center;
  padding: 60px var(--space-xl);
  display: none;
  position: relative;
  overflow: hidden;
}

.empty-state.refresh-flash {
  animation: refreshFlash 0.5s ease;
}

.empty-state.refresh-flash::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: flashSweep 0.6s ease;
  pointer-events: none;
}

@keyframes refreshFlash {
  0% { opacity: 0.4; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.01); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes flashSweep {
  0% { left: -60%; }
  100% { left: 110%; }
}

.empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.empty-line1 {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 15px;
}

/* ==================== Record Modal ==================== */
.record-card {
  background: var(--bg-surface);
  border-radius: 22px;
  padding: 24px 20px 20px;
  width: 360px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.record-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.record-time-header {
  font-size: 12px;
  color: var(--text-muted);
}

.record-hint {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.record-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.record-tab {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.record-tab.active {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  border-color: transparent;
}

.record-list {
  flex: 1;
  overflow-y: auto;
  max-height: 40vh;
  margin-bottom: var(--space-md);
}

.record-footer {
  display: flex;
  justify-content: center;
}

.btn-record-close {
  width: 100%;
  padding: 10px var(--space-md);
  border: none;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-record-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.3);
}

/* ==================== Notice Group Modal ==================== */
.ng-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: 340px;
  max-width: 90%;
  padding: 24px 20px;
  position: relative;
  text-align: center;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.pdd-modal-close-x {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdd-modal-close-x:hover {
  background: #e5e7eb;
  color: #334155;
}

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

.ng-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-error);
}

.ng-wechat {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #07c160;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ng-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

.ng-sub {
  font-size: 13px;
  color: #334155;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 16px;
}

.ng-qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.ng-qr {
  width: min(180px, 50vw);
  height: min(180px, 50vw);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  object-fit: contain;
  background: #f8fafc;
}

.ng-hint {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
}

.ng-btns {
  display: flex;
  gap: 10px;
}

.ng-btn-wrap {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.ng-btn-label {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.ng-btn-label-join {
  color: #f97316;
  font-weight: 500;
}

.ng-btn-close {
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
}

.ng-btn-close:hover {
  background: #f1f5f9;
}

.ng-btn-join {
  flex: 1;
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  background: #10b981;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.ng-btn-join:hover {
  filter: brightness(1.05);
}

/* ==================== Footer ==================== */
.site-info {
  text-align: center;
  padding: var(--space-sm) 0 var(--space-xs);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  padding: 14px 24px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  max-width: 85vw;
  white-space: pre-line;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: var(--space-sm);
  vertical-align: middle;
  animation: checkPop 0.4s ease;
}

.toast-check svg {
  width: 24px;
  height: 24px;
}

.toast-check circle {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 2.5;
  stroke-dasharray: 63;
  stroke-dashoffset: 63;
  animation: checkCircle 0.5s 0.1s ease forwards;
}

.toast-check path {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14;
  stroke-dashoffset: 14;
  animation: checkPath 0.4s 0.45s ease forwards;
}

@keyframes checkPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes checkCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes checkPath {
  to { stroke-dashoffset: 0; }
}

/* ==================== Modal ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#reportModal {
  z-index: 10001;
}

#joinModal {
  z-index: 10000;
}

#banModal {
  z-index: 10002;
}

#recordModal {
  z-index: 10000;
}

#resultModal {
  z-index: 10003;
}

.ban-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  position: relative;
}

.ban-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s;
}

.ban-close:hover {
  background: #e2e8f0;
  color: #475569;
}

.ban-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ban-icon svg,
.ban-icon i {
  width: 32px;
  height: 32px;
  color: #ef4444;
}

.ban-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px;
}

.ban-msg {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 4px;
}

.ban-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 20px;
}

.ban-btn-appeal {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}

.ban-btn-appeal:active {
  transform: scale(0.97);
}

.ban-appeal-form {
  margin-top: 16px;
  text-align: left;
}

.ban-appeal-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  resize: none;
  box-sizing: border-box;
}

.ban-appeal-form textarea:focus {
  outline: none;
  border-color: #f59e0b;
}

.ban-appeal-btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ban-btn-cancel {
  flex: 1;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
}

.ban-btn-submit {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #f59e0b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

body:has(.modal.show) {
  overflow: hidden;
}

.modal.show .modal-box,
.modal.show .report-card,
.modal.show .record-card,
.modal.show .ng-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-box {
  background: var(--bg-surface);
  border-radius: 22px;
  padding: 28px 24px 24px;
  width: 340px;
  max-width: 90%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.modal-box h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
  letter-spacing: -0.01em;
}

.big-code {
  font-size: 34px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: var(--space-sm);
  font-variant-numeric: tabular-nums;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lock-hint {
  font-size: 13px;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: var(--space-lg);
  font-weight: 600;
}

.countdown-hint {
  text-align: center;
  font-size: 14px;
  color: var(--color-secondary-dark);
  margin: var(--space-sm) 0 var(--space-md);
  font-weight: 700;
  display: none;
  padding: 10px;
  background: var(--color-secondary-light);
  border-radius: var(--radius-md);
}

.modal-btns {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-lg);
}

.btn-primary {
  padding: 12px var(--space-2xl);
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.35);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-cancel {
  padding: 12px var(--space-2xl);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cancel:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
}

/* Join Modal */
.join-modal {
  position: relative;
  text-align: center;
  padding: 24px 20px 20px;
}

.join-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.join-close:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.join-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.join-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-error-light);
  border: 1px solid rgba(var(--color-error-rgb, 239, 68, 68), 0.2);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-error);
  margin-bottom: 12px;
}

.join-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-error);
  display: inline-block;
}

.join-hint {
  font-size: 12px;
  color: var(--color-error);
  margin-bottom: 12px;
  line-height: 1.5;
  font-weight: 600;
}

.join-code-box {
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 14px;
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 6px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}

.join-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-btn-primary {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-normal);
}

.join-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.3);
}

.join-btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.join-btn-outline {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.join-btn-outline:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
}

.ann-dont-remind {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 12px;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ann-dont-remind:hover {
  color: var(--color-error);
  background: var(--color-error-light);
}

.ann-dont-remind svg {
  width: 14px;
  height: 14px;
}

/* ==================== Announcement Modal ==================== */
#annModal .modal-box {
  width: 300px;
  max-width: 88%;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
}

#annModal .modal-box h3 {
  display: none;
}

.ann-visual {
  position: relative;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-default);
}

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

.ann-icon-dot {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ann-icon-dot svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.ann-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.ann-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-muted);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.ann-close-btn:hover {
  background: var(--border-default);
  color: var(--text-secondary);
}

.ann-close-btn svg {
  width: 14px;
  height: 14px;
}

.ann-body {
  padding: 16px 18px 18px;
}

.ann-content {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
  text-align: left;
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  word-break: break-word;
  font-weight: 500;
}

.ann-content::-webkit-scrollbar {
  width: 3px;
}

.ann-content::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

.ann-actions {
  margin-top: 20px;
  display: flex;
  gap: 8px;
}

.ann-btn-primary {
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.ann-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.3);
}

.ann-btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.ann-btn-secondary {
  flex: 1;
  padding: 11px 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ann-btn-secondary:hover {
  color: var(--text-secondary);
  border-color: var(--text-muted);
  background: var(--bg-muted);
}

.ann-btn-secondary svg {
  width: 13px;
  height: 13px;
}

/* ==================== Report Modal ==================== */
.report-card {
  background: var(--bg-surface);
  border-radius: 22px;
  padding: 24px 20px 20px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.report-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.report-close {
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  border: none;
  background: none;
}

.report-close:hover {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.report-rule {
  font-size: 12px;
  color: #92400e;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-secondary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.report-code-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.report-code-label {
  flex-shrink: 0;
  padding: 10px var(--space-sm) 10px var(--space-lg);
  font-size: 13px;
  color: var(--color-error);
  font-weight: 700;
  white-space: nowrap;
}

.report-code-wrap .report-code {
  border: none;
  border-radius: 0;
  background: var(--bg-surface);
  margin-bottom: 0;
  padding: 10px var(--space-lg) 10px var(--space-sm);
  text-align: center;
  flex: 1;
}

.report-code {
  width: 100%;
  padding: 12px var(--space-lg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: var(--space-lg);
  text-align: center;
  outline: none;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.report-code:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

.report-field {
  margin-bottom: var(--space-lg);
}

.report-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.report-radio {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px var(--space-lg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.report-radio:hover {
  border-color: var(--text-muted);
}

.report-radio:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 1px rgba(var(--color-primary-rgb), 0.15);
}

.report-radio input[type="radio"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
}

.report-radio-label {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.report-select {
  width: 100%;
  padding: 12px var(--space-lg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.report-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

.report-textarea {
  width: 100%;
  padding: 12px var(--space-lg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  font-family: inherit;
  min-height: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.report-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

.report-submit {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: var(--space-sm);
  box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.3);
  transition: all var(--transition-normal);
}

.report-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.4);
}

.report-submit:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* ==================== Contact Modal (Bottom Sheet) ==================== */
.c-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.c-modal.show {
  opacity: 1;
  visibility: visible;
}

.c-sheet {
  background: var(--bg-surface);
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  margin: 0 var(--space-lg);
}

.c-modal.show .c-sheet {
  transform: translateY(0);
}

.c-sheet::before {
  display: none;
}

.cm-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.cm-close:hover {
  background: var(--border-color);
}

.cm-hd {
  padding: var(--space-2xl) var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  text-align: left;
}

.cm-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-xs);
}

.cm-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.cm-bd {
  padding: var(--space-md) var(--space-lg) var(--space-xl);
}

.cm-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-md);
}

.cm-tab {
  flex: 1;
  padding: 12px var(--space-xs);
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  transition: all var(--transition-fast);
}

.cm-tab.on {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.cm-pane {
  display: none;
}

.cm-pane.on {
  display: block;
}

/* 平铺列表样式 */
.cm-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cm-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-surface);
  transition: background 0.15s;
}

.cm-list-item:active {
  background: var(--bg-muted);
}

.cm-list-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-list-icon svg {
  width: 18px;
  height: 18px;
}

.cm-list-text {
  flex: 1;
  min-width: 0;
}

.cm-list-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.cm-list-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  word-break: break-all;
}

.cm-list-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.15s;
}

.cm-list-btn:active {
  opacity: 0.8;
}

.cm-ft {
  padding: var(--space-md) var(--space-lg) var(--space-xl);
}

.cm-closebtn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.cm-closebtn:active {
  opacity: 0.85;
}

.cm-more-card {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-sm) 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFF7ED, #FFF1E6);
  border: 1px solid #FED7AA;
  text-decoration: none;
  color: #9a3412;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
}

.cm-more-card:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.cm-more-icon {
  font-size: 18px;
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.cm-more-text {
  flex: none;
  color: #ea580c;
}

.cm-more-arrow {
  font-size: 20px;
  color: #f97316;
  margin-left: 6px;
}

/* ==================== Feedback Form ==================== */
.fb-prompt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 var(--space-md);
}

.fb-input {
  width: 100%;
  padding: 12px var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-muted);
  outline: none;
  margin-bottom: var(--space-sm);
}

.fb-textarea {
  width: 100%;
  padding: 12px var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-muted);
  outline: none;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.fb-counter {
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  margin: -6px 0 var(--space-xs);
}

.fb-counter.warn {
  color: var(--color-warning);
}

.fb-counter.danger {
  color: var(--color-error);
}

.fb-submit {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: var(--space-md);
  transition: all var(--transition-normal);
}

.fb-submit:hover {
  background: var(--color-primary-dark);
}

/* ==================== Ban Notice ==================== */
.ban-notice {
  display: none;
  width: calc(100% + var(--space-2xl) * 2);
  background: var(--color-error);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: var(--space-md) var(--space-lg);
}

.ban-notice.show {
  display: block;
}

/* ==================== Responsive ==================== */
@media (max-width: 380px) {
  .nav-sub {
    display: none;
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .hero-stat-num {
    font-size: 24px;
  }

  .btn-submit {
    padding: 10px 14px;
    font-size: 13px;
  }

  .btn-ocr {
    padding: 10px 10px;
    font-size: 12px;
  }
}

/* ==================== List Header ==================== */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.list-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.title-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.refresh-countdown {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.refresh-countdown .countdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

.roll-digit {
  display: inline-block;
  height: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
  position: relative;
}

.roll-strip {
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.roll-num {
  height: 1.2em;
  line-height: 1.2em;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.roll-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 1px;
}

/* ==================== Icon Button ==================== */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-icon:hover {
}

.btn-icon:active {
  border-color: var(--color-primary);
}

.btn-icon:disabled {
  border-color: var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  opacity: 1;
  cursor: pointer;
}

.btn-icon.refreshing {
  border-color: var(--color-primary);
  background: var(--bg-surface);
  color: var(--color-primary);
}

.refresh-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.spin {
  animation: spin 0.8s linear infinite;
}

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

#codeList {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  margin-bottom: 12px;
  min-height: 200px;
}
.list-overflow-mask {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  min-height: 92px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.94) 58%, #fff);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 40px 12px 10px;
  pointer-events: none;
  z-index: 3;
}
.list-overflow-mask span {
  background: rgba(248,250,252,0.9);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(148,163,184,0.1);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#codeList.scrollable {
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.load-more-btn {
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-top: 1px solid var(--border-light);
  transition: color var(--transition-fast);
}

.load-more-btn:active {
  color: var(--color-primary);
}

/* Code card removal animation */
.code-card.removing {
  animation: cardRemove 0.35s ease forwards;
}

@keyframes cardRemove {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(60px); opacity: 0; max-height: 0; padding: 0; margin: 0; border-width: 0; }
}

.low-stock-hint {
  margin: 12px 14px 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 50%, #fff7ed 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  animation: lowStockPulse 3s ease-in-out infinite;
}

.low-stock-hint::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.06) 50%, transparent 100%);
  animation: lowStockShimmer 4s ease-in-out infinite;
}

@keyframes lowStockPulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(245, 158, 11, 0.08); }
  50% { box-shadow: 0 2px 18px rgba(245, 158, 11, 0.18); }
}

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

.low-stock-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  position: relative;
  z-index: 1;
}

.low-stock-icon i,
.low-stock-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
  stroke: #fff;
}

.low-stock-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.low-stock-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
  line-height: 1.3;
  margin-bottom: 2px;
}

.low-stock-text span {
  font-size: 12px;
  color: #b45309;
  opacity: 0.8;
}

.low-stock-action {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.low-stock-action a,
.low-stock-action button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
}

.low-stock-action a:hover,
.low-stock-action button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.low-stock-action a:active,
.low-stock-action button:active {
  transform: translateY(0);
}

.code-list-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.3) 30%, rgba(255,255,255,0.55) 60%, rgba(255,255,255,0.7) 100%);
  pointer-events: none;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px 10px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
}

.code-list-mask span {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  pointer-events: auto;
}

#codeList.loading .code-card {
  position: relative;
  overflow: hidden;
}

#codeList.loading .code-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shimmer 0.8s infinite;
}

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

/* ==================== More Hint ==================== */
.more-hint {
  text-align: center;
  padding: 12px var(--space-md);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  margin-top: var(--space-xs);
  border: 1px dashed var(--border-color);
  position: relative;
  z-index: 1;
}

/* ==================== Report Section ==================== */
.report-section {
  text-align: center;
  padding: var(--space-lg) 0;
  margin-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.btn-report-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--color-error);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-error);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-report-link:hover {
  background: var(--color-error-light);
}

.report-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ==================== Record Modal ==================== */
.record-card {
  background: var(--bg-surface);
  border-radius: 22px;
  padding: 24px;
  width: 360px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.record-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.record-time-header {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.record-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}

.record-account {
  font-size: 13px;
  color: var(--text-primary);
  padding: var(--space-md);
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  text-align: center;
}

.record-account strong {
  color: var(--color-primary-dark);
}

.record-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.record-tab {
  flex: 1;
  padding: 10px var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.record-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.record-tab.active {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.25);
}

.record-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

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

.record-item:hover {
  background: var(--bg-muted);
}

.record-item:last-child {
  border-bottom: none;
}

.record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-primary);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

.record-code {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.record-item-time {
  font-size: 11px;
  color: var(--text-muted);
}

.record-item-btns {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.record-btn-copy,
.record-btn-report {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.record-btn-copy {
  background: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
}

.record-btn-copy:hover {
  background: rgba(var(--color-primary-rgb), 0.2);
}

.record-btn-report {
  background: rgba(var(--color-error-rgb, 239, 68, 68), 0.1);
  color: var(--color-error);
}

.record-btn-report:hover {
  background: rgba(var(--color-error-rgb, 239, 68, 68), 0.2);
}

.record-btn-pending {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: none;
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  cursor: default;
}

.record-btn-done {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: none;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  cursor: default;
}

.record-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
  font-size: 13px;
}

.record-footer {
  display: flex;
  justify-content: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.btn-record-close {
  width: 100%;
  padding: 10px var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.35);
  position: relative;
  overflow: hidden;
}

.btn-record-close::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn-record-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.45);
}

.btn-record-close:hover::before {
  left: 100%;
}

.btn-record-close:active {
  transform: translateY(0) scale(0.98);
}

/* ==================== Entrance Animations ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hero card entrance */
.hero-card {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Submit card entrance */
.submit-card {
  animation: fadeInUp 0.5s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Announce bar entrance */
.announce-bar {
  animation: fadeInUp 0.5s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* List card entrance */
.list-card {
  animation: fadeInUp 0.5s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Activity strip entrance */
.activity-strip {
  animation: fadeInUp 0.5s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ==================== Code Card Stagger ==================== */
@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.code-card {
  animation: cardEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger delay set via JS inline style: style="animation-delay: ${i * 50}ms" */

/* ==================== Tab Switch ==================== */
.tab-bar .tab {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-bar .tab.active {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==================== Quick Join Pulse ==================== */
@keyframes quickPulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(14,165,233,0.3);
  }
  50% {
    box-shadow: 0 2px 16px rgba(14,165,233,0.5), 0 0 0 3px rgba(14,165,233,0.1);
  }
}

.btn-quick:not(:disabled):not([class*="matching"]) {
  animation: quickPulse 2.5s ease-in-out infinite;
}

.btn-quick:hover {
  animation: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14,165,233,0.4);
}

.btn-quick:active {
  animation: none;
}

/* ==================== Toast Improved ==================== */
.toast {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==================== Number Flash ==================== */
@keyframes numFlash {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); color: var(--color-primary); }
  100% { transform: scale(1); }
}

.hero-stat-num.flash {
  animation: numFlash 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==================== Refresh Button Active ==================== */
.btn-icon:active:not(:disabled) {
  transform: scale(0.92);
  transition: transform 0.1s;
}

/* ==================== Code Card Remove (used/fake) ==================== */
@keyframes cardRemove {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 120px;
    margin-bottom: var(--space-sm);
  }
  30% {
    opacity: 0.8;
    transform: translateX(-8px) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translateX(120px) scale(0.85) rotate(8deg);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-width: 0;
    overflow: hidden;
  }
}

.code-card.removing {
  animation: cardRemove 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

/* ==================== Submit Success Ripple ==================== */
@keyframes submitSuccess {
  0% { box-shadow: 0 0 0 0 rgba(var(--color-success-rgb, 34,197,94), 0.4); }
  100% { box-shadow: 0 0 0 12px rgba(var(--color-success-rgb, 34,197,94), 0); }
}

.btn-submit.success {
  animation: submitSuccess 0.6s ease-out;
}

/* ==================== Focus Ring ==================== */
.submit-input:focus {
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* ==================== Demo Code Blur ==================== */
.demo-code-item:nth-child(4) { filter: blur(1px); opacity: 0.85; }
.demo-code-item:nth-child(5) { filter: blur(2px); opacity: 0.7; }
.demo-code-item:nth-child(n+6) { filter: blur(3px); opacity: 0.5; }

/* ==================== Turnstile Verify Modal ==================== */
.verify-modal {
  width: 340px;
  max-width: 90%;
  text-align: center;
  padding: 32px 24px 24px;
}
.verify-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--bg-muted, #f1f5f9);
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}
.verify-close:hover {
  background: var(--border-color, #e2e8f0);
  color: var(--text-primary, #0f172a);
}
.verify-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(2, 132, 199, 0.05));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.verify-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary, #0ea5e9);
}
.verify-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin: 0 0 8px;
}
.verify-desc {
  font-size: 14px;
  color: var(--text-primary, #0f172a);
  margin: 0 0 20px;
  line-height: 1.5;
}
.verify-widget-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 65px;
}
.verify-widget-wrap .cf-turnstile {
  transform: scale(1);
  transform-origin: center;
}
.verify-tip {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
.verify-hint {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin: 6px 0 0;
  opacity: 0.7;
}
/* 验证成功动画 */
.verify-success .verify-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  animation: verifyPulse 0.4s ease;
}
.verify-success .verify-icon svg {
  color: var(--color-success, #22c55e);
}
@keyframes verifyPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
