/* TOPGAME landing page */
:root {
  --tg-bg: #0e0e10;
  --tg-surface: #1c1b20;
  --tg-border: #2c2a33;
  --tg-purple: #8b1bff;
  --tg-purple-2: #b44dff;
  --tg-text: #ffffff;
  --tg-muted: #a7a5ad;
  --tg-green: #36e05c;
  --tg-red: #ff3a3a;
  --tg-gold: #ffc531;
}

body.tg-body {
  background: var(--tg-bg);
  color: var(--tg-text);
  font-family: "Roboto", "Segoe UI", -apple-system, BlinkMacSystemFont, "Hanuman", sans-serif;
  padding-bottom: 110px;
}

.tg-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* the shared link handler reads e.target.href, so clicks must land on the <a> itself */
.tg-header a *,
.tg-footer a *,
.tg-card *,
.tg-gift *,
.tg-bottom-nav a * {
  pointer-events: none;
}

/* header */
.tg-header {
  position: sticky;
  top: 0;
  z-index: 1010;
  background: rgba(14, 14, 16, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.tg-logo {
  cursor: pointer;
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.5px;
  color: #fff;
  user-select: none;
}

.tg-logo span {
  background: linear-gradient(180deg, #c76bff 0%, #8b1bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.tg-header .btn-language {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid var(--tg-border);
}

.tg-header .btn-language.kh {
  background-image: url(/assets/icons/kh.svg);
}

.tg-header .btn-language.en {
  background-image: url(/assets/icons/en.svg);
}

.tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: filter 0.15s, transform 0.15s;
}

.tg-btn:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.15);
}

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

.tg-btn-outline {
  background: #2a0a4d;
  border: 2px solid var(--tg-purple);
}

.tg-btn-solid {
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  border: 2px solid var(--tg-purple-2);
}

/* banner */
.tg-banner {
  margin-top: 8px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--tg-purple);
  box-shadow: 0 0 18px rgba(139, 27, 255, 0.35);
}

.tg-banner .carousel-item img {
  aspect-ratio: 1280 / 340;
  object-fit: cover;
}

.tg-banner .carousel-indicators li {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 0;
  margin: 0 3px 6px;
}

/* welcome bonus */
.tg-bonus {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.tg-bonus-bar {
  flex: 1;
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #15141a;
  border: 1.5px solid var(--tg-purple);
}

.tg-bonus-track {
  display: flex;
  white-space: nowrap;
  animation: tg-marquee 18s linear infinite;
}

.tg-bonus-track span {
  padding: 0 28px 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.tg-bonus-track b {
  color: var(--tg-green);
  font-weight: 800;
  margin-right: 4px;
}

.tg-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--tg-green);
  vertical-align: middle;
  box-shadow: 0 0 6px var(--tg-green);
}

@keyframes tg-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tg-gift {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
}

.tg-gift:hover {
  color: #fff;
}

.tg-gift em {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff2d2d;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* sections */
.tg-section {
  margin-top: 22px;
}

.tg-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tg-section-head h2 {
  margin: 0;
  padding-left: 14px;
  position: relative;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.tg-section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 2px;
  background: var(--tg-purple);
}


.tg-row-wrap {
  position: relative;
  margin: 0 -16px;
}

.tg-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tg-row::-webkit-scrollbar {
  display: none;
}

.tg-top-nav,
.tg-row-prev {
  display: none !important;
}

.tg-row-prev,
.tg-row-next {
  position: absolute;
  right: 6px;
  top: calc(50% - 14px);
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.tg-row-prev:focus,
.tg-row-next:focus {
  outline: none;
}

.tg-card {
  --glow: var(--tg-green);
  flex: 0 0 calc((100% - 16px) / 2.85);
  max-width: 170px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}

.tg-card:hover {
  color: #fff;
  text-decoration: none;
}

.tg-card.tg-red { --glow: var(--tg-red); }
.tg-card.tg-gold { --glow: var(--tg-gold); }

.tg-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--glow);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--glow) 35%, transparent), #111 75%);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--glow) 40%, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tg-card:hover .tg-card-img {
  transform: translateY(-2px);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--glow) 40%, transparent), 0 0 14px color-mix(in srgb, var(--glow) 45%, transparent);
}

.tg-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tg-card-name {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* promotion page */
#promotion {
  display: none;
}




