* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f1219;
  --bg-elev: #141925;
  --card: #1a1f2e;
  --card-hover: #222838;
  --border: #2a3041;
  --text: #e4e7ee;
  --text-muted: #8b92a5;
  --text-dim: #5a6278;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-dark: #4f46e5;
  --accent: #10b981;
  --accent-hover: #34d399;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.4);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'Noto Sans Thai', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

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

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 18, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  width: 100%;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-support-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  color: var(--primary-hover);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-support-entry:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.nav-support-entry:active {
  transform: scale(0.96);
}

.nav-support-icon {
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-right: auto;
}

.nav-link {
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
}

.nav-filters {
  display: flex;
  gap: 12px;
  flex: 1;
  align-items: center;
}

.nav-search {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.nav-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.nav-search::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  font-size: 0.85rem;
}

.nav-select {
  padding: 10px 32px 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b92a5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.nav-select:focus {
  border-color: var(--primary);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lang-switch:hover {
  background: var(--card-hover);
  border-color: var(--primary);
}

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

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.nav-user:hover {
  background: var(--card-hover);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.nav-username {
  font-size: 0.85rem;
  color: var(--text);
}

.nav-user-wrapper {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--card);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.nav-user-btn:hover {
  background: var(--card-hover);
}

.nav-caret {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 6px;
  display: none;
  z-index: 1000;
}

.nav-dropdown.open {
  display: block;
  animation: nav-dd-in 0.15s ease-out;
}

@keyframes nav-dd-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}

.nav-dropdown-item:hover {
  background: var(--card-hover);
  color: var(--primary);
}

.nav-dd-ico {
  font-size: 1rem;
}

.nav-dropdown-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 6px;
}

.nav-dropdown-logout {
  color: var(--danger, #ef4444);
}

.nav-dropdown-logout:hover {
  background: rgba(239,68,68,0.1);
  color: var(--danger, #ef4444);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

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

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-accent:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
}

.btn-ghost:hover {
  background: var(--card);
  color: var(--text);
}

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

.btn-danger:hover {
  opacity: 0.9;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* ========== HERO ========== */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.
/* 匹配 HTML 中使用的 .taishf-hero-title 类 */
.taishf-hero-title,
.taishf-hero-title, hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  position: relative;
}
hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  position: relative;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
  position: relative;
}

.hero .btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  position: relative;
}

/* ========== CATEGORIES ========== */
.categories {
  padding: 40px 0 20px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 22px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.cat-item:hover {
  background: var(--card-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.cat-item.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
}

.cat-icon {
  font-size: 1.8rem;
}

.cat-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* ========== APP GRID ========== */
.apps-section {
  padding: 40px 0 60px;
}

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

.apps-header .section-title {
  margin-bottom: 0;
}

.apps-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.app-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.app-card:hover {
  background: var(--card-hover);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-primary);
}

.app-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-author {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.app-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.app-downloads {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-free {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
}

.badge-premium {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-hover);
}

.badge-category {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px;
  font-size: 0.68rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.pagination button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-hover);
}

.pagination button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== APP DETAIL ========== */
.app-detail-header {
  padding: 40px 0 30px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}

.app-detail-header .container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.detail-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.detail-info {
  flex: 1;
  min-width: 260px;
}

.detail-info h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.detail-author {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.detail-stats {
  display: flex;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.detail-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.55);
}

.download-btn:active {
  transform: translateY(0);
}

.download-btn.premium {
  background: var(--gradient-primary);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.download-btn.premium:hover {
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.55);
}

/* ========== SCREENSHOTS ========== */
.screenshots {
  padding: 30px 0;
}

.screenshot-carousel {
  position: relative;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-behavior: smooth;
}

.screenshot-carousel::-webkit-scrollbar {
  height: 6px;
}

.screenshot-carousel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.screenshot-thumb {
  flex: 0 0 auto;
  width: 280px;
  height: 175px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.screenshot-thumb:hover {
  border-color: var(--primary);
  transform: scale(1.03);
}

/* ========== TABS ========== */
.tabs {
  border-top: 1px solid var(--border);
  padding: 20px 0 60px;
}

.tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary-hover);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text);
}

.tab-content p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ========== VERSION LIST ========== */
.version-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.version-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.version-number {
  font-weight: 700;
  color: var(--primary-hover);
  font-size: 0.95rem;
  min-width: 70px;
}

