:root {
  --bg: #030508;
  --surface: #0f131a;
  --surface-hover: #161b25;
  --surface-active: #1c2230;
  --border: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --secondary: #a855f7;
  --accent: #06b6d4;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
  --trans: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.light {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-active: #e2e8f0;
  --border: rgba(15, 23, 42, 0.1);
  --primary: #4f46e5;
  --primary-glow: rgba(79, 70, 229, 0.2);
  --text: #0f172a;
  --text-muted: #64748b;
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; transition: color var(--trans); }
button, input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; }

/* Layout */
.app-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
}

.bg-blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--primary); animation: float 20s infinite alternate; }
.bg-blob-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; background: var(--secondary); animation: float 15s infinite alternate-reverse; }
.bg-blob-3 { top: 40%; left: 40%; width: 30vw; height: 30vw; background: var(--accent); opacity: 0.2; animation: float 25s infinite reverse; }

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 30px); }
}

.app-shell { display: flex; flex-direction: column; min-height: 100vh; position: relative; z-index: 1; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(3, 5, 8, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.light .app-header { background: rgba(248, 250, 252, 0.8); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-text { white-space: nowrap; }
.logo-img {
  width: auto;
  height: 36px;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-dark { display: block; }
.logo-light { display: none; }
.light .logo-dark { display: none; }
.light .logo-light { display: block; }
.logo-glyph {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 15px var(--primary-glow);
}

@media (max-width: 768px) {
  .brand-text { display: none; }
  .logo-img { height: 32px; max-width: 100px; }
}

.app-nav { display: flex; gap: 4px; margin-right: auto; }
.nav-link {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-link:hover { color: var(--text); background: var(--surface-hover); }
.nav-link.active { color: var(--text); background: var(--surface-active); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.app-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--trans);
  font-size: 0.95rem;
  gap: 8px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.btn.primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn.secondary:hover { background: var(--surface-hover); border-color: rgba(255,255,255,0.2); }

.btn.ghost { color: var(--text-muted); background: transparent; }
.btn.ghost:hover { color: var(--text); background: var(--surface-hover); }
.btn.full { width: 100%; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--trans);
  position: relative;
  overflow: hidden;
}

.card-hover:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 24px;
  background: linear-gradient(to right, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 500px;
}

.stats-row {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat-item h4 { font-size: 2rem; font-weight: 700; margin: 0; line-height: 1; color: var(--text); }
.stat-item p { margin: 8px 0 0; font-size: 0.875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.glass-panel {
  background: rgba(15, 19, 26, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.light .glass-panel { background: rgba(255, 255, 255, 0.6); }

.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; }
.section-title { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.section-desc { color: var(--text-muted); margin: 4px 0 0; font-size: 0.95rem; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

/* Premium List Styles */
.page-header {
  position: relative;
  padding: 60px 0 40px;
  text-align: center;
  overflow: hidden;
  margin-bottom: 40px;
}
.page-header h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  margin: 0;
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 2;
  letter-spacing: -0.03em;
}
.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 16px auto 0;
  position: relative;
  z-index: 2;
}
.page-header::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.lottery-card-premium {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4px;
  position: relative;
  transition: var(--trans);
  overflow: hidden;
  height: 100%;
}
.lottery-card-premium:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25);
}
.lottery-card-inner {
  background: var(--surface-active);
  border-radius: 20px;
  padding: 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
  transition: background var(--trans);
}
.light .lottery-card-inner { background: var(--surface-hover); }

.lottery-card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
  border-radius: 24px;
}
.lottery-card-premium:hover::before { opacity: 1; }
.lottery-card-premium:hover .lottery-card-inner { background: var(--surface); }

/* Lottery Card Icon Decoration */
.lottery-card-inner::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0.1;
  border-radius: 12px;
  transition: var(--trans);
}
.lottery-card-premium:hover .lottery-card-inner::after {
  opacity: 0.15;
  transform: scale(1.1);
}

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-live { 
  background: rgba(16, 185, 129, 0.1); 
  color: var(--success); 
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: inline-flex;
  align-items: center;
}
.badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.badge-upcoming { 
  background: rgba(6, 182, 212, 0.1); 
  color: var(--accent); 
  border: 1px solid rgba(6, 182, 212, 0.2);
  display: inline-flex;
  align-items: center;
}

/* Pulse Animation for Live Badge */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.info-row { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--text-muted); padding-top: 16px; border-top: 1px solid var(--border); margin-top: auto; }
.info-item span { display: block; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 2px; opacity: 0.7; }
.info-item strong { color: var(--text); font-weight: 500; }

.coupon-ticket-premium {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  transition: var(--trans);
  border: 1px solid var(--border);
  min-height: 160px;
}
.coupon-ticket-premium:hover {
  border-color: var(--secondary);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.2);
}
.coupon-ticket-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  opacity: 0;
  transition: var(--trans);
}
.coupon-ticket-premium:hover::before {
  opacity: 1;
}
.coupon-left {
  flex: 1;
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 2px dashed var(--border);
  mask-image: radial-gradient(circle at right center, transparent 12px, black 13px);
  -webkit-mask-image: radial-gradient(circle at right center, transparent 12px, black 13px);
}
.coupon-right {
  width: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--surface-active) 0%, var(--surface-hover) 100%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  transition: var(--trans);
}
.coupon-ticket-premium:hover .coupon-right {
  background: linear-gradient(180deg, rgba(99,102,241,0.1) 0%, rgba(168,85,247,0.1) 100%);
  color: var(--primary);
}
.coupon-circle {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
  z-index: 2;
  border: 1px solid var(--border);
}

