:root {
  /* 核心色调 - 深邃科技风 */
  --bg-body: #050508;
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e1b4b;
  
  /* 玻璃拟态背景 */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  
  /* 主色调 */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent: #06b6d4;
  
  /* 文本颜色 */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #1e293b; /* 用于浅色背景上的文字 */
  
  /* 功能色 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 25%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
}

.hidden {
  display: none !important;
}

/* ====================
   Landing Page / Login
   ==================== */
.login-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 导航栏 */
.landing-header {
  position: sticky;
  top: 20px;
  z-index: 50;
  margin-bottom: 60px;
}

.nav-container {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.nav-cta {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 20px 80px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0;
  background: linear-gradient(to right, #fff, #94a3b8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  font-size: 0.9rem;
  color: #a5b4fc;
  margin-bottom: 8px;
  animation: float 3s ease-in-out infinite;
}

.badge-icon {
  font-size: 1.1rem;
}

.badge-text {
  font-weight: 600;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.8;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

/* Models Grid */
.models-section {
  margin-bottom: 80px;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  padding: 0 20px;
}

.model-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.model-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.model-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.model-card:hover::before {
  opacity: 1;
}

.model-label {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
}

.model-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.meta-chip {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
}

.model-params {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-params li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-params li::before {
  content: '•';
  color: var(--primary);
}

.model-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
}

/* Auth Section (New Independent View) */
.auth-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-body);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 25%);
  z-index: 9999; /* Increased z-index significantly */
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.auth-header {
  padding: 20px 40px;
  position: relative;
  z-index: 10000;
}


.back-home-btn {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}

.back-home-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.auth-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  position: relative;
  z-index: 10000;
}

.auth-columns {
  width: 100%;
  max-width: 380px; /* 单栏显示 */
}

.login-pane, .register-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--text-dark);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  position: relative;
  z-index: 10001;
}

.auth-card-title {
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
  color: #1e293b;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #475569;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all 0.2s;
  background: #f8fafc;
  color: #1e293b;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.login-pane .btn-secondary,
.register-card .btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.login-pane .btn-secondary:hover,
.register-card .btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Login Tabs */
.login-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  position: relative;
  z-index: 10002;
}

.login-tabs button {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 10003;
  pointer-events: auto;
}

.login-tabs button.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ====================
   App Interface
   ==================== */
#app-container header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#app-container header h1 {
  font-size: 1.5rem;
  background: var(--primary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 500;
}

/* Main Card Layout */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  color: var(--text-dark);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

/* Three Column Layout */
.three-col-layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 32px;
  align-items: stretch;
}

.col-image,
.col-prompt,
.col-params {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
  min-height: 0;
}

@media (max-width: 1200px) {
  .three-col-layout {
    grid-template-columns: 1fr;
  }
}

/* Image Upload */
.image-input {
  width: 100%;
  padding: 40px 20px;
  border: 2px dashed #cbd5e0;
  border-radius: var(--radius-md);
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 320px;
  height: 320px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-weight: 600;
  text-transform: none;
  gap: 16px;
}

.image-input:hover {
  border-color: var(--primary);
  background: #f1f5f9;
}

.image-input::file-selector-button,
.image-input::-webkit-file-upload-button {
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px -8px rgba(99, 102, 241, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-right: 16px;
}

.image-input::file-selector-button:hover,
.image-input::-webkit-file-upload-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -8px rgba(99, 102, 241, 0.7);
}

.image-filename {
  margin: 8px 0;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #475569;
  word-break: break-all;
  border: 1px solid #e2e8f0;
}

#thumb {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex: 0 0 auto;
  object-fit: contain;
  height: 320px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* Prompt Area */
.prompt-textarea {
  min-height: 300px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
  flex: 1;
  min-height: 0;
}

/* Generate Button */
.generate-btn-container {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.generate-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 30px -10px rgba(99, 102, 241, 0.5);
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #f8fafc;
  padding: 16px;
  font-weight: 600;
  color: #64748b;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.batch-row:hover td {
  background: #f8fafc;
}

.batch-row.expanded td {
  background: #f1f5f9;
  border-bottom-color: #e2e8f0;
}

/* Status Badges */
.status-pending, .status-queued { color: var(--warning); background: rgba(245, 158, 11, 0.1); padding: 4px 8px; border-radius: 4px; font-size: 0.85rem; }
.status-running { color: var(--info); background: rgba(59, 130, 246, 0.1); padding: 4px 8px; border-radius: 4px; font-size: 0.85rem; }
.status-completed { color: var(--success); background: rgba(16, 185, 129, 0.1); padding: 4px 8px; border-radius: 4px; font-size: 0.85rem; }
.status-failed { color: var(--danger); background: rgba(239, 68, 68, 0.1); padding: 4px 8px; border-radius: 4px; font-size: 0.85rem; }