.version-body {
  flex: 1;
}

.version-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.version-changelog {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.version-item .btn {
  flex-shrink: 0;
}

/* ========== AUTH ========== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.12) 0%, transparent 60%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control.error {
  border-color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-size: 0.78rem;
  margin-top: 6px;
  min-height: 18px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-footer a {
  font-weight: 600;
}

/* ========== MEMBER ========== */
.member-page {
  padding: 40px 0;
}

.member-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.member-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.member-header h2 {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.member-header .plan-name {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.member-header .plan-desc {
  color: var(--text-muted);
  margin-top: 8px;
}

.plan-comparison {
  margin-bottom: 40px;
}

.plan-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.plan-table th,
.plan-table td {
  padding: 16px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.plan-table thead th {
  background: var(--bg-elev);
  font-weight: 700;
  color: var(--text);
}

.plan-table thead th.highlight {
  background: var(--gradient-primary);
  color: #fff;
}

.plan-table tbody td:first-child {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
}

.plan-table tbody tr:last-child td {
  border-bottom: none;
}

.plan-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.plan-price small {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 400;
}

.download-history {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.history-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.history-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.history-info {
  flex: 1;
}

.history-info .name {
  font-weight: 600;
  font-size: 0.92rem;
}

.history-info .meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ========== ADMIN ========== */
.admin-page {
  padding: 30px 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 10px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-table-wrapper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: var(--bg-elev);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table .app-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-table .mini-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
}

.admin-table .actions {
  display: flex;
  gap: 6px;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-elev);
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

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

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  min-width: 260px;
}

.toast.success {
  border-left: 3px solid var(--accent);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.info {
  border-left: 3px solid var(--info);
}

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

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

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 40px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 28px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary-hover);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* ========== LEGAL PAGES ========== */
.legal-page {
  padding: 50px 0;
  max-width: 800px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.legal-page .update-date {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-page h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-page p,
.legal-page li {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 10px;
}

.legal-page ul,
.legal-page ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal-page strong {
  color: var(--text);
}

/* ========== EMPTY STATES ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 14px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ========== LOADING ========== */
.loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
  }

  .nav-filters {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
  }

  .nav-search {
    max-width: none;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
  }

  .app-card {
    padding: 14px;
  }

  .app-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
  }

  .cat-item {
    padding: 14px 8px;
  }

  .app-detail-header .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .detail-meta,
  .detail-stats {
    justify-content: center;
  }

  .version-item {
    flex-direction: column;
    gap: 10px;
  }

  .version-item .btn {
    align-self: flex-start;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .plan-table {
    font-size: 0.78rem;
  }

  .plan-table th,
  .plan-table td {
    padding: 10px 8px;
  }

  .plan-price {
    font-size: 1.2rem;
  }

  .admin-table-wrapper {
    overflow-x: auto;
  }

  .legal-page {
    padding: 30px 20px;
  }

  .legal-page h1 {
    font-size: 1.5rem;
  }

  .screenshot-thumb {
    width: 220px;
    height: 138px;
  }
}

@media (max-width: 480px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-hover); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }
/* ========== 客服悬浮按钮 ========== */
.support-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  z-index: 9990;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: support-pulse 2.5s infinite;
}
.support-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55);
}
.support-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  background: #fff;
  color: #6366f1;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
@keyframes support-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4), 0 0 0 0 rgba(99, 102, 241, 0.35); }
  50% { box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4), 0 0 0 12px rgba(99, 102, 241, 0); }
}
.support-modal {
  z-index: 9999;
}
.support-modal-box {
  max-width: 420px;
  width: calc(100% - 48px);
}
.support-body {
  padding: 20px;
}
.support-loading, .support-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 0;
}
.support-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.support-channel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-elev, #f8f9ff);
  transition: background 0.15s;
}
.support-channel:hover {
  background: var(--bg-hover, #eef0ff);
}
.support-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.support-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.support-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1f2937);
  word-break: break-all;
}
.support-val a {
  color: #6366f1;
  text-decoration: none;
}
.support-val a:hover {
  text-decoration: underline;
}
.support-hours {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e5e7eb);
  font-size: 13px;
  color: var(--text-muted);
}
.support-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
/* ========== ADMIN FORM ========== */
.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.admin-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.admin-form-grid input[type="text"],
.admin-form-grid textarea {
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.admin-form-grid input[type="text"]:focus,
.admin-form-grid textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ========== QR UPLOADER ========== */
.qr-uploader {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-elev);
  transition: border-color 0.2s, background 0.2s;
}
.qr-uploader.drag {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}
.qr-empty {
  position: relative;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  padding: 28px 16px;
}
.qr-empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.6;
}
.qr-empty-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}
.qr-empty input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.qr-preview {
  text-align: center;
}
.qr-preview img {
  max-width: 280px;
  max-height: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}