/* Ticket Card (User Center Style) */
.ticket-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--trans);
}
.ticket-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.ticket-card .header {
  padding: 12px 20px;
  background: rgba(99,102,241,0.08);
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ticket-card .body {
  padding: 20px;
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.ticket-card .footer {
  padding: 12px 20px;
  background: var(--surface-active);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.ticket-card.coupon-style .body {
  mask-image: radial-gradient(circle at left center, transparent 8px, black 9px),
              radial-gradient(circle at right center, transparent 8px, black 9px);
  -webkit-mask-image: radial-gradient(circle at left center, transparent 8px, black 9px),
                      radial-gradient(circle at right center, transparent 8px, black 9px);
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Form Styles */
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}
.field-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 6px;
}
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Button States */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}
.btn.primary.loading::after {
  border-top-color: #fff;
}
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

/* Button Danger */
.btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Icon Only Button */
.btn.icon-only {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn.icon-only svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .hero-section { grid-template-columns: 1fr; text-align: center; padding: 24px 0; }
  .hero-visual { display: none; }
  .stats-row { justify-content: center; }
  .app-header { padding: 12px 16px; gap: 12px; }
  .app-nav { display: none; }
  
  /* 确保图标在小屏幕上正确显示 */
  .lottery-card-icon,
  .coupon-card-icon {
    width: 48px;
    height: 48px;
  }
  .lottery-card-icon svg,
  .coupon-card-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .user-chip svg {
    width: 14px;
    height: 14px;
  }
  
  .btn svg:not(.btn.large svg) {
    width: 18px;
    height: 18px;
  }
  
  .btn.icon-only svg {
    width: 18px;
    height: 18px;
  }
  
  .search-embedded button svg,
  .search-embedded .btn svg {
    width: 18px;
    height: 18px;
  }
  
  .badge svg {
    width: 10px;
    height: 10px;
  }
  .coupon-ticket-premium { flex-direction: column; min-height: auto; }
  .coupon-left { 
    border-right: none; 
    border-bottom: 2px dashed var(--border); 
    mask-image: radial-gradient(circle at bottom center, transparent 12px, black 13px); 
    -webkit-mask-image: radial-gradient(circle at bottom center, transparent 12px, black 13px); 
    padding: 24px; 
  }
  .coupon-right { 
    width: 100%; 
    height: 44px; 
    writing-mode: horizontal-tb; 
    border-left: none; 
    letter-spacing: 3px;
  }
  .page-header { padding: 40px 0 20px; }
  
  /* 确保图标在小屏幕上正确显示 */
  .lottery-card-icon,
  .coupon-card-icon {
    width: 48px;
    height: 48px;
  }
  .lottery-card-icon svg,
  .coupon-card-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .user-chip svg {
    width: 14px;
    height: 14px;
  }
  
  .btn svg:not(.btn.large svg) {
    width: 18px;
    height: 18px;
  }
  
  .btn.icon-only svg {
    width: 18px;
    height: 18px;
  }
  
  .search-embedded button svg,
  .search-embedded .btn svg {
    width: 18px;
    height: 18px;
  }
  
  .badge svg {
    width: 10px;
    height: 10px;
  }
  
  .lottery-card-inner {
    padding: 20px;
  }
  .lottery-card-inner::after {
    width: 32px;
    height: 32px;
    top: 16px;
    left: 16px;
  }
}

/* Inputs */
input.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-active);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  transition: var(--trans);
}
input.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
input[type="checkbox"] { accent-color: var(--primary); }

