/* Disruptive UI overlay — visual only, does not change behavior */
:root {
  --d-purple: #625BF6;
  --d-purple-2: #7E77FF;
  --d-ink: #323338;
  --d-muted: #676879;
  --d-line: #EEF0F6;
  --d-bg: #F5F7FA;
  --d-card: #ffffff;
  --d-shadow: 0 8px 24px rgba(50, 51, 56, 0.08);
  --d-radius: 16px;
}

html {
  -webkit-text-size-adjust: 100%;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--d-bg);
  color: var(--d-ink);
}

body {
  background-image: none !important;
  user-select: auto !important;
  -webkit-user-select: auto !important;
}

::selection {
  background: rgba(98, 91, 246, 0.18);
}

#app {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  background: var(--d-bg);
  position: relative;
}

@media (min-width: 640px) {
  #app {
    width: 100%;
    max-width: 480px;
    box-shadow: 0 0 40px rgba(50, 51, 56, 0.08);
  }
}

/* Shared app header */
.modern-app-header-wrap {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(98, 91, 246, 0.08), 0 8px 24px rgba(50, 51, 56, 0.06) !important;
}

.modern-app-header {
  height: 64px !important;
  padding: 8px 16px !important;
}

.modern-app-header img.header-logo {
  height: 40px !important;
  max-height: 40px !important;
}

