:root {
  --header: #1b2538;
  --page: #eef3fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #8e9eb4;
  --line: #dbe2ed;
  --blue: #3b82f6;
  --orange: #f59e0b;
  --orange-strong: #ed8a00;
  --danger: #c74455;
  --shadow: 0 14px 36px rgba(45, 58, 83, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background: var(--page);
  font-family: Arial, "Microsoft JhengHei", "PingFang TC", sans-serif;
}

button,
select {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.28);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

[v-cloak] {
  display: none;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: relative;
  z-index: 30;
  height: 88px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--header);
  box-shadow: 0 10px 25px rgba(10, 18, 32, 0.22);
}

.brand {
  height: 60px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  cursor: pointer;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.8);
}

.brand-copy {
  display: grid;
  gap: 4px;
  text-align: left;
}

.brand-copy strong {
  font-size: 17px;
}

.brand-copy small {
  color: var(--blue);
  font-size: 11px;
}

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

.language-control,
.user-control {
  position: relative;
}

.user-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-button {
  min-width: 155px;
  height: 46px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  background: rgba(16, 25, 41, 0.58);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  cursor: pointer;
}

.language-button b,
.language-menu b {
  color: var(--orange);
}

.language-button i {
  margin-left: auto;
  border-top: 6px solid #8f98a8;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}

.language-menu,
.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  padding: 10px;
  background: #252f41;
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(7, 13, 24, 0.28);
}

.language-menu {
  width: 210px;
}