/* Nav Mobile Toggle */
.nav-toggle { 
  display: none; 
  background: var(--surface-active); 
  border: 1px solid var(--border); 
  color: var(--text); 
  cursor: pointer; 
  padding: 8px; 
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.nav-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
}

.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 200;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.light .nav-mobile { background: var(--bg); }
.nav-mobile.open { transform: translateX(0); }
.nav-mobile a { 
  font-size: 1.1rem; 
  font-weight: 600; 
  padding: 14px 18px;
  border-radius: 12px;
  transition: var(--trans);
  color: var(--text);
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
}
.nav-mobile a:hover,
.nav-mobile a.active {
  background: var(--surface-hover);
  color: var(--primary);
  border-color: var(--primary);
}
.nav-mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--surface-active);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
  z-index: 10;
}
.nav-mobile-close svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.nav-mobile-close:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
}
.nav-mobile-logout,
.nav-mobile-login {
  margin-top: auto;
  text-align: center;
}
.nav-mobile-login {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  border: none !important;
}
.nav-mobile-logout {
  background: var(--surface-active) !important;
  border: 1px solid var(--border) !important;
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  padding: 12px 24px; border-radius: 50px;
  box-shadow: var(--shadow-lg); z-index: 100;
  display: flex; align-items: center; gap: 12px;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; pointer-events: auto; }

/* Animations */
.fade-in { animation: fadeIn 0.6s ease-out forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Detail Page Specifics */
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }

.rich-text { color: var(--text-muted); line-height: 1.7; }
.rich-text h1, .rich-text h2, .rich-text h3, .rich-text h4, .rich-text h5, .rich-text h6 { color: var(--text); margin-top: 1.25em; margin-bottom: 0.5em; font-weight: 700; }
.rich-text h1 { font-size: 1.8rem; }
.rich-text h2 { font-size: 1.5rem; }
.rich-text h3 { font-size: 1.3rem; }
.rich-text h4 { font-size: 1.1rem; }
.rich-text h5 { font-size: 1rem; }
.rich-text h6 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; }
.rich-text p { margin-bottom: 1em; }
.rich-text a { color: var(--accent); text-decoration: underline; }

.pill-select { background: var(--surface-active); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 20px; }
.user-chip { display: flex; align-items: center; gap: 8px; background: var(--surface-active); padding: 4px 12px 4px 4px; border-radius: 20px; font-size: 0.9rem; border: 1px solid var(--border); }
.user-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; }

/* Data Table Premium Styles */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-active);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-hover); }

.data-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  background: var(--surface);
  transition: var(--trans);
}
.data-row:hover { background: var(--surface-hover); }
.data-row:last-child { border-bottom: none; }

.data-main { display: flex; flex-direction: column; gap: 6px; }
.data-title { font-weight: 600; font-size: 1rem; color: var(--text); }
.data-sub { font-size: 0.85rem; color: var(--text-muted); }
.data-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-active);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  align-items: end;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label,
.form-group span { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.form-group label { display: block; margin-bottom: 0; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Admin Toolbar */
.admin-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-row input, .filter-row select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}
.filter-row input:focus, .filter-row select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Stats Grid Admin */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.insight-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, transparent 50%, var(--surface-hover) 50%);
  opacity: 0.5;
}
.insight-card h4 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.insight-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