/* Task Details */
.tasks-detail-row td {
  padding: 0;
  border: none;
}

.tasks-inner-container {
  background: #f8fafc;
  padding: 24px;
  border-left: 4px solid var(--primary);
  box-shadow: inset 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.tasks-table {
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Toast */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 3000; /* Ensure toast is always on top */
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none; /* Allow clicks to pass through container */
}

.toast {
  background: white;
  color: var(--text-dark); /* 修复白色背景下文字看不清的问题 */
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  border-left: 4px solid transparent;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto; /* Restore clicks for toasts themselves */
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Contact Popover */
.contact-wrapper { position: relative; }
.contact-popover {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 200px;
  display: none;
  text-align: center;
  color: var(--text-dark);
  border: 1px solid #e2e8f0;
}
.contact-popover img { width: 100%; border-radius: var(--radius-sm); margin-bottom: 8px; }
.contact-wrapper.show .contact-popover { display: block; animation: fadeIn 0.2s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .nav-container { flex-direction: column; gap: 16px; padding: 16px; border-radius: var(--radius-lg); }
  .nav-cta { width: 100%; justify-content: center; flex-wrap: wrap; }
  .three-col-layout { grid-template-columns: 1fr; }
}

/* ====================
   Missing Components
   ==================== */

/* Prompt Cell & Tooltip */
.prompt-cell {
  position: relative;
  max-width: 300px;
}

.prompt-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #475569;
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: help;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.prompt-preview:hover {
  background: #e2e8f0;
  border-color: #cbd5e0;
}

.prompt-tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 1000;
  background: #1e293b;
  color: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  width: max-content;
  max-width: 400px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.5;
}

.prompt-cell.is-hovered .prompt-tooltip {
  display: block;
  animation: fadeIn 0.2s;
}

.prompt-tooltip.show-above {
  top: auto;
  bottom: calc(100% + 8px);
}

/* Table Images */
.thumb-small {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

/* Expand Icon */
.expand-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  margin-right: 6px;
  font-size: 0.8rem;
}

.expand-icon.expanded {
  transform: rotate(90deg);
}

/* Action Buttons Group */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-buttons .btn {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Links */
.btn-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.result-link {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.result-link:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

/* SMS Inline Form */
.sms-inline {
  display: flex;
  gap: 12px;
}

.sms-inline input {
  flex: 1;
}

.sms-inline button {
  white-space: nowrap;
}

.sms-countdown {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: right;
}

.error-msg {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 12px;
  text-align: center;
  background: #fef2f2;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid #fee2e2;
}

.error-msg:empty {
  display: none;
  padding: 0;
  border: none;
  margin: 0;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.subtitle {
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--text-muted);
  margin-left: 8px;
}

/* Register Button Enhancements */
.btn-xl {
  padding: 16px 48px;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 100px;
  box-shadow: 0 10px 30px -5px rgba(99, 102, 241, 0.5);
}


/* ====================
   Credits View (Additions)
   ==================== */
.recharge-panel {
    max-width: 800px;
    margin: 0 auto;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.recharge-option {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    background: #f8fafc;
}

.recharge-option:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.recharge-option.selected {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.recharge-option .credits {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.recharge-option .price {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 800;
}

.recharge-option .badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.recharge-option.custom input {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    border: 1px solid #cbd5e0;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
}

.payment-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
}

.payment-section .label {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.payment-methods {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    background: white;
    font-weight: 500;
}

.payment-method:hover {
    border-color: #cbd5e0;
    background: #f8fafc;
}

.payment-method.selected {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.payment-method input {
    display: none;
}

.payment-method .icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
}

.payment-method .icon.alipay {
    background-color: #1677ff;
}

.payment-method .icon.wechat {
    background-color: #07c160;
}

.btn-large {
    width: 100%;
    max-width: 400px;
    font-size: 1.2rem;
    padding: 16px 32px;
    border-radius: 100px;
}

.tip {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Credits Table */
#credits-table {
    width: 100%;
}
#credits-table th {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.9rem;
}
#credits-table td {
    color: #334155;
}
.delta-plus {
    color: var(--success);
    font-weight: 600;
}
.delta-minus {
    color: var(--text-dark);
    font-weight: 500;
}

/* Credits Overlay */
.credits-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.credits-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
}

.close-credits-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #94a3b8;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.close-credits-btn:hover {
    color: var(--text-dark);
}

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

.credits-overlay.hidden {
    display: none !important;
}