/* bottom nav */
.tg-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 1020;
  width: calc(100% - 24px);
  max-width: 480px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(40, 38, 44, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.tg-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: #c9c7cf;
  font-size: 11px;
  cursor: pointer;
}

.tg-nav-item:hover,
.tg-nav-item:focus {
  color: #fff;
  text-decoration: none;
  outline: none;
}

.tg-nav-item.active {
  color: #fff;
}

.tg-nav-home.active {
  flex: none;
  width: 68px;
  height: 68px;
  margin-top: -14px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  box-shadow: 0 4px 18px rgba(139, 27, 255, 0.55);
  font-weight: 700;
}

body.tg-body footer {
  margin: 24px 0 0;
  color: #6e6c75;
}

/* tablet */
@media (min-width: 768px) {
  .tg-wrap {
    max-width: 960px;
    padding: 0 24px;
  }

  .tg-row-wrap {
    margin: 0 -24px;
  }

  .tg-row {
    gap: 12px;
    padding: 0 24px 4px;
    scroll-padding: 0 24px;
  }

  .tg-card {
    flex-basis: calc((100% - 48px) / 5);
    max-width: none;
  }

  .tg-bonus-bar,
  .tg-gift {
    height: 40px;
  }

  .tg-gift {
    width: 40px;
  }
}

/* desktop: header navigation replaces the bottom bar */
@media (min-width: 992px) {
  body.tg-body {
    padding-bottom: 0;
  }

  .tg-wrap {
    max-width: 1240px;
    padding: 0 32px;
  }

  .tg-header {
    border-bottom: 1px solid var(--tg-border);
  }

  .tg-header-inner {
    height: 76px;
  }

  .tg-logo {
    font-size: 32px;
  }

  .tg-top-nav {
    display: flex !important;
    gap: 6px;
    margin-left: 48px;
    margin-right: auto;
  }

  .tg-top-link {
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--tg-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
  }

  .tg-top-link:hover,
  .tg-top-link:focus {
    color: #fff;
    outline: none;
  }

  .tg-top-link.active {
    color: #fff;
    background: #2a0a4d;
    box-shadow: inset 0 0 0 1.5px var(--tg-purple);
  }

  .tg-header-actions {
    gap: 12px;
  }

  .tg-header .btn-language {
    width: 34px;
    height: 34px;
  }

  .tg-btn {
    height: 42px;
    padding: 0 26px;
    font-size: 15px;
  }

  .tg-banner {
    margin-top: 24px;
    border-radius: 20px;
  }

  .tg-bonus {
    margin-top: 16px;
    gap: 14px;
  }

  .tg-bonus-bar,
  .tg-gift {
    height: 46px;
  }

  .tg-gift {
    width: 46px;
  }

  .tg-bonus-track span {
    font-size: 16px;
  }

  .tg-section {
    margin-top: 40px;
  }

  .tg-section-head {
    margin-bottom: 16px;
  }

  .tg-section-head h2 {
    font-size: 26px;
  }


  .tg-row-wrap {
    margin: 0;
  }

  .tg-row {
    gap: 16px;
    padding: 0 0 4px;
    scroll-padding: 0;
  }

  .tg-card {
    flex-basis: calc((100% - 96px) / 7);
  }

  .tg-card-name {
    margin-top: 10px;
    font-size: 15px;
  }

  .tg-row-prev,
  .tg-row-next {
    display: flex !important;
    width: 42px;
    height: 42px;
    top: calc(50% - 16px);
    background: rgba(28, 27, 32, 0.9);
    border: 1px solid var(--tg-border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transition: background 0.15s;
  }

  .tg-row-prev:hover,
  .tg-row-next:hover {
    background: var(--tg-purple);
  }

  .tg-row-prev {
    left: -20px;
    right: auto;
  }

  .tg-row-next {
    right: -20px;
  }



  .tg-bottom-nav {
    display: none;
  }

  body.tg-body footer {
    margin: 48px 0 24px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .tg-logo {
    font-size: 22px;
  }

  .tg-header-actions {
    gap: 6px;
  }

  .tg-header .btn-language {
    width: 26px;
    height: 26px;
  }

  .tg-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* arrows only appear when the row has more cards in that direction (set by tgUpdateArrows) */
.tg-row-wrap:not(.can-prev) .tg-row-prev,
.tg-row-wrap:not(.can-next) .tg-row-next {
  display: none !important;
}

/* mouse drag-to-scroll (tgDragScroll) */
.tg-row {
  cursor: grab;
}

.tg-row.tg-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.tg-card,
.tg-card img {
  -webkit-user-drag: none;
  user-select: none;
}

/* site footer */
.tg-footer {
  position: relative;
  margin-top: 56px;
  padding: 40px 0 24px;
  background: linear-gradient(180deg, #15121c 0%, #0b0a0e 100%);
  color: var(--tg-muted);
}

.tg-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tg-purple) 20%, var(--tg-purple-2) 50%, var(--tg-purple) 80%, transparent);
  box-shadow: 0 0 16px rgba(139, 27, 255, 0.6);
}

.tg-footer h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.tg-footer-grid {
  display: grid;
  gap: 32px;
}

.tg-footer-brand .tg-logo {
  display: inline-block;
  font-size: 28px;
}

.tg-footer-brand p {
  margin: 12px 0 18px;
  font-size: 14px;
  line-height: 1.7;
}

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

.tg-social a,
.tg-phone {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--tg-surface);
  border: 1px solid var(--tg-border);
  transition: border-color 0.15s, background 0.15s;
}

