/* TiziShop · 17-getkey.css — Giao diện Get Key nguyên bản + Video nền động chỉ hiện ở mục Get Key */
body.is-getkey-tab,
body.is-getkey-tab > main {
  background: transparent !important;
}
body.is-getkey-tab #sakuraLayer,
body.is-getkey-tab #tiziLanguageMenu,
body.is-getkey-tab .tizi-language-menu,
body.is-getkey-tab #mobilePageContext,
body.is-getkey-tab header.lg\:hidden,
body.is-getkey-tab main > .relative.z-10 > div.hidden.lg\:flex:first-child {
  display: none !important;
}
@media (max-width: 1023px) {
  body.is-getkey-tab #mobileGetKeyMenuBtn {
    display: inline-flex !important;
  }
}
#tab-getkey {
  --gk-text: #f8fbff;
  --gk-muted: #d5e0ec;
  --gk-stroke: rgba(231, 241, 255, .25);
  --gk-panel: rgba(8, 15, 28, .22);
  --gk-cyan: #a8f3ee;
  --gk-success: #8ee7c7;
  --gk-danger: #ffb6c4;
  color: var(--gk-text);
  padding-bottom: 32px;
  position: relative;
}
#tab-getkey .tizi-getkey-wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  background: #080913 url("../../poster-mobile-v20.jpg") center / cover no-repeat;
}
@media (min-width: 960px) and (orientation: landscape) {
  #tab-getkey .tizi-getkey-wallpaper {
    background-image: url("../../poster-pc-v20.jpg");
  }
}
@media (min-width: 1024px) {
  #tab-getkey .tizi-getkey-wallpaper {
    left: 18rem;
    width: calc(100% - 18rem);
  }
}
#tab-getkey .animated-wallpaper {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
#tab-getkey .tizi-getkey-wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, .18), rgba(3, 7, 18, .36));
}
#tab-getkey .tizi-getkey-container {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  margin-inline: auto;
}
#tab-getkey .page-header { position: relative; margin-bottom: 24px; text-align: center; }
#tab-getkey h1 {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.04em;
  text-align: center;
  color: #f8fbff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}
#tab-getkey h1 span { color: var(--gk-cyan); }

#tab-getkey .avatar-emblem {
  position: relative; isolation: isolate; display: block;
  width: clamp(112px, 14vw, 146px); aspect-ratio: 1;
  margin: 0 auto; user-select: none; -webkit-user-select: none;
}
#tab-getkey .avatar-emblem::before {
  content: ""; position: absolute; inset: -12%; border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(203, 238, 255, .2), transparent 70%);
}
#tab-getkey .avatar-bob, #tab-getkey .avatar-tilt { position: relative; width: 100%; height: 100%; }
#tab-getkey .avatar-bob { animation: tizi-cat-bob 5.4s ease-in-out infinite; }
#tab-getkey .avatar-tilt {
  transform: perspective(800px) rotateX(0) rotateY(0);
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.03, .98, .52, .99);
}
#tab-getkey .avatar-emblem img { display: block; position: absolute; user-select: none; -webkit-user-drag: none; max-width: none; }
#tab-getkey .avatar-cat {
  inset: 0; z-index: 1; width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35), 0 0 0 2px rgba(255, 255, 255, .52);
  transform: translateZ(3px);
}
#tab-getkey .avatar-wing {
  inset: -9%; z-index: 2; width: 118%; height: 118%;
  object-fit: contain; pointer-events: none;
  transform: translateZ(14px);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .38));
}
#tab-getkey .avatar-wing-still { display: none !important; }
@keyframes tizi-cat-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

#tab-getkey .social-dock { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
#tab-getkey .social-icon {
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 1.5px solid rgba(255,255,255,.45); border-radius: 50%;
  background: transparent; color: #f4f8ff; text-decoration: none;
  overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
#tab-getkey .social-icon svg { width: 100%; height: 100%; display: block; }
#tab-getkey .social-icon:active { transform: scale(.94); }
@media (hover:hover) {
  #tab-getkey .social-icon:hover {
    border-color: #fff; transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 24px rgba(0,0,0,.48);
  }
}