/* Mobile adjustments for tables */
@media (max-width: 768px) {
  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .data-row { grid-template-columns: 1fr; }
  .data-actions { justify-content: flex-start; }
}

/* Featured Grid Layout */
.grid-featured {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

@media (min-width: 900px) {
  .grid-featured > :first-child {
    grid-column: 1 / -1;
  }
  
  .grid-featured > :first-child .lottery-card-premium,
  .grid-featured > :first-child .coupon-ticket-premium {
    min-height: 280px;
  }

  .grid-featured > :first-child .lottery-card-inner {
    flex-direction: row;
    align-items: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--surface-active) 0%, var(--surface) 100%);
  }
  
  .grid-featured > :first-child .lottery-card-inner > div:nth-child(2) { /* Content container */
    flex: 1;
    padding-right: 32px;
  }
  
  .grid-featured > :first-child h3 {
    font-size: 2rem;
    margin-bottom: 16px;
  }
  
  .grid-featured > :first-child p {
    font-size: 1.1rem;
    -webkit-line-clamp: 3;
  }

  .grid-featured > :first-child .info-row {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
    border-left: 1px solid var(--border);
    padding-left: 32px;
    justify-content: center;
  }
  
  .grid-featured > :first-child .btn {
    height: auto;
    padding: 12px 32px;
    font-size: 1rem;
  }

  /* Coupon specific featured adjustments */
  .grid-featured > :first-child .coupon-left {
    flex-direction: row;
    align-items: center;
    padding: 40px;
  }
  .grid-featured > :first-child .coupon-left > div:first-child {
    flex: 1;
    padding-right: 32px;
  }
  .grid-featured > :first-child .coupon-left > div:last-child {
    margin-top: 0;
    padding-top: 0;
    border-left: 1px dashed var(--border);
    padding-left: 32px;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
  }
}

/* Search Bar Premium */
.search-hero {
  position: relative;
  max-width: 500px;
  margin: -24px auto 40px;
  z-index: 10;
}
.search-hero input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 56px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 1rem;
  color: var(--text);
  transition: var(--trans);
}
.search-hero input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}
.search-hero input:focus {
  outline: none;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2), 0 0 0 3px var(--primary-glow);
}
.search-hero button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
}
.search-hero button:hover {
  background: var(--secondary);
  transform: translateY(-50%) scale(1.05);
}

/* Ticket Stamps */
.stamp-holder {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  pointer-events: none;
}

.ticket-stamp {
  padding: 4px 8px;
  border: 2px solid currentColor;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  transform: rotate(-15deg);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.ticket-stamp.won {
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
  animation: stampIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ticket-stamp.lost {
  color: var(--text-muted);
  border-color: var(--text-muted);
  opacity: 0.7;
}

@keyframes stampIn {
  from { opacity: 0; transform: rotate(-15deg) scale(2); }
  to { opacity: 1; transform: rotate(-15deg) scale(1); }
}

/* Win Card Premium */
.win-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  transition: var(--trans);
  position: relative;
  overflow: hidden;
}
.win-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.win-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--border);
  transition: var(--trans);
}
.win-card.status-pending::before { background: var(--warning); }
.win-card.status-shipped::before { background: var(--primary); }
.win-card.status-delivered::before { background: var(--success); }
.win-card.status-expired::before { background: var(--danger); }

.win-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* Prevent flex child overflow */
}
.win-lottery {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-lottery-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.win-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}
.win-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.win-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface-active);
  color: var(--text-muted);
  border: 1px solid transparent;
}
.status-pill.pending { color: var(--warning); background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); }
.status-pill.shipped { color: var(--primary); background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.2); }
.status-pill.delivered { color: var(--success); background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }
.status-pill.expired { color: var(--danger); background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); }