.tg-social a {
  width: 40px;
}

.tg-social a img {
  width: 20px;
  height: 20px;
}

.tg-phone {
  gap: 8px;
  padding: 0 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tg-social a:hover,
.tg-phone:hover {
  border-color: var(--tg-purple);
  background: #2a0a4d;
}

.tg-phone:focus,
.tg-chip:focus {
  outline: none;
}

.tg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tg-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--tg-purple);
  background: #2a0a4d;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.tg-chip:hover {
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  transform: translateY(-1px);
}

.tg-pay {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tg-pay-item {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--tg-border);
  background: #fff;
}

.tg-pay-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tg-footer-providers {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--tg-border);
}

.tg-providers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
}

.tg-provider {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 10px;
  background: var(--tg-surface);
  border: 1px solid var(--tg-border);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tg-provider img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1) brightness(1.3);
  opacity: 0.7;
  transition: filter 0.2s, opacity 0.2s;
}

.tg-provider:hover {
  border-color: var(--tg-purple);
  box-shadow: 0 0 12px rgba(139, 27, 255, 0.35);
}

.tg-provider:hover img {
  filter: none;
  opacity: 1;
}

.tg-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--tg-border);
  font-size: 13px;
}


@media (min-width: 768px) {
  .tg-footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 48px;
  }
}

@media (min-width: 992px) {
  .tg-footer {
    margin-top: 72px;
    padding-top: 56px;
  }

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

  .tg-provider {
    height: 60px;
  }
}

/* ---------- popup (login / register / contact) ---------- */
.modal-backdrop.show {
  opacity: 0.75;
}

#modal.tg-modal .modal-dialog {
  max-width: 400px;
  padding: 0 8px;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body {
  padding: 28px 22px 24px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(139, 27, 255, 0.28) 0%, transparent 60%),
    #131218;
  border: 1.5px solid rgba(139, 27, 255, 0.55);
  box-shadow: 0 0 40px rgba(139, 27, 255, 0.35), 0 20px 50px rgba(0, 0, 0, 0.6);
  color: #fff;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  transform: none;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-modal-head {
  text-align: center;
  margin-bottom: 22px;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-modal-head .tg-logo {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 26px;
  cursor: default;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-modal-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--tg-muted);
}

/* close / back buttons */
#modal.tg-modal .modal-dialog .modal-content .modal-body button.btn-close,
#modal.tg-modal .modal-dialog .modal-content .modal-body button.btn-back {
  top: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) center / 14px no-repeat;
  border: 1px solid var(--tg-border);
  transition: background-color 0.15s, border-color 0.15s;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body button.btn-close {
  left: auto;
  right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

#modal.tg-modal .modal-dialog .modal-content .modal-body button.btn-back {
  left: 14px;
  right: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E");
}

#modal.tg-modal .modal-dialog .modal-content .modal-body button.btn-close:hover,
#modal.tg-modal .modal-dialog .modal-content .modal-body button.btn-back:hover {
  background-color: var(--tg-purple);
  border-color: var(--tg-purple);
}

/* fields */
#modal.tg-modal .modal-dialog .modal-content .modal-body label {
  margin-bottom: 6px !important;
  font-size: 13px;
  font-weight: 600;
  color: #d9d7de !important;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .username input,