.qr-preview-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ========== SUPPORT MODAL QR ========== */
.support-qr {
  text-align: center;
  padding: 12px 12px 8px;
}
.support-qr img {
  max-width: 220px;
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 4px;
}
.support-qr-link {
  margin-top: 12px;
  font-size: 14px;
  color: var(--primary-hover);
  word-break: break-all;
}

/* ========== PROFILE CARD ========== */
.profile-card {
  display: flex;
  gap: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  overflow: hidden;
  border: 3px solid var(--bg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 3px solid var(--card);
  transition: transform 0.15s ease, background 0.15s ease;
}

.avatar-edit:hover {
  background: var(--primary-hover);
  transform: scale(1.08);
}

.profile-info {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.profile-field input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.profile-field input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78,131,255,0.15);
}

.profile-field input[type="text"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.field-row input {
  flex: 1;
}

.field-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.save-msg {
  font-size: 0.85rem;
  display: none;
}

.history-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.history-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.history-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.history-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .profile-card {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
  .profile-info {
    width: 100%;
  }
  .field-row {
    flex-direction: column;
  }
}

/* ======== 隐私条款同意弹窗 ======== */
#consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: consent-fade-in 0.3s ease;
}

@keyframes consent-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

#consent-overlay.consent-fade-out {
  animation: consent-fade-out 0.3s ease forwards;
}

@keyframes consent-fade-out {
  to { opacity: 0; }
}

.consent-modal {
  background: #1b2838;
  border-radius: 12px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  border: 1px solid #2a3f5a;
  animation: consent-slide-up 0.3s ease;
  overflow: hidden;
}

@keyframes consent-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.consent-header {
  padding: 24px 28px 16px;
  text-align: center;
  border-bottom: 1px solid #2a3f5a;
}

.consent-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.consent-header h3 {
  color: #c7d5e0;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.consent-body {
  padding: 24px 28px;
  color: #8f98a0;
  font-size: 14px;
  line-height: 1.7;
}

.consent-body p {
  margin: 0 0 12px;
}

.consent-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  background: #16202d;
  border-radius: 8px;
  padding: 16px 20px;
}

.consent-list li {
  padding: 6px 0;
  font-size: 14px;
}

.consent-list a {
  color: #66c0f4;
  text-decoration: none;
}

.consent-list a:hover {
  text-decoration: underline;
}

.consent-list strong {
  color: #ff9900;
}

.consent-notice {
  font-size: 12px;
  color: #667080;
  margin-top: 16px !important;
}

.consent-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #2a3f5a;
}

.consent-btn-primary {
  background: linear-gradient(to right, #66c0f4, #417a9b);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.consent-btn-primary:hover {
  opacity: 0.9;
}

.consent-btn-secondary {
  background: transparent;
  color: #8f98a0;
  border: 1px solid #3c4450;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.consent-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #c7d5e0;
}

@media (max-width: 480px) {
  .consent-modal { width: 95%; }
  .consent-header, .consent-body, .consent-footer { padding-left: 20px; padding-right: 20px; }
}

/* ======== 退款申请 ======== */

.refund-section {
  background: #1b2838;
  border-radius: 8px;
  padding: 24px;
  margin-top: 24px;
  border: 1px solid #2a3f5a;
}

.refund-policy-note {
  background: rgba(102, 192, 244, 0.08);
  border-left: 3px solid #66c0f4;
  padding: 12px 16px;
  border-radius: 4px;
  color: #b8c4ce;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.refund-form label {
  display: block;
  color: #c7d5e0;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 500;
}

.refund-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.refund-field input,
.refund-field textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0f1a26;
  border: 1px solid #2a3f5a;
  border-radius: 4px;
  color: #c7d5e0;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.refund-field input:focus,
.refund-field textarea:focus {
  border-color: #66c0f4;
}

.refund-field textarea {
  resize: vertical;
  min-height: 80px;
}

.refund-amount-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.refund-amount-row input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.refund-currency {
  background: #2a3f5a;
  color: #c7d5e0;
  padding: 10px 14px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.refund-char-count {
  text-align: right;
  font-size: 12px;
  color: #667684;
  margin-top: 4px;
}

.refund-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.refund-actions .save-msg {
  flex: 1;
}

.refund-record {
  background: #0f1a26;
  border: 1px solid #2a3f5a;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.refund-record-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .refund-row { grid-template-columns: 1fr; }
}


/* ===== Taishf Layout: Flex body so footer sticks to page bottom ===== */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* Main content areas (flex:1 to consume space, push footer down) */
.apps-section,
#apps,
.landing-section,
body > section,
body > main {
  flex: 1 0 auto;
}
.footer,
#site-footer {
  flex-shrink: 0;
  margin-top: auto;
}
/* ============ Taishf 动态壁纸 Live Wallpaper ============ */
.taishf-live-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(139, 92, 246, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #0a0c12 0%, #0f1219 50%, #0c0e15 100%);
  pointer-events: none;
}

/* ---- 5颗浮动渐变光斑 Orbs ---- */
.taishf-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
  will-change: transform;
  pointer-events: none;
}