@media (max-width: 640px) {
  .win-card { 
    grid-template-columns: 1fr; 
    gap: 16px; 
    padding: 20px; 
  }
  .win-card { 
    display: grid; 
    grid-template-columns: 1fr; 
  }
  .win-header-mobile { 
    display: contents; 
  }
  @media (max-width: 640px) { 
    .win-header-mobile { 
      display: flex; 
      justify-content: space-between; 
      align-items: flex-start; 
      gap: 16px; 
      width: 100%; 
    } 
  }
  .win-actions { 
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    padding-top: 16px; 
    border-top: 1px solid var(--border); 
    margin-top: 8px; 
  }
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--surface);
  border-radius: 50px;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
}

.filter-tab {
  padding: 10px 24px;
  border-radius: 50px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--trans);
  text-decoration: none;
}

.filter-tab:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

@media (max-width: 640px) {
  .filter-tabs {
    border-radius: 16px;
    padding: 6px;
    gap: 6px;
  }
  .filter-tab {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

/* Page Header Enhanced */
.page-header-modern {
  position: relative;
  padding: 80px 24px 60px;
  text-align: center;
  overflow: hidden;
  margin-bottom: 40px;
  background: radial-gradient(circle at center, rgba(99,102,241,0.08) 0%, transparent 70%);
}

.page-header-modern h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}

.page-header-modern p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 16px auto 0;
  position: relative;
  z-index: 2;
}

.page-header-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(99,102,241,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(168,85,247,0.15) 0%, transparent 40%);
}

/* Win Detail Page */
.win-detail-container {
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.win-certificate {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  display: grid;
  grid-template-columns: 1fr 320px;
}

.win-cert-body {
  padding: 48px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.win-cert-sidebar {
  background: var(--surface-active);
  border-left: 1px dashed var(--border);
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
  position: relative;
}

.win-cert-sidebar::before,
.win-cert-sidebar::after {
  content: '';
  position: absolute;
  left: -12px;
  width: 24px;
  height: 24px;
  background: var(--bg);
  border-radius: 50%;
  border: 1px solid var(--border);
  z-index: 3;
}
.win-cert-sidebar::before { top: -12px; }
.win-cert-sidebar::after { bottom: -12px; }

.win-super-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.win-prize-name {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.win-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.meta-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.meta-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
}

.qr-frame {
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-frame img, .qr-frame canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.logistics-card {
  background: var(--surface-hover);
  border-radius: 16px;
  padding: 24px;
  margin-top: 32px;
  border: 1px solid var(--border);
  animation: fadeIn 0.6s ease-out forwards;
}

@media (max-width: 850px) {
  .win-certificate { grid-template-columns: 1fr; }
  .win-cert-sidebar { 
    border-left: none; 
    border-top: 1px dashed var(--border); 
    padding: 32px;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .win-cert-sidebar::before, .win-cert-sidebar::after { display: none; }
  .qr-frame { width: 100px; height: 100px; padding: 8px; }
  .win-cert-sidebar .btn { flex: 1; }
  .win-cert-sidebar > div { display: flex; gap: 16px; align-items: center; width: 100%; }
}

@media (max-width: 600px) {
  .win-cert-sidebar > div { flex-direction: column; align-items: stretch; }
  .qr-frame { margin: 0 auto; width: 140px; height: 140px; }
  .win-cert-body { padding: 24px; }
}

/* Select Custom Style */
select.form-control {
  width: 100%;
  padding: 12px 16px;
  padding-right: 44px;
  background: var(--surface-active);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
  transition: var(--trans);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(148,163,184,1)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  cursor: pointer;
}
select.form-control:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: var(--surface-hover);
}
select.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
select.form-control option {
  background: var(--surface);
  color: var(--text);
  padding: 12px;
}
.light select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(100,116,139,1)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Textarea Custom Style */
textarea.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-active);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  transition: var(--trans);
  resize: vertical;
  min-height: 100px;
}
textarea.form-control:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
textarea.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Rich Text Editor Styles */
.richtext-shell {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-active);
  transition: var(--trans);
}
.richtext-shell:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.richtext-shell.focused {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.richtext-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.richtext-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--trans);
}
.richtext-toolbar button:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.richtext-toolbar button.active {
  background: var(--primary);
  color: #fff;
}
.richtext-toolbar .sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
}