#modal.tg-modal .modal-dialog .modal-content .modal-body .password input,
#modal.tg-modal .modal-dialog .modal-content .modal-body input.numberonly {
  height: 50px;
  border-radius: 14px !important;
  border: 1.5px solid var(--tg-border);
  background: #1c1b22;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .username input:focus,
#modal.tg-modal .modal-dialog .modal-content .modal-body .password input:focus,
#modal.tg-modal .modal-dialog .modal-content .modal-body input.numberonly:focus {
  border-color: var(--tg-purple);
  background: #1c1b22;
  box-shadow: 0 0 0 3px rgba(139, 27, 255, 0.25);
  outline: none;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .username input::placeholder,
#modal.tg-modal .modal-dialog .modal-content .modal-body .password input::placeholder {
  color: #6e6c75;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .username input.error,
#modal.tg-modal .modal-dialog .modal-content .modal-body .password input.error {
  border-color: var(--tg-red);
}

#modal.tg-modal .modal-dialog .modal-content .modal-body #login-form .left-icon {
  top: 41px;
  width: 20px;
  opacity: 0.75;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body #login-form .password .right-icon {
  top: 40px;
  color: var(--tg-muted) !important;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body #login-form .password .eye-on {
  color: var(--tg-purple-2) !important;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body #login-user-error,
#modal.tg-modal .modal-dialog .modal-content .modal-body #login-pass-error,
#modal.tg-modal .modal-dialog .modal-content .modal-body [id^="register-"][id$="-error"] {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #ff6b6b;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .password.mt-2 {
  margin-top: 14px !important;
}