#tab-getkey .key-shell { width: min(100%, 540px); margin-inline: auto; }
#tab-getkey .key-panel {
  padding: clamp(18px, 5vw, 30px);
  border: 1px solid rgba(231, 241, 255, .32);
  border-radius: 22px;
  background: rgba(8, 15, 28, .26);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .24);
}
#tab-getkey .key-panel h2 {
  text-align: center; font-size: 1.5rem; font-weight: 800; margin: 0;
  color: #f8fbff; text-shadow: 0 2px 10px rgba(0, 0, 0, .75);
}
#tab-getkey .key-subtitle {
  text-align: center; font-size: .875rem; margin: 6px 0 20px;
  color: var(--gk-muted); text-shadow: 0 1px 8px rgba(0, 0, 0, .75);
}
#tab-getkey .get-label {
  display: flex; align-items: center; gap: 6px;
  color: #dbe5f6; font-size: .875rem; font-weight: 650; margin: 0 0 7px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .75);
}
#tab-getkey .label-icon { display: inline-grid; place-items: center; width: 16px; color: #fff; }
#tab-getkey .get-field {
  position: relative; display: flex; align-items: center; min-height: 46px;
  border: 1px solid rgba(220,232,248,.42); border-radius: 12px;
  background: rgba(8, 15, 28, .28); overflow: hidden;
}
#tab-getkey .get-field > span {
  display: grid; place-items: center; width: 42px; flex: none;
  align-self: stretch; border-right: 1px solid rgba(220,232,248,.18); color: #fff;
}
#tab-getkey .get-field select,
#tab-getkey .get-field output,
#tab-getkey .custom-select-trigger {
  flex: 1; min-width: 0; padding: 10px 12px;
  color: #f6f8ff; font: inherit; font-size: .95rem; font-weight: 650;
  background: transparent; border: 0; text-align: left;
}
#tab-getkey .get-field select { appearance: none; -webkit-appearance: none; color-scheme: dark; cursor: pointer; }
#tab-getkey .get-field select option { background-color: #152036; color: #f6f8ff; font-weight: 600; }
#tab-getkey .get-field.has-custom-select select,
#tab-getkey .get-field.has-custom-select select:disabled {
  position: absolute; inset: 0; opacity: 0 !important;
  pointer-events: none; width: 100%; height: 100%;
}
#tab-getkey .custom-select-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 44px; cursor: pointer; outline: none;
}
#tab-getkey .get-field.is-open { z-index: 20; border-color: rgba(168, 243, 238, .75); }
#tab-getkey .custom-select-menu {
  display: grid; gap: 6px; margin-top: 8px; padding: 8px;
  border: 1px solid rgba(220,232,248,.35); border-radius: 12px;
  background: #1a1e28; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  max-height: 164px; overflow-y: auto; overscroll-behavior: contain;
}
#tab-getkey .custom-select-menu[hidden] { display: none !important; }
#tab-getkey .custom-select-option {
  display: flex; align-items: center; width: 100%; padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 9px;
  background: #222734; color: #f6f8ff; font: inherit; font-size: .93rem;
  font-weight: 600; text-align: left; transition: background .15s, color .15s, border-color .15s;
}
#tab-getkey .custom-select-option:hover,
#tab-getkey .custom-select-option:focus-visible {
  background: rgba(168, 243, 238, .18);
  border-color: rgba(168, 243, 238, .45);
  color: #fff; outline: none;
}
#tab-getkey .custom-select-option.is-selected {
  background: linear-gradient(110deg, #2563eb, #04b5cf);
  border-color: rgba(168, 243, 238, .6);
  color: #fff;
}
#tab-getkey .get-output-field output { color: #54e4ff; }
#tab-getkey .get-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
#tab-getkey .get-grid > div { min-width: 0; }
#tab-getkey .get-guide {
  display: flex; gap: 10px; background: rgba(7, 14, 30, .28);
  border: 1px solid rgba(220,232,248,.24); border-radius: 13px;
  padding: 16px; margin-top: 18px; font-size: .875rem; color: #e6eefb;
  overflow-wrap: anywhere; text-shadow: 0 1px 6px rgba(0, 0, 0, .75);
}
#tab-getkey .get-guide strong { color: #fff; }
#tab-getkey .get-guide-icon {
  flex: 0 0 21px; height: 21px; border-radius: 50%;
  text-align: center; font-weight: 900; background: #ffc426; color: #172030;
  line-height: 21px; font-size: 12px;
}
#tab-getkey .get-guide ol { margin: 4px 0 0; padding-left: 19px; list-style: decimal; }
#tab-getkey .primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; margin-top: 22px; padding: 12px;
  border-radius: 13px; background: linear-gradient(110deg, #2563eb, #04b5cf);
  border: 0; color: #fff; font-weight: 750;
  transition: filter .2s, transform .2s;
}
#tab-getkey .primary:hover:not(:disabled) { filter: brightness(1.1); }
#tab-getkey .primary:disabled { cursor: not-allowed; opacity: .55; }
#tab-getkey .action {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--gk-stroke); border-radius: 10px;
  background: rgba(180, 216, 244, .1); color: #f8fbff;
  font-size: .875rem; font-weight: 650;
}
#tab-getkey .action:hover:not(:disabled) { background: rgba(180, 216, 244, .2); }
#tab-getkey .key-message { margin: 12px 0 0; color: var(--gk-muted); text-align: center; font-size: .875rem; overflow-wrap: anywhere; }
#tab-getkey .announcement-banner {
  margin-bottom: 14px; padding: 10px 14px;
  border: 1px solid rgba(255,196,38,.55); border-radius: 11px;
  background: rgba(45,32,8,.42); color: #ffe699;
  font-size: .84rem; font-weight: 600; text-align: center;
}