.taishf-orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 30% 30%,
    rgba(139, 92, 246, 0.55) 0%,
    rgba(139, 92, 246, 0.18) 40%,
    transparent 70%);
  top: -120px;
  left: -60px;
  animation: taishf-orb1-float 22s ease-in-out infinite;
}

.taishf-orb-2 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at 60% 40%,
    rgba(236, 72, 153, 0.48) 0%,
    rgba(236, 72, 153, 0.14) 42%,
    transparent 70%);
  top: 22%;
  right: -100px;
  animation: taishf-orb2-float 28s ease-in-out infinite reverse;
}

.taishf-orb-3 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 50% 50%,
    rgba(251, 191, 36, 0.38) 0%,
    rgba(251, 146, 60, 0.12) 45%,
    transparent 72%);
  bottom: 8%;
  left: 15%;
  animation: taishf-orb3-float 34s ease-in-out infinite;
}

.taishf-orb-4 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 45% 55%,
    rgba(6, 182, 212, 0.38) 0%,
    rgba(59, 130, 246, 0.14) 45%,
    transparent 72%);
  top: 55%;
  left: 48%;
  transform: translate(-50%, -50%);
  animation: taishf-orb4-float 40s ease-in-out infinite reverse;
}

.taishf-orb-5 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 50% 50%,
    rgba(16, 185, 129, 0.32) 0%,
    rgba(34, 197, 94, 0.10) 48%,
    transparent 75%);
  bottom: -80px;
  right: 22%;
  animation: taishf-orb5-float 30s ease-in-out infinite;
}

/* ---- 光斑浮动关键帧 ---- */
@keyframes taishf-orb1-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(40px, 30px, 0) scale(1.08); }
  66%      { transform: translate3d(-20px, 50px, 0) scale(0.95); }
}
@keyframes taishf-orb2-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  40%      { transform: translate3d(-50px, -40px, 0) scale(1.06); }
  80%      { transform: translate3d(20px, 30px, 0) scale(0.96); }
}
@keyframes taishf-orb3-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  30%      { transform: translate3d(35px, -45px, 0) scale(1.05); }
  70%      { transform: translate3d(-40px, -10px, 0) scale(0.97); }
}
@keyframes taishf-orb4-float {
  0%, 100% { transform: translate3d(-50%, -50%, 0) scale(1); }
  50%      { transform: translate3d(calc(-50% + 60px), calc(-50% - 50px), 0) scale(1.1); }
}
@keyframes taishf-orb5-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  35%      { transform: translate3d(-55px, -35px, 0) scale(1.08); }
  75%      { transform: translate3d(30px, -60px, 0) scale(0.94); }
}

/* ---- 星空层 ---- */
.taishf-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.taishf-star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: taishf-star-twinkle ease-in-out infinite;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
  --op: 0.75;
}

@keyframes taishf-star-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50%      { opacity: var(--op); transform: scale(1.1); }
}

/* ---- 噪点纹理层 ---- */
.taishf-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

