:root {
  --bg: #10162c;
  --bg-deep: #0d1427;
  --card: #1e2a3e;
  --card-soft: #172131;
  --line: rgba(255, 255, 255, .16);
  --text: #f2f6ff;
  --muted: #c5d0df;
  --cyan: #00eaff;
  --pink: #ff4c83;
  --purple: #8b38dc;
  --orange: #ff9f0a;
  --green: #12b886;
  --blue: #2e66e8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(120deg, var(--bg-deep), var(--bg));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1200px, calc(100% - 70px));
  margin: 0 auto;
  padding: 38px 0 48px;
}

.site-header {
  text-align: center;
  margin-bottom: 55px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 900;
}

.site-header h1 span {
  background: linear-gradient(90deg, #ff4678, #8b64ff, #17b9ec);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(120, 91, 255, .45));
}

.site-header p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.picker h2 {
  margin: 0 0 16px;
  color: var(--cyan);
  text-align: center;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 900;
  text-shadow: 0 0 18px rgba(0, 234, 255, .42);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  min-height: 164px;
  padding: 16px 14px 20px;
  border: 2px solid var(--cyan);
  border-radius: 16px;
  background: linear-gradient(145deg, #202c40, #1b2639);
  box-shadow: 0 0 18px rgba(0, 234, 255, .22);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.game-card:hover,
.game-card.active {
  transform: translateY(-3px);
  border-color: #ffffff;
  box-shadow: 0 0 26px rgba(0, 234, 255, .48);
}

.thumb {
  height: 100px;
  border: 2px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background:
    linear-gradient(rgba(13, 20, 34, .4), rgba(13, 20, 34, .65)),
    var(--art);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.screen {
  width: 42%;
  max-width: 180px;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  background: rgba(10, 12, 20, .84);
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .35);
  display: grid;
  gap: 5px;
  padding: 10px;
}

.screen i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff4c83, #00eaff);
  opacity: .9;
}

.game-title {
  position: relative;
  display: block;
  min-height: 30px;
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 18px;
  margin-left: 5px;
  padding: 0 7px;
  border-radius: 5px;
  background: #ff4d5f;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  vertical-align: middle;
}

.android {
  color: var(--cyan);
}

.red {
  color: #ff4d5f;
}

.details {
  margin-top: 18px;
  padding: 22px;
  border: 2px solid var(--cyan);
  border-radius: 16px;
  background: linear-gradient(145deg, #202c40, #1b2639);
  box-shadow: 0 0 20px rgba(0, 234, 255, .24);
}

.details h2 {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 21px;
}

.details p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.separator {
  position: relative;
  height: 68px;
  display: grid;
  place-items: center;
}

.separator::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .24), transparent);
}

.separator span {
  position: relative;
  padding: 0 22px;
  background: #12182e;
  color: var(--orange);
  letter-spacing: 8px;
}

.panel {
  margin-bottom: 32px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #202b3f, #1c273a);
  text-align: center;
}

.panel h2 {
  margin: 0 0 20px;
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 900;
}

.shop-panel h2 {
  color: var(--orange);
  text-shadow: 0 0 14px rgba(255, 159, 10, .34);
}

.actions,
.community-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.btn,
.community-links a,
.modal-card button,
.save-btn {
  border: 0;
  border-radius: 10px;
  padding: 13px 26px;
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
  transition: transform .2s ease, filter .2s ease;
}