.richtext-editor {
  min-height: 150px;
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  outline: none;
}
.richtext-editor:empty::before {
  content: attr(aria-label);
  color: var(--text-muted);
  opacity: 0.5;
  pointer-events: none;
}
.richtext-editor h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--text);
}
.richtext-editor h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--text);
}
.richtext-editor p {
  margin: 8px 0;
}
.richtext-editor ul, .richtext-editor ol {
  margin: 8px 0;
  padding-left: 24px;
}
.richtext-editor a {
  color: var(--primary);
  text-decoration: underline;
}

.richtext-source-editor {
  width: 100%;
  min-height: 150px;
  max-height: 400px;
  padding: 16px;
  background: var(--surface);
  border: none;
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  overflow-y: auto;
}

.richtext-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Link Dialog Modal */
.richtext-link-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.richtext-link-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.richtext-link-dialog {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
}

.richtext-link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.richtext-link-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.richtext-link-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--trans);
}

.richtext-link-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.richtext-link-body {
  padding: 24px;
}

.richtext-link-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.richtext-link-footer .btn {
  min-width: 100px;
}

/* Image Features */
.richtext-editor img {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
  margin: 8px 0;
}

.richtext-image-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--surface);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--trans);
  z-index: 10;
  padding: 0;
}

.richtext-editor img:hover .richtext-image-delete {
  opacity: 1;
}

.richtext-image-resize {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 2px solid var(--surface);
  border-radius: 50% 0 0 0;
  cursor: nwse-resize;
  opacity: 0;
  transition: var(--trans);
  z-index: 10;
}

.richtext-editor img:hover .richtext-image-resize {
  opacity: 1;
}

.richtext-image-context-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 8px;
  z-index: 10001;
  min-width: 200px;
}

.richtext-image-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--trans);
}

.richtext-image-menu-item:hover {
  background: var(--surface-hover);
  color: var(--primary);
}