#tab-getkey .tizi-gk-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 7, 16, .74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
#tab-getkey .tizi-gk-popup-overlay[hidden] {
  display: none !important;
}
#tab-getkey .tizi-gk-popup-card {
  position: relative;
  width: min(100%, 470px);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(84, 228, 255, .42);
  background: rgba(11, 18, 34, .96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .68), 0 0 0 1px rgba(255, 255, 255, .06);
  animation: tiziGkPopIn .18s cubic-bezier(.16, 1, .3, 1);
}
@keyframes tiziGkPopIn {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
#tab-getkey .tizi-gk-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
#tab-getkey .tizi-gk-popup-close:hover {
  background: rgba(244, 63, 94, .24);
  border-color: rgba(251, 113, 133, .6);
  color: #fff;
}
#tab-getkey .token-session-box {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
#tab-getkey .token-session-box[hidden],
#tab-getkey .claimed-key-vault[hidden] {
  display: none !important;
}
#tab-getkey .token-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 14px;
  padding-right: 42px;
  min-height: 32px;
}
#tab-getkey .token-id-wrap { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #dbe5f6; }
#tab-getkey .token-id-wrap code {
  padding: 3px 8px; border-radius: 6px;
  background: rgba(84,228,255,.15); border: 1px solid rgba(84,228,255,.35);
  color: #54e4ff; font-weight: 700;
}
#tab-getkey .token-ttl-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 999px; background: rgba(255,182,196,.16);
  border: 1px solid rgba(255,182,196,.42); color: #ffd2db; font-size: .8rem;
}
#tab-getkey .token-ttl-badge strong { color: #fff; font-variant-numeric: tabular-nums; }
#tab-getkey .token-progress-wrap { margin-bottom: 10px; }
#tab-getkey .token-progress-info { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 650; color: #e6eefb; margin-bottom: 6px; }
#tab-getkey .token-progress-bar { width: 100%; height: 9px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
#tab-getkey .token-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #04b5cf, #54e4ff); transition: width .3s ease; }
#tab-getkey .token-warning { margin: 10px 0 12px; font-size: .79rem; color: #ffe3af; line-height: 1.45; }
#tab-getkey .token-actions { display: grid; gap: 8px; }
#tab-getkey .token-step-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 46px; padding: 10px 16px; border-radius: 12px;
  color: #fff !important; font-weight: 700; font-size: .92rem; text-decoration: none;
  margin-top: 0 !important; background: linear-gradient(110deg, #059669, #04b5cf) !important; border: 0 !important;
  cursor: pointer;
}
#tab-getkey .token-step-btn[aria-disabled="true"] {
  opacity: .55; pointer-events: none;
}
#tab-getkey .token-cancel-btn { width: 100%; font-size: .83rem; }

#tab-getkey .claimed-key-vault {
  margin-top: 8px; padding: 14px;
  border: 1.5px solid rgba(142,231,199,.65); border-radius: 15px;
  background: rgba(7,22,34,.72); text-align: center;
}
#tab-getkey .vault-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding-right: 22px; }
#tab-getkey .vault-badge { padding: 4px 10px; border-radius: 999px; background: rgba(142,231,199,.2); border: 1px solid rgba(142,231,199,.5); color: #8ee7c7; font-size: .76rem; font-weight: 800; }
#tab-getkey .vault-exp { font-size: .8rem; color: #54e4ff; font-weight: 700; font-variant-numeric: tabular-nums; }
#tab-getkey .vault-code-box { padding: 14px 12px; margin: 10px 0; border: 1px dashed rgba(84,228,255,.65); border-radius: 12px; background: rgba(4,12,24,.65); }
#tab-getkey .vault-code-box code {
  display: block; font-size: clamp(1.05rem, 3.6vw, 1.35rem); font-weight: 800;
  color: #54e4ff; letter-spacing: .06em; user-select: all; word-break: break-all;
}
#tab-getkey .vault-meta { font-size: .83rem; color: #dbe5f6; margin-bottom: 14px; font-weight: 600; }
#tab-getkey .vault-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
#tab-getkey .vault-actions .vault-btn { flex: 1 1 110px; margin-top: 0; min-height: 42px; font-size: .85rem; }
#tab-getkey .qr-container {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 12px auto; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,.96); color: #0b1324;
  width: max-content; font-size: .76rem; font-weight: 700;
}
#tab-getkey .vault-warning {
  margin: 10px 0 14px; padding: 10px; border-radius: 10px;
  background: rgba(255,100,130,.16); border: 1px solid rgba(255,182,196,.38);
  color: #ffd2db; font-size: .79rem; line-height: 1.45;
}
#tab-getkey .vault-new-btn { width: 100%; }