/* forgot password */
#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-forgot {
  margin: 10px 0 20px;
  text-align: right;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-forgot .btn-forgot-password {
  height: auto;
  padding: 0 !important;
  border: 0;
  font-size: 13px;
  color: var(--tg-purple-2) !important;
  text-decoration: none;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-forgot .btn-forgot-password:hover {
  color: #fff !important;
  text-decoration: underline;
}

/* primary buttons */
#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-login1,
#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-next,
#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-forgot-next {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px !important;
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  box-shadow: 0 6px 20px rgba(139, 27, 255, 0.45);
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  transition: filter 0.15s, transform 0.15s;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-login1:hover,
#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-next:hover,
#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-forgot-next:hover {
  filter: brightness(1.12);
  color: #fff;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-login1:active,
#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-next:active,
#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-forgot-next:active {
  transform: scale(0.98);
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-login1:disabled {
  filter: grayscale(0.4) brightness(0.8);
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-login1 div,
#modal.tg-modal .modal-dialog .modal-content .modal-body .btn-next div {
  transform: none;
}

/* switch to register */
#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--tg-muted);
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-switch-link {
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tg-purple-2);
  font-weight: 700;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-switch-link:hover {
  color: #fff;
  background: none;
  text-decoration: underline;
}

/* register steps */
#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step .step div:first-of-type,
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step .step div:first-of-type {
  outline: 0 !important;
  border: 1.5px solid var(--tg-border) !important;
  background: #1c1b22 !important;
  color: var(--tg-muted) !important;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step .step.active div:first-of-type,
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step .step.active div:first-of-type,
#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step .step.passed div:first-of-type,
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step .step.passed div:first-of-type {
  border-color: var(--tg-purple) !important;
  background: #2a0a4d !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(139, 27, 255, 0.5);
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step .step div:nth-of-type(2),
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step .step div:nth-of-type(2) {
  font-size: 12px;
  color: var(--tg-muted) !important;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step .splitter,
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step .splitter {
  border-color: var(--tg-border) !important;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step .splitter.passed,
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step .splitter.passed {
  border-color: var(--tg-purple) !important;
}

/* contact */
#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-item {
  --c: #229ed9;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--tg-border);
  background: #1c1b22;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-item:hover {
  border-color: var(--c);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 35%, transparent);
  transform: translateY(-1px);
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-item:focus {
  outline: none;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-c-facebook { --c: #4267b2; }
#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-c-phone { --c: var(--tg-purple-2); }
#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-c-whatsapp { --c: #25d366; }

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--c);
  color: #fff;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-text b {
  font-size: 15px;
  font-weight: 700;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-text small {
  font-size: 13px;
  color: var(--tg-muted);
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-contact-go {
  flex: none;
  color: var(--tg-muted);
}

/* the old theme pads every element inside a link; undo that for our components */
.tg-header a *,
.tg-footer a *,
.tg-card *,
.tg-gift *,
.tg-bottom-nav a * {
  padding: 0 !important;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-switch-link {
  padding: 0 !important;
  margin-left: 4px !important;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step .step,
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step .step {
  width: 76px;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step,
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step {
  flex-wrap: nowrap;
  margin-left: 0;
  margin-right: 0;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .register-step .splitter,
#modal.tg-modal .modal-dialog .modal-content .modal-body .forgot-step .splitter {
  width: 28px;
  flex: none;
}

/* the old theme styles .btn-register green (incl. hover); keep our purple */
.tg-header .tg-btn-solid.btn-register,
.tg-header .tg-btn-solid.btn-register:hover,
.tg-header .tg-btn-solid.btn-register:focus,
.tg-header .tg-btn-solid.btn-register:active {
  padding: 0 14px !important;
  border: 2px solid var(--tg-purple-2);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  color: #fff;
  box-shadow: none;
}

.tg-header .tg-btn-solid.btn-register:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 14px rgba(139, 27, 255, 0.55);
}

@media (min-width: 992px) {
  .tg-header .tg-btn-solid.btn-register,
  .tg-header .tg-btn-solid.btn-register:hover,
  .tg-header .tg-btn-solid.btn-register:focus,
  .tg-header .tg-btn-solid.btn-register:active {
    padding: 0 26px !important;
  }
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-switch-link.btn-register,
#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-switch-link.btn-register:hover,
#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-switch-link.btn-register:focus {
  border: 0;
  background: none;
  box-shadow: none;
}

@media (max-width: 420px) {
  .tg-header .tg-btn-solid.btn-register,
  .tg-header .tg-btn-solid.btn-register:hover {
    padding: 0 10px !important;
  }
}

/* ---------- language popup ---------- */
.tg-lang-modal .modal-dialog {
  max-width: 340px;
  padding: 0 8px;
}

.tg-lang-modal .tg-lang-body {
  position: relative;
  padding: 24px 20px 20px;
  border-radius: 22px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(139, 27, 255, 0.28) 0%, transparent 60%),
    #131218;
  border: 1.5px solid rgba(139, 27, 255, 0.55);
  box-shadow: 0 0 40px rgba(139, 27, 255, 0.35), 0 20px 50px rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
}

.tg-lang-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tg-lang-globe {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  box-shadow: 0 4px 16px rgba(139, 27, 255, 0.5);
}

.tg-lang-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.tg-lang-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tg-lang-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--tg-border);
  background: #1c1b22;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.tg-lang-option:hover {
  border-color: var(--tg-purple);
  transform: translateY(-2px);
}

.tg-lang-option:focus {
  outline: none;
}

.tg-lang-option img {
  width: 64px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tg-lang-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: var(--tg-purple);
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}

.tg-lang-option.active {
  border-color: var(--tg-purple);
  background: #2a0a4d;
  box-shadow: 0 0 16px rgba(139, 27, 255, 0.45);
}

.tg-lang-option.active .tg-lang-check {
  opacity: 1;
  transform: scale(1);
}

.tg-lang-cancel {
  width: 100%;
  height: 46px;
  margin-top: 18px;
  border-radius: 14px;
  border: 1.5px solid var(--tg-border);
  background: transparent;
  color: var(--tg-muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tg-lang-cancel:hover {
  color: #fff;
  border-color: var(--tg-purple);
}

.tg-lang-cancel:focus {
  outline: none;
}

/* ---------- promotions page ---------- */
.tg-promo-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(180, 77, 255, 0.45) 0%, transparent 60%),
    linear-gradient(135deg, #2a0a4d 0%, #16121f 70%);
  border: 1.5px solid rgba(139, 27, 255, 0.55);
  box-shadow: 0 0 24px rgba(139, 27, 255, 0.25);
}

.tg-promo-hero-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  box-shadow: 0 4px 16px rgba(139, 27, 255, 0.5);
  color: #fff;
}

.tg-promo-hero h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.tg-promo-hero p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #cfc8dc;
}

.tg-promo-tabs {
  display: flex;
  gap: 8px;
  margin: 16px -16px 0;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tg-promo-tabs::-webkit-scrollbar {
  display: none;
}

.tg-promo-tab {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--tg-border);
  background: var(--tg-surface);
  color: var(--tg-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.tg-promo-tab:hover {
  color: #fff;
  border-color: var(--tg-purple);
}

.tg-promo-tab:focus {
  outline: none;
}

.tg-promo-tab.active {
  color: #fff;
  border-color: var(--tg-purple-2);
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  box-shadow: 0 4px 14px rgba(139, 27, 255, 0.4);
}

.tg-promo-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.tg-promo-card {
  display: flex;
  overflow: hidden;
  border-radius: 18px;
  border: 1.5px solid var(--tg-border);
  background: #17161c;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tg-promo-card:hover {
  border-color: var(--tg-purple);
  box-shadow: 0 0 20px rgba(139, 27, 255, 0.3);
  transform: translateY(-2px);
}

.tg-promo-img {
  flex: 0 0 40%;
  max-width: 40%;
}

.tg-promo-img img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.tg-promo-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 12px 12px 14px;
}

.tg-promo-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.tg-tag-new {
  color: #ffd66b;
  background: rgba(255, 197, 49, 0.14);
  border: 1px solid rgba(255, 197, 49, 0.45);
}

.tg-tag-deposit {
  color: #d6a8ff;
  background: rgba(180, 77, 255, 0.16);
  border: 1px solid rgba(180, 77, 255, 0.5);
}

.tg-tag-cashback {
  color: #6dffa0;
  background: rgba(54, 224, 92, 0.12);
  border: 1px solid rgba(54, 224, 92, 0.45);
}

.tg-promo-body h3 {
  margin: 8px 0 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
}

.tg-promo-body p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tg-muted);
}

.tg-promo-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tg-promo-tiers span {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #22202a;
  border: 1px solid var(--tg-border);
  line-height: 1.25;
}

.tg-promo-tiers small {
  font-size: 10.5px;
  color: var(--tg-muted);
}

.tg-promo-tiers b {
  font-size: 13px;
  color: var(--tg-green);
}

.tg-promo-claim {
  margin-top: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  margin-top: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--tg-purple-2) 0%, var(--tg-purple) 100%);
  box-shadow: 0 4px 14px rgba(139, 27, 255, 0.4);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: filter 0.15s;
}

.tg-promo-claim:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.15);
}