.richtext-image-menu-item svg {
  flex-shrink: 0;
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.modal.open {
  opacity: 1;
  visibility: visible;
}
.modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.modal-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.modal-body {
  margin-bottom: 20px;
}
.modal-card .d-flex {
  display: flex;
}
.modal-card .gap-2 {
  gap: 8px;
}
.modal-card .full {
  width: 100%;
}
.modal-card .flex-1 {
  flex: 1;
}

/* Panel Styles */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.section-toolbar .title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.section-toolbar .muted {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Search Embedded */
.search-embedded {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-embedded .form-control {
  flex: 1;
}
.search-embedded button svg,
.search-embedded .btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Desktop Only */
.desktop-only {
  display: none;
}
@media (min-width: 768px) {
  .desktop-only {
    display: inline;
  }
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, var(--surface-active) 25%, var(--surface-hover) 50%, var(--surface-active) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}
.skeleton-card {
  height: 120px;
  margin-bottom: 16px;
}
@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* List Title Styles */
.list-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.list-subtitle {
  color: var(--text-muted);
  margin: 8px 0 0;
  font-size: 1rem;
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-active);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Input Placeholder */
input.form-control::placeholder,
textarea.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* QR Wrap & Area */
.qr-wrap {
  cursor: pointer;
  transition: var(--trans);
}
.qr-wrap:hover {
  opacity: 0.8;
}
.qr-area {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: var(--surface-hover);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--trans);
}
.qr-area:hover {
  background: var(--surface-active);
}
.qr-area:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Status Tag */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-tag.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

/* Copy Button */
.copy-btn {
  cursor: pointer;
  opacity: 0.7;
  transition: var(--trans);
}
.copy-btn:hover {
  opacity: 1;
}

/* Inline Flash */
.inline-flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.inline-flash.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.inline-flash.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Pill Warning */
.pill-warning {
  background: rgba(245, 158, 11, 0.1) !important;
  color: var(--warning) !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}

/* Data Actions */
.data-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Ship Page Styles */
.ship-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 1rem;
}

.ship-board {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ship-group {
  background: var(--surface-active);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ship-group summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: var(--trans);
}
.ship-group summary:hover {
  background: var(--surface-hover);
}
.ship-group summary .badge {
  margin-left: auto;
}
.ship-group[open] summary {
  border-bottom-color: var(--border);
}

.ship-card {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ship-card:last-child {
  border-bottom: none;
}

.ship-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.ship-header strong {
  font-size: 1.1rem;
  color: var(--text);
}

.ship-address {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.address-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.address-line span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.address-line strong {
  color: var(--text);
  font-weight: 500;
}

.ship-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ship-actions select,
.ship-actions input:not([type="hidden"]) {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  transition: var(--trans);
}
.ship-actions select {
  padding-right: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(148,163,184,1)' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
.ship-actions select:focus,
.ship-actions input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.ship-actions input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

@media (max-width: 768px) {
  .ship-address {
    grid-template-columns: 1fr;
  }
  .ship-actions form {
    flex-direction: column;
  }
  .ship-actions select,
  .ship-actions input:not([type="hidden"]),
  .ship-actions .btn {
    width: 100%;
  }
}

/* Table Scroll */
.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
}
.table-scroll table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-scroll th,
.table-scroll td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table-scroll th {
  background: var(--surface-active);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.table-scroll td input {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  width: 120px;
}
.table-scroll td input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Old Form Row Style Compatibility */
.card .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.card .row input,
.card .row select,
.card .row textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-active);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  transition: var(--trans);
}
.card .row select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(148,163,184,1)' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
.card .row input:focus,
.card .row select:focus,
.card .row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.card .row label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}
.card textarea {
  resize: vertical;
  min-height: 80px;
}

/* Elig Row Visibility */
.elig-row {
  display: none;
}
.elig-row.after,
.elig-row.before,
.elig-row.list {
  display: none;
}

/* Basic Table Styles */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table th,
table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table th {
  background: var(--surface-active);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table tbody tr:last-child td {
  border-bottom: none;
}
table tbody tr:hover td {
  background: var(--surface-hover);
}
table td .btn {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Card Title */
.card .title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

/* Card List */
.card .list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* Card Muted */
.card .muted,
.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Modern Lottery & Coupon Cards (Similar to Winners) */
.lotteries-grid,
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
}

@media (max-width: 500px) {
  .lotteries-grid,
  .coupons-grid {
    grid-template-columns: 1fr;
  }
}

.lottery-card-modern,
.coupon-card-modern {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--trans);
  display: flex;
  flex-direction: column;
}

.lottery-card-modern:hover,
.coupon-card-modern:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.lottery-card-header,
.coupon-card-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface-active);
  border-bottom: 1px solid var(--border);
}

.lottery-card-info,
.coupon-card-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.lottery-card-icon,
.coupon-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.lottery-card-icon svg,
.coupon-card-icon svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.coupon-card-icon {
  color: var(--secondary);
}

.lottery-card-info > div:last-child,
.coupon-card-info > div:last-child {
  flex: 1;
  min-width: 0;
}

.lottery-card-info h3,
.coupon-card-info h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.lottery-card-meta,
.coupon-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.lottery-card-body,
.coupon-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lottery-card-dates,
.coupon-card-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.date-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.date-item strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.lottery-card-actions,
.coupon-card-actions {
  padding: 0 24px 24px;
}

/* ============================================
   抽奖结果页面样式
   ============================================ */
.lottery-result-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding-bottom: 60px;
}

.result-content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.result-bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 20% 30%, rgba(99,102,241,0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(168,85,247,0.05) 0%, transparent 50%);
}

.confetti-container {
  position: absolute;
  inset: 0;
}

.confetti {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary);
  animation: confetti-fall linear forwards;
  transform: rotate(45deg);
  box-shadow: 0 0 4px currentColor;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) translateX(calc(var(--random-x, 0) * 100px)) rotate(1080deg) scale(0.5);
    opacity: 0;
  }
}

.sparkle-container {
  position: absolute;
  inset: 0;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor, 0 0 12px currentColor;
  animation: sparkle-pulse 2s ease-in-out infinite;
}