/* ---- 鼠标视差增强 ---- */
.taishf-live-bg.parallax-on .taishf-orb-1 { transition: transform 0.6s ease-out; }
.taishf-live-bg.parallax-on .taishf-orb-2 { transition: transform 0.8s ease-out; }
.taishf-live-bg.parallax-on .taishf-orb-3 { transition: transform 1.0s ease-out; }
.taishf-live-bg.parallax-on .taishf-orb-4 { transition: transform 1.2s ease-out; }
.taishf-live-bg.parallax-on .taishf-orb-5 { transition: transform 0.9s ease-out; }

/* ---- 响应式降级 ---- */
@media (max-width: 768px) {
  .taishf-orb-1 { width: 340px; height: 340px; filter: blur(60px); }
  .taishf-orb-2 { width: 300px; height: 300px; filter: blur(55px); }
  .taishf-orb-3 { width: 240px; height: 240px; filter: blur(50px); }
  .taishf-orb-4 { width: 200px; height: 200px; filter: blur(45px); }
  .taishf-orb-5 { width: 180px; height: 180px; filter: blur(45px); }
}

@media (prefers-reduced-motion: reduce) {
  .taishf-orb { animation: none !important; }
  .taishf-star { animation-duration: 6s !important; animation-iteration-count: 2 !important; }
}

/* ============ 分类栏修复 v5 ============ */

/* 分类栏容器 */
.apps-controls {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.store-filters-bar {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
  min-width: 300px !important;
}

/* 分类选择框 */
#cat-select,
.sort-select,
.nav-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  border-radius: 8px !important;
  color: #e2e8f0 !important;
  padding: 8px 36px 8px 14px !important;
  font-size: 14px !important;
  cursor: pointer !important;
  min-width: 140px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5cf6' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
}

#cat-select option,
.nav-select option {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

/* 搜索框 */
.nav-search {
  flex: 1 !important;
  min-width: 180px !important;
  max-width: 320px !important;
}

.nav-search input {
  width: 100% !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  border-radius: 8px !important;
  color: #e2e8f0 !important;
  padding: 8px 14px !important;
  font-size: 14px !important;
  outline: none !important;
  transition: border-color 0.2s !important;
}

.nav-search input:focus {
  border-color: rgba(139, 92, 246, 0.7) !important;
}

/* 排序选择 */
.sort-select {
  min-width: 140px !important;
}

/* apps-grid 应用网格 */
.app-grid,
#app-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 20px !important;
  margin-top: 24px !important;
}

.apps-section {
  padding: 40px 0 !important;
}

.apps-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  margin-bottom: 8px !important;
}

.section-title {
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #f1f5f9 !important;
  margin: 0 !important;
}


/* ===== Category Filter Bar ===== */
.category-filter-bar {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(245,245,250,0.9));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 14px 0;
    position: sticky;
    top: 64px;
    z-index: 50;
}
.filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 18px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 24px;
    background: #fff;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
}
.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.15);
}
.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(102,126,234,0.4);
}
.sort-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sort-select {
    padding: 8px 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 24px;
    background: #fff;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
}
.sort-select:hover, .sort-select:focus {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102,126,234,0.15);
}

/* About Panel Forms */
#panel-about { padding: 20px; }
.admin-form-section {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
.admin-form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-form-group { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.admin-form-group label { font-size: 13px; font-weight: 600; color: #555; }
.admin-form-group input, .admin-form-group textarea {
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: #fff;
    font-family: inherit;
}
.admin-form-group input:focus, .admin-form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.admin-form-group textarea { min-height: 120px; resize: vertical; }
.admin-form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }


/* ===== FORCE FIXES - 缓存覆盖层 ===== */
.taishf-hero-title {
    color: #ffffff !important;
    font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
    font-weight: 800 !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-shadow: 0 2px 20px rgba(124,58,237,0.6), 0 0 40px rgba(102,126,234,0.3) !important;
    letter-spacing: 2px !important;
    z-index: 2 !important;
    position: relative !important;
}
.navbar {
    z-index: 200 !important;
    position: relative !important;
    isolation: isolate !important;
}
.admin-tab, .btn-primary, .btn-danger, .btn-outline, .btn-success, button, input[type=submit], .filter-btn {
    z-index: 100 !important;
    position: relative !important;
    pointer-events: auto !important;
}
.hero-subtitle, .hero-desc {
    color: rgba(255,255,255,0.88) !important;
    z-index: 2 !important;
    position: relative !important;
}