.btn:hover,
.community-links a:hover,
.modal-card button:hover,
.save-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.btn-orange {
  background: linear-gradient(135deg, #ffad1d, #ed8b00);
}

.btn-green {
  background: linear-gradient(135deg, #16c993, #0aaa7b);
}

.btn-blue {
  background: linear-gradient(135deg, #5f72f0, #8e4eed);
}

.btn-red {
  background: linear-gradient(135deg, #ff5567, #bf1f31);
}

.community-panel h2 {
  color: #9aa8ff;
}

.community-links a {
  padding: 11px 22px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(145deg, #2e3b50, #233044);
  font-size: 14px;
}

.donate-banner {
  margin-top: 38px;
  padding: 38px 24px 36px;
  border: 3px solid #fff;
  border-radius: 18px;
  background: linear-gradient(115deg, #8b2bd4, #ed0875);
  box-shadow: 0 0 24px rgba(237, 8, 117, .35);
  text-align: center;
}

.donate-banner h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 900;
}

.donate-banner p {
  margin: 0 0 24px;
  font-weight: 700;
}

.btn-white {
  display: inline-flex;
  background: #fff;
  color: #f30878;
  min-width: 230px;
  justify-content: center;
}

.support {
  position: fixed;
  right: 20px;
  bottom: 16px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4f6b, #ff6d87);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(255, 79, 107, .58);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(6, 10, 23, .78);
  z-index: 20;
}

.modal.show {
  display: grid;
}

.modal-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #202b3f, #1b2639);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
}

.modal-card h2 {
  margin: 0 0 16px;
  color: #ff4f6b;
  text-align: center;
  font-size: 26px;
}

.modal-card p {
  color: var(--muted);
  line-height: 1.6;
}

.modal-card button {
  width: 100%;
  margin-top: 12px;
  background: linear-gradient(135deg, #5f72f0, #8e4eed);
}

.donate-page {
  background: #e5f7ff;
  color: #1b2538;
}

.donate-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.donate-card {
  width: min(400px, 100%);
  padding: 26px 25px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(57, 91, 116, .16);
}

.donate-card h1 {
  margin: 0 0 20px;
  text-align: center;
  font-size: 21px;
  line-height: 1.35;
}

.donate-card label {
  display: block;
  margin: 17px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.donate-card input {
  width: 100%;
  height: 45px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  padding: 0 13px;
  font: inherit;
}

.qr-box {
  margin: 20px 0;
  padding: 14px 10px;
  border: 1px dashed #cbd7e6;
  border-radius: 10px;
  text-align: center;
}

.vietqr {
  color: #e8273f;
  font-size: 30px;
  font-weight: 900;
}

.qr-demo {
  width: 228px;
  aspect-ratio: 1;
  margin: 8px auto 12px;
  padding: 12px;
  border: 2px solid #214a8f;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.qr-demo span {
  background: #111;
}

.qr-demo span:nth-child(2n),
.qr-demo span:nth-child(7),
.qr-demo span:nth-child(13),
.qr-demo span:nth-child(18) {
  background: #fff;
  border: 4px solid #111;
}

.qr-box p {
  margin: 0;
  color: #555;
  font-size: 11px;
  line-height: 1.5;
}

.save-btn {
  width: 100%;
  background: var(--blue);
}

.back-link {
  display: block;
  margin-top: 14px;
  color: #2e66e8;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 24px, 1200px);
    padding-top: 26px;
  }

  .site-header {
    margin-bottom: 34px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 150px;
  }

  .thumb {
    height: 92px;
  }

  .actions .btn,
  .community-links a {
    flex: 1 1 180px;
    text-align: center;
  }
}

/* Polished user interface */
body:not(.admin-page):not(.donate-page) {
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 234, 255, .12), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(255, 76, 131, .13), transparent 34%),
    linear-gradient(135deg, #0a1022 0%, #111831 48%, #10162c 100%);
}

.page {
  position: relative;
}

.site-header {
  position: relative;
  padding: 28px 0 8px;
}

.site-header::after {
  content: "";
  display: block;
  width: min(520px, 80%);
  height: 1px;
  margin: 24px auto 0;
  background: linear-gradient(90deg, transparent, rgba(0, 234, 255, .7), transparent);
}

.picker {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  background: rgba(15, 23, 42, .36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.game-grid {
  gap: 18px;
}

.game-card {
  min-height: 170px;
  border-width: 1px;
  background: linear-gradient(145deg, rgba(32, 44, 64, .96), rgba(18, 28, 45, .96));
  box-shadow: 0 16px 36px rgba(0, 0, 0, .26), 0 0 0 1px rgba(0, 234, 255, .38);
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, .12), transparent 32%);
  opacity: .55;
  pointer-events: none;
}

.game-card:hover,
.game-card.active {
  transform: translateY(-5px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, .32), 0 0 28px rgba(0, 234, 255, .42);
}

.thumb {
  height: 104px;
  border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .28);
}

.screen {
  width: 38%;
  transform: rotate(-1deg);
}

.details {
  border-width: 1px;
  background:
    linear-gradient(145deg, rgba(32, 44, 64, .98), rgba(17, 26, 43, .98));
  box-shadow: 0 20px 48px rgba(0, 0, 0, .28), 0 0 0 1px rgba(0, 234, 255, .45);
}

.details h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.details h2::before {
  content: "";
  width: 10px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(#00eaff, #ff4c83);
}

.detail-actions .btn {
  min-width: 172px;
  text-align: center;
}

.panel {
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(32, 43, 63, .98), rgba(20, 31, 49, .98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .24);
}

.community-links a {
  min-width: 112px;
}

.donate-banner {
  border-width: 2px;
  background:
    linear-gradient(120deg, rgba(139, 43, 212, .94), rgba(237, 8, 117, .96)),
    linear-gradient(90deg, rgba(255, 255, 255, .18), transparent);
}

.qr-image {
  display: block;
  width: min(280px, 100%);
  margin: 0 auto 12px;
  border-radius: 10px;
}

@media (max-width: 760px) {
  .picker {
    padding: 12px;
  }

  .game-grid {
    gap: 12px;
  }

  .detail-actions .btn {
    width: 100%;
  }
}

/* Professional user interface override */
body:not(.admin-page):not(.donate-page) {
  background: #0f172a;
  color: #e5e7eb;
}

body:not(.admin-page):not(.donate-page)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(15, 23, 42, 1)),
    linear-gradient(90deg, rgba(14, 165, 233, .08), transparent 42%);
}

.page {
  width: min(1160px, calc(100% - 48px));
  padding: 34px 0 56px;
}

.site-header {
  margin-bottom: 34px;
  padding: 18px 0 10px;
  text-align: left;
}

.site-header::after {
  width: 100%;
  margin: 24px 0 0;
  background: rgba(148, 163, 184, .2);
}

.site-header h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0;
}

.site-header h1 span {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #f8fafc;
  filter: none;
}

.site-header p {
  max-width: 620px;
  color: #94a3b8;
  font-size: 15px;
}

.picker {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.picker h2 {
  margin: 0 0 18px;
  color: #e2e8f0;
  text-align: left;
  font-size: 18px;
  font-weight: 800;
  text-shadow: none;
}

.game-grid {
  gap: 14px;
}

.game-card {
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 10px;
  background: #172033;
  box-shadow: none;
}

.game-card::after {
  display: none;
}

.game-card:hover,
.game-card.active {
  transform: translateY(-2px);
  border-color: #38bdf8;
  background: #1b2638;
  box-shadow: 0 14px 28px rgba(2, 6, 23, .28);
}

.thumb {
  height: 92px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  background:
    linear-gradient(rgba(15, 23, 42, .35), rgba(15, 23, 42, .55)),
    var(--art);
  box-shadow: none;
}

.game-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.screen {
  width: 36%;
  border-radius: 6px;
  transform: none;
  background: rgba(15, 23, 42, .86);
  border-color: rgba(226, 232, 240, .24);
  box-shadow: 0 10px 24px rgba(2, 6, 23, .32);
}

.screen i {
  background: #38bdf8;
  opacity: .72;
}

.game-title {
  min-height: auto;
  margin-top: 11px;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.35;
}

.tag {
  height: 18px;
  border-radius: 999px;
  background: #334155;
  color: #cbd5e1;
}

.details {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid rgba(56, 189, 248, .36);
  border-radius: 10px;
  background: #172033;
  box-shadow: none;
}

.details h2 {
  margin-bottom: 10px;
  color: #f8fafc;
  font-size: 20px;
}

.details h2::before {
  width: 4px;
  height: 22px;
  background: #38bdf8;
}

.details p {
  color: #a7b3c4;
}

.btn,
.community-links a,
.save-btn {
  border-radius: 8px;
  padding: 12px 20px;
  box-shadow: none;
  font-size: 14px;
}

.btn:hover,
.community-links a:hover,
.save-btn:hover {
  transform: translateY(-1px);
}

.btn-blue {
  background: #2563eb;
}

.btn-red {
  background: #dc2626;
}

.btn-orange {
  background: #d97706;
}

.btn-green {
  background: #059669;
}

.separator {
  height: 54px;
}

.separator span {
  background: #0f172a;
  color: #64748b;
}

.panel {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 10px;
  background: #172033;
  box-shadow: none;
  text-align: left;
}

.panel h2 {
  margin-bottom: 18px;
  color: #f8fafc;
  font-size: 18px;
  text-shadow: none;
}

.actions,
.community-links {
  justify-content: flex-start;
}

.community-panel h2 {
  color: #f8fafc;
}

.community-links a {
  border-color: rgba(148, 163, 184, .28);
  background: #1f2937;
}

.donate-banner {
  margin-top: 24px;
  padding: 30px 28px;
  border: 1px solid rgba(56, 189, 248, .28);
  border-radius: 10px;
  background: #0f766e;
  box-shadow: none;
  text-align: left;
}

.donate-banner h2 {
  font-size: 22px;
}

.donate-banner p {
  color: rgba(255, 255, 255, .86);
}

.btn-white {
  min-width: 180px;
  background: #f8fafc;
  color: #0f766e;
}

.support {
  right: 18px;
  bottom: 18px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: #2563eb;
  box-shadow: 0 10px 24px rgba(2, 6, 23, .24);
  font-size: 13px;
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 24px, 1160px);
  }

  .site-header {
    text-align: left;
  }

  .game-card {
    min-height: 140px;
  }

  .panel,
  .donate-banner {
    padding: 20px;
  }
}