@keyframes sparkle-pulse {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.5) rotate(180deg);
  }
}

.ripple-container {
  position: absolute;
  inset: 0;
}

.ripple {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 3px solid var(--primary);
  border-radius: 50%;
  opacity: 0.6;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-expand 2s ease-out forwards;
}

@keyframes ripple-expand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}


/* 加载动画 */
.result-loading {
  text-align: center;
  padding: 120px 24px;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
  border-top-color: var(--secondary);
  animation-duration: 1.5s;
  animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
  border-top-color: var(--accent);
  animation-duration: 2s;
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
}

.spinner-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--primary-glow);
  animation: center-pulse 1.5s ease-in-out infinite;
}

@keyframes center-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.7;
  }
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: dot-bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

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

.loading-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0;
}

/* 结果展示 */
.result-display {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

/* 中奖结果 */
.result-winner {
  text-align: center;
}

.result-header {
  margin-bottom: 48px;
  padding: 60px 24px 40px;
}

.celebration-icon-wrapper {
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.celebration-icon {
  position: relative;
  color: var(--warning);
  display: inline-block;
  animation: icon-rotate 1s ease-out 0.5s both;
  width: 100px;
  height: 100px;
}

.celebration-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--warning) 0%, transparent 70%);
  opacity: 0.4;
  border-radius: 50%;
  animation: glow-pulse 2s ease-in-out infinite;
  filter: blur(15px);
}

@keyframes winner-appear {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.celebration-title {
  margin-bottom: 32px;
  animation: celebration-bounce 0.8s ease-out 0.3s both;
}

@keyframes celebration-bounce {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes icon-rotate {
  0% {
    transform: rotate(0deg) scale(0);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

.celebration-text {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0 0 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-glow 3s ease-in-out infinite;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}

@keyframes text-glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8));
  }
}

.celebration-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.prize-card-enhanced {
  position: relative;
  margin: 48px 0;
  overflow: visible;
  animation: prize-card-appear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
  border: 2px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.prize-card-inner {
  position: relative;
  z-index: 2;
  padding: 56px 40px;
  background: var(--surface);
  border-radius: var(--radius);
}

@keyframes prize-card-appear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.prize-glow {
  position: absolute;
  inset: -100px;
  background: radial-gradient(circle, var(--primary-glow) 0%, rgba(168,85,247,0.3) 30%, transparent 70%);
  animation: glow-pulse 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  filter: blur(40px);
}

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



.prize-name {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prize-description {
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.prize-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  margin-top: 8px;
  animation: badge-bounce 2s ease-in-out infinite;
}

.prize-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@keyframes badge-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.lottery-info-card {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.btn.large {
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn.large svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn.large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn.pulse-on-hover:hover {
  animation: button-pulse 0.6s ease-in-out;
}

@keyframes button-pulse {
  0%, 100% {
    transform: translateY(-2px) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.05);
  }
}

/* 未中奖结果 */
.result-no-win {
  text-align: center;
}

.no-win-icon-wrapper {
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.no-win-icon {
  color: var(--text-muted);
  opacity: 0.4;
  animation: icon-fade-in 1s ease-out;
  width: 120px;
  height: 120px;
  max-width: 100%;
}

.no-win-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes no-win-appear {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}


@keyframes icon-fade-in {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

.no-win-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.no-win-message {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 32px;
  line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .result-content-wrapper {
    padding: 16px;
  }
  
  .result-loading {
    padding: 80px 16px;
  }
  
  .result-header {
    padding: 40px 16px 32px;
  }
  
  .prize-card-inner {
    padding: 40px 24px;
  }
  
  .celebration-icon {
    width: 80px;
    height: 80px;
  }
  
  .no-win-icon {
    width: 100px;
    height: 100px;
    max-width: calc(100vw - 80px);
  }
  
  .prize-badge svg {
    width: 14px;
    height: 14px;
  }
  
  .btn.large svg {
    width: 18px;
    height: 18px;
  }
  
  .result-actions {
    gap: 10px;
  }
  
  .btn.large {
    padding: 14px 24px;
    font-size: 1rem;
  }
}
