:root {
  --bg: #070b12;
  --surface: #0f172a;
  --surface-elevated: #162238;
  --border: rgba(148, 163, 184, 0.16);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #14b8a6;
  --accent-strong: #0d9488;
  --accent-soft: rgba(20, 184, 166, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --radius: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(20, 184, 166, 0.14), transparent 36%),
    radial-gradient(circle at 82% 24%, rgba(245, 158, 11, 0.08), transparent 34%),
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
  pointer-events: none;
  z-index: -1;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.mono, code {
  font-family: 'JetBrains Mono', monospace;
}

code {
  background: rgba(148, 163, 184, 0.14);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88em;
  color: #e2e8f0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 18, 0.9);
  border-bottom: 1px solid var(--border);
}

.header-notice {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), rgba(20, 184, 166, 0.16));
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  padding: 7px 0;
  font-size: 0.82rem;
}

.header-notice-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  color: #f8fafc;
}

.header-notice code {
  color: #fbbf24;
  background: rgba(2, 6, 23, 0.65);
  font-weight: 700;
}

.notice-sep {
  color: var(--muted);
}

.notice-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  margin-left: 4px;
}

.notice-chip.teal {
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
  border-color: rgba(20, 184, 166, 0.45);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 14px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.btn-header-donate,
.btn-header-zalo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.14s, filter 0.14s;
}

.btn-header-donate {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1120;
}

.btn-header-zalo {
  background: var(--accent-soft);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.45);
}

.btn-header-donate:hover,
.btn-header-zalo:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #0f766e);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #042f2e;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.25);
}

.brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s;
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  padding: 56px 0 36px;
}

.hero-inner {
  max-width: 820px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: #5eead4;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.04rem;
  margin-bottom: 28px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.metric-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #5eead4;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.apps-section {
  border-top: 1px solid var(--border);
  padding: 48px 0 56px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.55rem;
  margin-bottom: 4px;
}

.section-header p {
  color: var(--muted);
  font-size: 0.94rem;
}

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

#search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 14px;
  min-width: 220px;
  font-family: inherit;
  font-size: 0.9rem;
}

#search-input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s;
}

.pill.active, .pill:hover {
  background: var(--accent-soft);
  color: #5eead4;
  border-color: rgba(20, 184, 166, 0.4);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 22px;
}

.app-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.82));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.18s, border-color 0.18s;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.42);
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-icon.player {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
}

.app-icon.scanner {
  background: linear-gradient(135deg, #0f766e, #d97706);
}

.app-order {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.app-title {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
}

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

.status-badge {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #5eead4;
  white-space: nowrap;
}

.app-desc {
  color: #cbd5e1;
  font-size: 0.94rem;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.feature-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
}

.app-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
}

.app-meta span {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
}

.app-meta strong {
  color: var(--text);
  font-weight: 600;
}

.app-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.14s, background 0.16s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #042f2e;
  flex: 1;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.full-width {
  width: 100%;
}

.guide-section {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  background: rgba(15, 23, 42, 0.28);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.step-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.step-num {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.step-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.step-item p {
  font-size: 0.87rem;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 50;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-box {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.qr-wrap {
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  align-self: center;
  min-width: 160px;
  min-height: 160px;
  display: grid;
  place-items: center;
}

.qr-url-row {
  display: flex;
  gap: 8px;
}

.qr-url-row input {
  flex: 1;
  background: #020617;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .hero-metrics {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .notice-sep {
    display: none;
  }
  .brand small {
    display: none;
  }
  .btn-header-donate,
  .btn-header-zalo {
    padding: 6px 10px;
    font-size: 0.76rem;
  }
  .app-actions {
    flex-direction: column;
  }
}

.support-section {
  border-top: 1px solid var(--border);
  padding: 48px 0 68px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.support-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.86));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.donate-card {
  border-top: 3px solid var(--amber);
}

.feedback-card {
  border-top: 3px solid var(--accent);
}

.support-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.support-pill.amber {
  background: var(--amber-soft);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.support-pill.teal {
  background: var(--accent-soft);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.35);
}

.support-card h3 {
  font-size: 1.24rem;
  line-height: 1.3;
}

.support-desc {
  color: var(--muted);
  font-size: 0.91rem;
  margin-bottom: 4px;
}

.bank-qr-panel {
  margin-top: auto;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bank-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bank-details span,
.bank-box span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.bank-box {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.bank-acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-compact {
  padding: 6px 11px;
  font-size: 0.78rem;
  border-radius: 9px;
  flex-shrink: 0;
}

.highlight-acc {
  color: #fbbf24;
  font-size: 1.08rem;
}

.highlight-teal {
  color: #5eead4;
  font-size: 1.08rem;
}

.vietqr-box {
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px;
  width: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vietqr-box img {
  width: 96px;
  height: 96px;
  display: block;
}

.vietqr-box span {
  font-size: 0.66rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.feedback-actions {
  margin-top: auto;
  display: flex;
}

@media (max-width: 900px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .bank-qr-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .vietqr-box {
    align-self: center;
  }
}