.modern-app-header .header-profile-avatar,
.modern-app-header .header-user-icon {
  width: 40px !important;
  height: 40px !important;
  box-shadow: 0 0 0 3px rgba(98, 91, 246, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modern-app-header .header-profile-container:hover .header-profile-avatar,
.modern-app-header .header-profile-container:hover .header-user-icon {
  transform: scale(1.04);
  box-shadow: 0 0 0 3px rgba(98, 91, 246, 0.22);
}

/* Shared footer */
.modern-footer-container {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.modern-footer {
  box-shadow: 0 -8px 28px rgba(98, 91, 246, 0.28) !important;
}

.footer-nav-item {
  gap: 2px;
}

.footer-center-btn {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(255, 255, 255, 0.22) !important;
}

.footer-spacer {
  height: calc(86px + env(safe-area-inset-bottom, 0px));
}

/* Inner page bars — edge-to-edge inside the 480px column */
.header,
.topbar,
.profile-header,
.inner-header,
.van-nav-bar {
  background: #fff !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--d-line) !important;
  max-width: 480px !important;
  margin: 0 auto !important;
  width: 100% !important;
  border-radius: 0 !important;
}

.header,
.topbar,
.profile-header,
.inner-header {
  min-height: 56px;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 16px !important;
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.topbar .title {
  flex: 1;
  text-align: center;
}

.back-btn,
.back,
.profile-back,
.van-nav-bar__arrow {
  width: 36px;
  height: 36px;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: #F3F4FF;
  color: var(--d-purple) !important;
  font-size: 18px !important;
}

.header-title,
.profile-header h1,
.inner-header-title,
.van-nav-bar__title,
.topbar .title,
.header .title {
  color: var(--d-ink) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

.user-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--d-purple);
  box-shadow: 0 0 0 3px rgba(98, 91, 246, 0.12);
  flex-shrink: 0;
}

.logo-container,
.levels-container .page-title {
  display: none !important;
}

.monday-logo,
.logo-container img.monday-logo {
  display: none !important;
}

/* Tabs */
.tabs {
  max-width: 480px;
  margin: 10px 16px 12px !important;
  background: #fff !important;
  border-bottom: none !important;
  padding: 5px !important;
  gap: 6px;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(50, 51, 56, 0.06);
  display: flex !important;
}

.tab {
  border-radius: 10px !important;
  border-bottom: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 10px 8px !important;
  flex: 1 1 0 !important;
  color: #676879 !important;
}

.tab.active {
  background: linear-gradient(135deg, var(--d-purple), var(--d-purple-2)) !important;
  color: #fff !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

.van-tabs__wrap,
.van-tabs__nav {
  background: transparent !important;
  overflow: visible !important;
}

.van-tabs__nav--line {
  max-width: 100%;
  margin: 10px 16px 6px !important;
  padding: 5px !important;
  background: #fff !important;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(50, 51, 56, 0.06);
  display: flex !important;
  width: auto !important;
  transform: none !important;
  gap: 4px;
}

.van-tabs__line {
  display: none !important;
}

.van-tab {
  border-radius: 10px !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  text-align: center;
  padding: 10px 6px !important;
  margin: 0 !important;
}

.van-tab--active {
  background: linear-gradient(135deg, var(--d-purple), var(--d-purple-2)) !important;
  color: #fff !important;
}

/* Cards / lists */
.history-item,
.record-card,
.level-card,
.section-card,
.contact-item,
.faq-item,
.section,
.terms-section {
  border-radius: var(--d-radius) !important;
  box-shadow: var(--d-shadow) !important;
}

.history-item,
.contact-item {
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.level-card:hover,
.menu-item:hover,
.contact-item:hover,
.profile-menu-item:hover,
.list-item:hover {
  transform: translateY(-2px);
}

.balance-card,
.wallet-card,
.profile-card,
.events-header,
.hero,
.hero-banner {
  box-shadow: 0 14px 32px rgba(98, 91, 246, 0.28) !important;
}

.submit-btn,
.login-btn,
.register-btn,
.record-submit-btn,
.btn-primary,
.cta .primary {
  background: linear-gradient(135deg, var(--d-purple), var(--d-purple-2)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 20px rgba(98, 91, 246, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.submit-btn:hover,
.login-btn:hover,
.register-btn:hover,
.btn-primary:hover,
.cta .primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(98, 91, 246, 0.4);
}

.submit-btn:active,
.login-btn:active,
.register-btn:active {
  transform: translateY(0);
}

/* Forms */
.page input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.form-group input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.form-container input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.form-card input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.section-card input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.section-card select,
.withdraw-container input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.register-container input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.withdrawal-details-form input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.withdrawal-details-form select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
select.input-field,
textarea {
  border-radius: 12px !important;
  border: 1px solid #E5E7EB !important;
  background: #fff !important;
  min-height: 46px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.page input:not([type="radio"]):not([type="checkbox"]):focus,
.form-group input:not([type="radio"]):not([type="checkbox"]):focus,
.form-container input:not([type="radio"]):not([type="checkbox"]):focus,
.form-card input:not([type="radio"]):not([type="checkbox"]):focus,
.section-card input:not([type="radio"]):not([type="checkbox"]):focus,
.section-card select:focus,
.register-container input:not([type="radio"]):not([type="checkbox"]):focus,
.withdrawal-details-form input:not([type="radio"]):not([type="checkbox"]):focus,
.withdrawal-details-form select:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select.input-field:focus {
  outline: none !important;
  border-color: var(--d-purple) !important;
  box-shadow: 0 0 0 4px rgba(98, 91, 246, 0.14) !important;
}

/* Login / register */
.page {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(98, 91, 246, 0.12);
  padding-bottom: 28px !important;
}

.page .footer {
  position: static !important;
  margin-top: 20px;
}

body:has(.page),
body:has(.register-container) {
  background:
    radial-gradient(900px 420px at 50% -8%, #E0E7FF 0%, transparent 60%),
    var(--d-bg) !important;
}

.page .login-btn {
  margin-top: 8px;
}

.logo-top img {
  filter: drop-shadow(0 8px 16px rgba(98, 91, 246, 0.18));
}

/* Home */
.menu-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.menu-item:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.notice-wrap marquee {
  border: 1px solid rgba(98, 91, 246, 0.08);
}

#certificateBox {
  backdrop-filter: blur(8px);
}

#certificateBox img {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.close-btn {
  background: #fff !important;
  color: #111 !important;
  width: 36px !important;
  height: 36px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  font-size: 22px;
  line-height: 1;
}

/* About / FAQ / terms */
.page-header h1,
.faq-header h1,
.terms-header {
  color: var(--d-purple) !important;
  font-size: 22px !important;
  letter-spacing: -0.03em;
}

.faq-header {
  margin-bottom: 22px !important;
  text-align: left !important;
}

.section-title,
.faq-section-title,
.section-header {
  color: #4338CA !important;
}

.stat strong,
.value strong {
  color: var(--d-purple) !important;
}

.terms-container {
  border-color: rgba(98, 91, 246, 0.12) !important;
}

.terms-container::before {
  background: linear-gradient(to bottom, var(--d-purple), var(--d-purple-2)) !important;
}

.cta .secondary {
  border-radius: 999px !important;
}

/* Records */
.record-status {
  border-radius: 999px !important;
  padding: 4px 10px !important;
}

/* Levels */
.levels-container,
.container {
  max-width: 480px;
}

.level-card.current {
  background: linear-gradient(180deg, #F4F3FF 0%, #fff 100%);
}

/* Wallet / password */
.form-card {
  border: 1px solid rgba(98, 91, 246, 0.06);
}

/* Contact / ads / withdrawal-details (old desktop layout) */
.page-body {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--d-bg);
  padding-bottom: 90px;
}

.inner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px !important;
}

.contact-containers,
.withdrawal-details-container,
.advertisement-container {
  padding: 16px !important;
}

.contact-item {
  padding: 16px !important;
  gap: 14px !important;
  border: 1px solid var(--d-line);
}

.contact-title {
  font-weight: 600;
  color: var(--d-ink);
  line-height: 1.4;
}

.withdrawal-details-notice {
  background: #EEF2FF !important;
  color: #3730A3 !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  border: 1px solid #E0E7FF;
  line-height: 1.5;
}

@media screen and (min-width: 1200px) {
  body {
    padding: 0 !important;
  }
  .inner-header,
  .footer-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Activity center — force mobile app width */
.hero-section {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 18px 32px !important;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(135deg, var(--d-purple) 0%, var(--d-purple-2) 100%) !important;
}

.hero-title {
  font-size: 24px !important;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 14px !important;
  margin-bottom: 20px !important;
}

.hero-section .container,
.main-content .container {
  max-width: 480px !important;
  padding: 0 4px !important;
}

.stats-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-top: 18px !important;
}

.stat-number {
  font-size: 22px !important;
}

.main-content {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 0 24px;
}

.activity-grid {
  grid-template-columns: 1fr !important;
}

.activity-card,
.activity-item,
.system-info {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--d-shadow);
}

.main-content ~ .footer {
  display: none;
}

/* Certificate images */
.cert-wrap {
  padding: 18px 16px 24px;
}

.cert-card {
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 14px;
  box-shadow: var(--d-shadow);
}

.cert-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Empty states */
.empty-state {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--d-shadow);
}

/* 404 / password help */
.box {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--d-shadow);
  max-width: 420px;
  width: calc(100% - 32px);
}

.box a {
  border-radius: 999px;
}

/* Home polish */
.notice-wrap {
  padding: 12px 18px 4px;
}
.notice-bar,
.notice-wrap .notice-bar {
  background: #fff;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 13px;
  color: #676879;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(98, 91, 246, 0.08);
}
.vip-grid {
  padding-bottom: 110px !important;
}
.menu-item img[src*="certificate"] {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 7px;
}

/* Records */
.record-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 16px 8px;
  padding: 5px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(50, 51, 56, 0.06);
}
.record-tabs .van-tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #676879;
  cursor: pointer;
}
.record-tabs .van-tab--active {
  background: linear-gradient(135deg, var(--d-purple), var(--d-purple-2));
  color: #fff !important;
}
.record-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.record-date {
  font-variant-numeric: tabular-nums;
}

/* Start: drop duplicate app header, keep task grid above the nav */
.page-start .modern-app-header-wrap {
  display: none !important;
}
.page-start .content-scroll-wrapper,
.page-start .start-copy {
  padding-bottom: 28px !important;
}
.page-start .start-task-grid {
  margin-bottom: 72px !important;
}

/* Level icons that failed to load still keep a rounded tile */
.level-icon {
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
}

/* Keep content clear of the bottom nav */
.wrap,
.levels-container,
.container,
.withdraw-container,
.events-container,
.cert-wrap,
.px-4.pt-4.pb-24 {
  padding-bottom: 100px !important;
}

.max-btn,
.max-btn:hover,
.max-btn:active {
  transform: translateY(-50%) !important;
}

html, body {
  margin: 0 !important;
}

.logo-container {
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Activity / events */
.events-header,
.hero-section {
  border-radius: 0 !important;
  margin: 0 auto !important;
  box-shadow: none !important;
  max-width: 480px;
}

.tab-container {
  display: flex !important;
  gap: 6px;
  margin: 0 0 16px !important;
  padding: 5px !important;
  background: #fff !important;
  border-radius: 14px !important;
  border-bottom: none !important;
  box-shadow: 0 2px 8px rgba(50, 51, 56, 0.06);
}

.tab-button {
  flex: 1;
  text-align: center;
  border-radius: 10px !important;
  padding: 10px 8px !important;
  color: #676879 !important;
  background: transparent !important;
}

.tab-button.active {
  background: linear-gradient(135deg, var(--d-purple), var(--d-purple-2)) !important;
  color: #fff !important;
}

.tab-button.active * {
  color: #fff !important;
}

.tab-button.active::after {
  display: none !important;
}

/* Contact */
.inner-header-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--d-ink) !important;
  flex: 1;
  text-align: center;
  margin-right: 36px;
}

.page-body {
  background: var(--d-bg) !important;
}

.contact-item {
  border-radius: 16px !important;
  background: #fff !important;
}

/* FAQ */
.faq-question:hover {
  background: #F8F7FF;
}

.faq-header {
  text-align: left !important;
  margin-bottom: 18px !important;
}

/* Terms accent stays inside the card */
.terms-container {
  overflow: hidden !important;
}

.terms-header {
  font-size: 22px !important;
  text-align: left !important;
  margin-bottom: 16px !important;
}