/* Admin Get Key pane inside #tab-admin */
#admin-pane-getkey .game-editor {
  display: grid; gap: 10px; padding: 14px;
  border: 1px solid #30343f; border-radius: 14px;
  background: #1b1e25;
}
#admin-pane-getkey .editor-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
#admin-pane-getkey .editor-head-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
#admin-pane-getkey .editor-stock-badge {
  padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(16, 185, 129, .14); border: 1px solid rgba(16, 185, 129, .38); color: #6ee7b7;
}
#admin-pane-getkey .editor-stock-badge.is-empty {
  background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .38); color: #fcd34d;
}
#admin-pane-getkey .editor-add-key {
  padding: 6px 12px; border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, .42); background: rgba(14, 165, 233, .14);
  color: #7dd3fc; font-size: 12px; font-weight: 700;
}
#admin-pane-getkey .editor-delete {
  padding: 6px 12px; border-radius: 9px;
  border: 1px solid #674051; background: #301c25;
  color: #ff9aa8; font-size: 12px; font-weight: 700;
}
#admin-pane-getkey .plan-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
#admin-pane-getkey .plan-fields label:first-child,
#admin-pane-getkey .plan-fields label:last-child { grid-column: 1 / -1; }
#admin-pane-getkey .plan-fields label {
  display: grid; gap: 5px; min-width: 0;
  font-size: 12px; font-weight: 650; color: #c2c8d5;
}
#admin-pane-getkey .plan-fields input {
  width: 100%; padding: 10px 12px;
  border: 1px solid #3b404d; border-radius: 10px;
  background: #14171d; color: #f1f2f7; font-size: 13px;
}
#admin-pane-getkey .admin-key-list {
  display: grid; gap: 8px; max-height: 280px; overflow-y: auto; padding-right: 4px;
}
#admin-pane-getkey .admin-key-item {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; padding: 10px 13px;
  border: 1px solid #30343f; border-radius: 11px;
  background: #1b1e25; font-size: 12px;
}
#admin-pane-getkey .admin-key-item code {
  color: #38bdf8; font-weight: 700; font-size: 13px;
}
#admin-pane-getkey .admin-key-actions { display: flex; gap: 6px; }
#admin-pane-getkey .admin-key-actions button {
  padding: 6px 11px; border-radius: 8px;
  border: 1px solid #3a404f; background: #222630;
  color: #e2e8f0; font-size: 11px; font-weight: 700;
}
#admin-pane-getkey .admin-key-actions button.editor-delete {
  border-color: #674051; background: #301c25; color: #ff9aa8;
}
@media (max-width: 500px) {
  #admin-pane-getkey .plan-fields { grid-template-columns: 1fr; }
}

/* Nút loa bật/tắt nhạc nền ở góc dưới bên phải (chỉ hiển thị trong tab Get Key) */
#tab-getkey .music-toggle {
  position: fixed;
  z-index: 45;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(233, 244, 255, .28);
  border-radius: 50%;
  background: rgba(6, 14, 29, .68);
  color: #e2eaf4;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color .18s, border-color .18s, color .18s;
}
#tab-getkey .music-toggle .music-icon-on { display: none; }
#tab-getkey .music-toggle.is-playing {
  color: #bff8ed;
  border-color: rgba(168, 243, 238, .62);
}
#tab-getkey .music-toggle.is-playing .music-icon-on { display: block; }
#tab-getkey .music-toggle.is-playing .music-icon-off { display: none; }
#tab-getkey .music-toggle.is-waiting { border-style: dashed; }
@media (hover: hover) and (pointer: fine) {
  #tab-getkey .music-toggle:hover {
    background: rgba(24, 47, 66, .85);
    border-color: rgba(233, 244, 255, .58);
  }
}
@media (max-width: 1023px) {
  #tab-getkey .music-toggle {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}