.language-menu button {
  width: 100%;
  padding: 10px;
  display: flex;
  gap: 10px;
  color: #e8ecf3;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.language-menu button:hover,
.language-menu button.active {
  background: rgba(255, 255, 255, 0.08);
}

.user-button {
  width: 45px;
  height: 45px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(103, 75, 255, 0.65);
  cursor: pointer;
}

.user-avatar {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.user-menu {
  width: 215px;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.user-menu small {
  color: #8e96a6;
}

.user-menu strong {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.user-menu button {
  height: 43px;
  color: #fff;
  background: rgba(139, 42, 57, 0.3);
  border: 1px solid rgba(231, 65, 87, 0.55);
  border-radius: 8px;
  cursor: pointer;
}

.primary-nav {
  height: 50px;
  padding-left: max(calc((100vw - 1210px) / 2), 20px);
  display: flex;
  align-items: stretch;
  gap: 30px;
  color: #9ca4b3;
  background: var(--header);
}

.primary-nav button {
  min-width: 90px;
  color: inherit;
  background: transparent;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.primary-nav button.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.page-content {
  min-height: calc(100vh - 88px);
}

.page-content.games-page {
  background: #fff;
}

.content-width {
  width: min(1210px, calc(100% - 36px));
  margin: 0 auto;
}

.login-view {
  min-height: calc(100vh - 88px);
  display: grid;
  place-items: center;
  padding: 40px 18px;
  background-color: #eaf7fe;
  background-image: url(/resource/overseas/images/recharge_center_v2/login-background.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.auth-loading {
  width: 52px;
  height: 52px;
  border: 5px solid rgba(255, 255, 255, 0.72);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: auth-loading-spin 800ms linear infinite;
}

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

.login-card {
  width: min(440px, 100%);
  min-height: 580px;
  padding: 40px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-logo {
  width: 190px;
  min-height: 190px;
  display: grid;
  place-items: center;
}

.login-logo img {
  max-height: 190px;
}

.channel-login {
  margin-top: 42px;
  display: flex;
  gap: 28px;
}

.channel-login button {
  width: 82px;
  height: 82px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 58%;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  box-shadow: 0 9px 18px rgba(41, 54, 76, 0.12);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.channel-login button:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
}

.channel-login .facebook {
  background-image: url(/resource/overseas/images/recharge_center_v2/facebook.png);
}

.channel-login .google {
  background-image: url(/resource/overseas/images/recharge_center_v2/google.png);
}

.channel-login .apple {
  background-image: url(/resource/overseas/images/recharge_center_v2/apple.png);
}

.login-card > p {
  margin: 42px 0 24px;
  color: #6a6a6a;
}

.email-login {
  width: 100%;
}

.email-login-toggle {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #526176;
  background: #fff;
  border: 1px solid #dbe2ed;
  border-radius: 10px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.email-login-toggle:hover,
.email-login-toggle:focus-visible,
.email-login-toggle[aria-expanded="true"] {
  color: var(--orange-strong);
  background: #fffaf1;
  border-color: var(--orange);
}

.email-toggle-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.email-login-toggle[aria-expanded="true"] .email-toggle-chevron {
  transform: translateY(2px) rotate(225deg);
}

.email-login-form {
  width: 100%;
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.email-login-form[hidden] {
  display: none;
}

.email-field {
  min-width: 0;
}

.email-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid #dbe2ed;
  border-radius: 10px;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.email-field input::placeholder {
  color: #a3adbd;
}

.email-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.email-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 10px;
}

.email-send-captcha,
.email-login-submit {
  min-height: 48px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.email-send-captcha {
  padding: 0 10px;
  color: #2383d8;
  background: #f2f8ff;
  border: 1px solid #bcdcff;
  font-size: 13px;
}

.email-send-captcha:hover:not(:disabled),
.email-send-captcha:focus-visible:not(:disabled) {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.email-login-submit {
  width: 100%;
  color: #fff;
  background: var(--orange);
  border: 1px solid var(--orange);
  font-weight: 700;
}

.email-login-submit:hover:not(:disabled),
.email-login-submit:focus-visible:not(:disabled) {
  background: var(--orange-strong);
  border-color: var(--orange-strong);
}

.email-send-captcha:disabled,
.email-login-submit:disabled {
  color: #98a3b4;
  background: #edf1f6;
  border-color: #dbe2ed;
  cursor: not-allowed;
}

.email-feedback {
  min-height: 18px;
  margin: 0;
  color: #738198;
  font-size: 12px;
  line-height: 18px;
  text-align: left;
}

.email-feedback.is-error {
  color: var(--danger);
}

.email-feedback.is-success {
  color: #18845a;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-links {
  margin-top: 28px;
  display: flex;
  gap: 42px;
}

.login-links a {
  padding: 5px 0;
  color: #219aeb;
  background: transparent;
  border-bottom: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.login-links a:hover {
  border-bottom-color: currentColor;
}

.games-view {
  padding: 28px 0 70px;
  background: #fff;
}

.carousel {
  position: relative;
}

.carousel-slide {
  width: 100%;
  aspect-ratio: 1174 / 514;
  padding: 0;
  overflow: hidden;
  background: #e7edf5;
  border-radius: 20px;
  cursor: pointer;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 42px;
  height: 42px;
  color: #748094;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(34, 45, 64, 0.16);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 160ms ease, background-color 160ms ease;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  color: #fff;
  background: var(--orange);
}

.carousel-arrow.previous {
  left: 16px;
}

.carousel-arrow.next {
  right: 16px;
}

.carousel-dots {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  background: #d7dde7;
  border-radius: 10px;
  cursor: pointer;
}

.carousel-dots button.active {
  width: 28px;
  background: var(--orange);
}

.games-view h1 {
  margin: 0 0 22px;
  font-size: 22px;
}

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

.game-card {
  aspect-ratio: 267 / 338;
  padding: 0;
  overflow: visible;
  color: var(--text);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: transform 160ms ease;
}

.game-card:hover {
  transform: translateY(-5px);
}

.game-card > img {
  width: 100%;
  height: 100%;
  aspect-ratio: 267 / 338;
  object-fit: contain;
  background: transparent;
}

.recharge-view {
  padding: 18px 0 150px;
}

.account-line {
  margin: 0 0 16px;
  color: #8d929a;
}

.account-line strong {
  color: var(--text);
}

.surface {
  padding: 38px 40px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.surface + .surface {
  margin-top: 24px;
}

.surface h2 {
  margin: 0 0 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
}

.surface h2 i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #3ba0f5;
  border-radius: 50%;
  font-size: 14px;
  font-style: normal;
}

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

.select-grid label {
  display: grid;
  gap: 8px;
}

.select-grid label > span {
  color: #8e9eb4;
  font-size: 13px;
}

.select-grid select {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid #d4dce8;
  border-radius: 10px;
}

.select-grid select:disabled {
  color: #9199a8;
  background: #f7f8fa;
}

.role-preview {
  min-height: 76px;
  margin-top: 18px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff8ec;
  border: 1px solid #f5d9a4;
  border-radius: 12px;
}

.role-preview > img,
.role-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: #fff;
  background: var(--orange);
  border-radius: 11px;
}

.role-preview > div {
  display: grid;
  gap: 6px;
}

.role-preview small {
  color: #b9bdc4;
}

.role-preview > b {
  margin-left: auto;
  padding: 9px 16px;
  color: #fff;
  background: var(--orange);
  border-radius: 20px;
  font-size: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 22px;
  padding: 8px 10px 12px;
}

.product-card {
  position: relative;
  z-index: 1;
  min-width: 0;
  aspect-ratio: 225 / 232;
  padding: 0 10px 8px;
  display: grid;
  grid-template-rows: 57% 20% 23%;
  overflow: visible;
  color: var(--text);
  background: url(/resource/overseas/images/recharge_center_v2/product-option-background.png) center / 100% 100% no-repeat;
  border: 0;
  border-radius: 15px;
  box-shadow: none;
  transform: scale(1);
  transform-origin: center;
  transition: transform 180ms ease, filter 180ms ease;
  cursor: pointer;
}

.product-card:hover,
.product-card:focus-visible,
.product-card.selected {
  z-index: 3;
  transform: scale(1.06);
  filter: drop-shadow(0 7px 8px rgba(245, 158, 11, 0.28));
}

.product-card em {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 5px;
  padding: 5px 8px;
  color: #fff;
  background: var(--orange);
  border-radius: 12px 0 12px 0;
  font-size: 12px;
  font-style: normal;
}

.product-art {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
}

.product-art img {
  display: block;
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
}

.product-art > span {
  color: #7ac4e8;
  font-size: 54px;
}

.product-quantity {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.product-quantity img {
  width: 28px;
  height: 22px;
  flex: 0 0 auto;
  object-fit: contain;
}

.product-price {
  width: 100%;
  height: 36px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(90deg, #ffb317, #ff9332);
  border-radius: 20px;
  font-size: 19px;
  white-space: nowrap;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.checkout-bar {
  position: fixed;
  z-index: 25;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 112px;
  padding: 18px max(calc((100vw - 1210px) / 2), 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 22px rgba(34, 48, 70, 0.08);
}

.checkout-bar > div {
  display: grid;
  gap: 4px;
}

.checkout-bar small,
.checkout-bar > div > span {
  color: var(--muted);
}

.checkout-bar strong {
  color: var(--orange-strong);
  font-size: 26px;
}

.checkout-bar button {
  width: 150px;
  height: 54px;
  color: #fff;
  background: var(--orange);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.3);
  cursor: pointer;
}

.checkout-bar button:disabled {
  color: #fff;
  background: #cdd3dd;
  box-shadow: none;
  cursor: not-allowed;
}

.guide-view {
  min-height: calc(100vh - 138px);
}

.guide-nav {
  height: 54px;
  padding-left: max(calc((100vw - 1210px) / 2), 18px);
  display: flex;
  gap: 18px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(35, 46, 65, 0.08);
}

.guide-nav button {
  padding: 0 18px;
  color: #627086;
  background: transparent;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.guide-nav button.active {
  color: var(--orange-strong);
  border-bottom-color: var(--orange);
}

.policy-layout {
  padding: 50px 0 80px;
}

.policy-heading {
  display: grid;
  place-items: center;
  gap: 16px;
}

.policy-logo {
  width: 190px;
  height: 130px;
  display: grid;
  place-items: center;
}

.policy-logo img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
}

.policy-heading h1 {
  margin: 0 0 34px;
  font-size: 30px;
}

.policy-heading h1:empty,
.guide-content-heading:empty {
  display: none;
}

.policy-card,
.guide-card {
  min-height: 430px;
  padding: 42px;
  color: #5c6a80;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  line-height: 1.9;
}

.policy-card {
  position: relative;
  overflow: hidden;
}

.policy-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--orange), var(--blue));
}

.guide-card {
  min-height: calc(100vh - 250px);
  margin-top: 20px;
}

.guide-content-heading {
  margin: 0 0 28px;
  color: var(--text);
  font-size: 28px;
}

.guide-rich-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.guide-rich-content p {
  margin: 0 0 18px;
}

.guide-rich-content p:last-child {
  margin-bottom: 0;
}

.guide-rich-content a {
  color: #1778d0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 960px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 18px;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: 70px;
    padding: 0 10px;
  }

  .brand {
    height: 48px;
    padding: 6px 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .brand-copy small,
  .language-button span {
    display: none;
  }

  .language-button {
    min-width: 64px;
  }

  .page-content {
    min-height: calc(100vh - 70px);
  }

  .login-card {
    min-height: 500px;
    padding: 30px 22px;
  }

  .channel-login {
    gap: 14px;
  }

  .channel-login button {
    width: 66px;
    height: 66px;
  }

  .email-captcha-row {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .email-send-captcha {
    font-size: 12px;
  }

  .primary-nav {
    height: 46px;
    padding-left: 12px;
    gap: 10px;
  }

  .games-view {
    padding-top: 16px;
  }

  .carousel-slide {
    border-radius: 12px;
  }

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

  .surface {
    padding: 24px 18px;
    border-radius: 14px;
  }

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

  .role-preview > b {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .product-quantity {
    gap: 4px;
    font-size: 12px;
  }

  .product-quantity img {
    width: 24px;
    height: 19px;
  }

  .product-price {
    height: 30px;
    font-size: 16px;
  }

  .checkout-bar {
    min-height: 92px;
    padding: 12px 16px;
  }

  .checkout-bar strong {
    font-size: 21px;
  }

  .checkout-bar button {
    width: 125px;
  }

  .guide-nav {
    padding: 0 8px;
    gap: 0;
    overflow-x: auto;
  }

  .guide-nav button {
    flex: 0 0 auto;
    padding: 0 12px;
  }

  .policy-layout {
    padding-top: 30px;
  }

  .policy-heading h1 {
    font-size: 24px;
    text-align: center;
  }

  .policy-card,
  .guide-card {
    padding: 24px 20px;
  }
}