@media (min-width: 768px) {
  .tg-promo-tabs {
    margin: 20px 0 0;
    padding: 0;
  }

  .tg-promo-list {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

@media (min-width: 992px) {
  .tg-promo-hero {
    margin-top: 28px;
    padding: 26px 28px;
  }

  .tg-promo-hero h2 {
    font-size: 28px;
  }

  .tg-promo-hero p {
    font-size: 15px;
  }

  .tg-promo-body {
    padding: 18px 18px 18px 20px;
  }

  .tg-promo-body h3 {
    font-size: 19px;
  }

  .tg-promo-body p {
    font-size: 14px;
  }

  .tg-promo-claim {
    height: 44px;
  }
}

/* keep "Claim now" pinned to the bottom of each promo card */
.tg-promo-body > p,
.tg-promo-tiers {
  margin-bottom: 12px !important;
}

.tg-promo-claim {
  margin-top: auto !important;
}

/* image logo (assets/images/TOPGAME.png) */
.tg-logo img {
  display: block;
  height: 22px;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.tg-footer-brand .tg-logo img {
  height: 26px;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body .tg-modal-head .tg-logo img {
  height: 24px;
  margin: 0 auto;
}

@media (max-width: 420px) {
  .tg-logo img {
    height: 18px;
  }
}

@media (min-width: 992px) {
  .tg-header .tg-logo img {
    height: 28px;
  }
}

/* smaller login field icons (centred on the 50px inputs) */
#modal.tg-modal .modal-dialog .modal-content .modal-body #login-form .username .left-icon {
  width: 14px;
  top: 44px;
  left: 18px;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body #login-form .password .left-icon {
  width: 16px;
  top: 45px;
  left: 17px;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body #login-form .password .right-icon {
  top: 43px;
  font-size: 20px;
}

#modal.tg-modal .modal-dialog .modal-content .modal-body #login-form .username input,
#modal.tg-modal .modal-dialog .modal-content .modal-body #login-form .password input {
  padding-left: 44px;
}

/* keep the popups centred on phones (Bootstrap uses a fixed side margin below 576px) */
#modal.tg-modal .modal-dialog,
.tg-lang-modal .modal-dialog {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
