/* Bitget home-new overrides: the original page revealed media from JS; show it by default */
video { opacity: 1 !important; }
html { background: #070808; }

/* mobile: the source snapshot hides its hero below lg; show it */
@media (max-width: 1023px) {
  section.lt-lg\:hidden { display: flex !important; }
}

@media (max-width: 1023px) {
  /* hero: stack headline then sign-up card instead of two squeezed columns */
  div[class*="items-top"][class*="shrink-0"][class*="justify-between"] {
    flex-direction: column !important;
    margin-top: 28px !important;
    gap: 20px !important;
  }
  div[class*="items-top"][class*="shrink-0"][class*="justify-between"] > div { width: 100% !important; max-width: 100% !important; }
  /* heatmap needs more height on phones so tile labels don't collide */
  div[class*="min-h-[110px]"] { min-height: 300px !important; }
  body { padding-bottom: 72px; }
}
@media (max-width: 768px) {
  body[data-has-mobile-nav] { padding-bottom: 76px; }
}

@media (max-width: 1023px) {
  /* social sign-in row under the form: one tidy row instead of a tall column */
  .eRh1W5AloEcBZH_GOZQk { width: 100% !important; height: auto !important; flex-direction: row !important; align-items: center !important; gap: 18px !important; flex-wrap: wrap; }
  .fGCiEAbHqNJxSTa0z5R1 { width: auto !important; height: auto !important; flex-direction: row !important; flex-wrap: wrap; gap: 18px !important; }
}

@media (max-width: 1023px) {
  div[class*="tl-gap-[12px]"][class*="tl-w-[340px]"] { flex-direction: row !important; flex-wrap: wrap; width: 100% !important; justify-content: flex-start !important; gap: 12px 22px !important; height: auto !important; }
  div[class*="tl-gap-[12px]"][class*="tl-w-[340px]"] > * { width: auto !important; }
  .fGCiEAbHqNJxSTa0z5R1, .eRh1W5AloEcBZH_GOZQk { height: auto !important; }
}

@media (max-width: 1023px) {
  /* keep white hero text readable over the bright frames of the background video */
  section.lt-lg\:hidden video { filter: brightness(.55) contrast(1.05); }
}

@media (max-width: 1023px) {
  html, body { overflow-x: hidden; }
  /* header: keep Log in / Sign up / search / support / bell, drop the rest so it fits */
  .micro-action > :nth-child(n+6):not(.bg-burger) { display: none !important; }
  .micro-action { max-width: 100%; overflow: hidden; }
}

/* Hero heatmap: video first, heatmap fades in afterwards (JS adds .hm-ready).
   If JS is slow/blocked the animation fallback still reveals it after 50s. */
div[class*="min-h-[110px]"][class*="max-h-[500px]"] {
  opacity: 0;
  transition: opacity .9s ease;
  animation: hmFallback .9s ease 50s forwards;
}
div[class*="min-h-[110px]"][class*="max-h-[500px]"].hm-ready { opacity: 1; }
@keyframes hmFallback { to { opacity: 1; } }

/* ---- Security accordion (3 cards, click to expand) ---- */
.bgs{display:flex;height:424px;border:1px solid rgba(255,255,255,.24);overflow:hidden;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.bgs-card{position:relative;flex:1;min-width:0;cursor:pointer;border-inline-start:1px solid rgba(255,255,255,.24);background:rgba(7,8,8,.08);transition:flex .7s cubic-bezier(.16,1,.3,1),background-color .4s}
.bgs-card:first-child{border-inline-start:0}
.bgs-card.is-active{flex:2.4;background:rgba(217,217,217,.1)}
.bgs-closed,.bgs-open{position:absolute;inset:0;padding:32px;box-sizing:border-box;transition:opacity .5s ease}
.bgs-closed{display:flex;flex-direction:column;justify-content:space-between}
.bgs-closed img{width:52px;height:52px}
.bgs-closed h3,.bgs-body h3{margin:0;font-size:28px;font-weight:600;line-height:34px;color:#f4f5f7}
.bgs-open{display:flex;gap:32px;opacity:0;pointer-events:none;visibility:hidden}
.bgs-card.is-active .bgs-closed{opacity:0;visibility:hidden}
.bgs-card.is-active .bgs-open{opacity:1;pointer-events:auto;visibility:visible;transition-delay:.2s}
.bgs-shot{flex:none;width:252px;height:360px;overflow:hidden;background:#070808}
.bgs-shot img{display:block;width:100%;height:100%;object-fit:cover}
.bgs-body{display:flex;flex-direction:column;justify-content:space-between;min-width:0;flex:1}
.bgs-body ul{list-style:none;margin:24px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.bgs-body li{font-size:14px;line-height:22px;color:rgba(255,255,255,.6)}
.bgs-more{display:inline-flex;gap:8px;align-items:center;color:rgba(255,255,255,.6);font-size:14px;text-decoration:none}
.bgs-more:hover{color:#f4f5f7}
@media (max-width:1279px){.bgs{height:388px}.bgs-closed h3,.bgs-body h3{font-size:22px;line-height:28px}.bgs-shot{width:200px;height:340px}}

/* ---- Tools links row ---- */
.bgt-links{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 40px}
.bgt-links a{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 8px;border-radius:6px;text-decoration:none;font-size:16px;color:var(--ds-color-text-tertiary,#8b8f97);transition:color .2s}
.bgt-links a:hover{color:var(--ds-color-text-primary,#f4f5f7)}
.bgt-links svg{width:32px;height:32px}
.bgt-links i{font-style:normal;color:var(--ds-color-text-disabled,#4a4d54);user-select:none}
@media (max-width:767px){.bgt-links{gap:4px 16px}.bgt-links svg{width:26px;height:26px}}



/* ---- Markets on phones/tablets: same showcase as desktop, stacked vertically ---- */
.bgm-pills{display:none}
@media (max-width:1279px){
  .bgm-pills{display:flex;gap:22px;margin-top:28px;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  .bgm-pills::-webkit-scrollbar{display:none}
  .bgm-pills button{background:none;border:0;padding:0;cursor:pointer;font-family:inherit;font-size:17px;font-weight:500;color:var(--ds-color-text-tertiary,#8b8f97)}
  .bgm-pills button.on{color:var(--ds-color-text-primary,#f4f5f7);font-weight:600}
  #bgMarkets{display:block !important;margin-top:16px;grid-template-columns:none}
  #bgMarkets > div[role="tablist"]{min-height:0 !important}
  #bgMarkets > div[role="tablist"] > [aria-selected="false"]{display:none !important}
  #bgMarkets > div[role="tablist"] > div{border-bottom:0 !important;padding:20px !important;min-height:0 !important}
  #bgMarkets > div:nth-child(2){border-inline-start:0 !important;border-top:1px solid var(--ds-color-border-subtle,#2a2c31)}
  #bgMarkets .grid.grid-cols-2{grid-template-columns:1fr !important;min-height:0 !important}
  #bgMarkets .grid.grid-cols-2 > div{min-height:0 !important}
  #bgMarkets .grid.grid-cols-2 > div + div{border-inline-start:0 !important;border-top:1px solid var(--ds-color-border-subtle,#2a2c31)}
  #bgMarkets [style*="left: 308"]{left:calc(100% - 2px) !important}
  #bgMarkets > div:nth-child(2) > div:first-child > div{padding:20px !important}
}


/* tablets / small laptops: same header trimming so nothing scrolls sideways */
@media (max-width: 1279px) {
  html, body { overflow-x: hidden; }
  .micro-action > :nth-child(n+6):not(.bg-burger) { display: none !important; }
}


/* ---- phones/tablets (<1024px): Bitget-style header = logo, search, support, hamburger ---- */
.bg-appbar,.bg-burger{display:none}
@media (max-width: 1023px) {
  .micro-action > :nth-child(1),
  .micro-action > :nth-child(4):not(.bg-burger),
  .micro-action > :nth-child(5):not(.bg-burger),
  .micro-action > :nth-child(6):not(.bg-burger),
  .micro-action > :nth-child(7):not(.bg-burger) { display: none !important; }
  .bg-burger { display:inline-flex !important; align-items:center; justify-content:center; width:32px; height:32px; margin-left:4px; padding:0; border:0; background:transparent; color:var(--ds-color-text-primary,#f4f5f7); cursor:pointer; }
}
@media (max-width: 767px) {
  .bg-appbar { display:flex; align-items:center; gap:12px; height:64px; padding:12px 16px; box-sizing:border-box; background:#070808; color:#f4f5f7; }
  .bg-appbar img { width:40px; height:40px; border-radius:10px; object-fit:cover; }
  .bg-appbar-t { display:flex; flex-direction:column; min-width:0; flex:1; line-height:1.25; }
  .bg-appbar-t b { font-size:16px; font-weight:600; }
  .bg-appbar-t span { font-size:13px; color:rgba(255,255,255,.6); }
  .bg-appbar a { display:inline-flex; align-items:center; justify-content:center; height:40px; padding:0 20px; border-radius:8px; background:#fff; color:#151517; font-size:16px; font-weight:600; text-decoration:none; }
}
/* ---- scroll rise-in + hero entrance ---- */
.bg-rv{opacity:0;transform:translateY(56px);transition:opacity 1s cubic-bezier(.22,1,.36,1),transform 1s cubic-bezier(.22,1,.36,1);will-change:opacity,transform}
.bg-rv.in{opacity:1;transform:none}
@keyframes bgUp{from{opacity:0;transform:translateY(34px)}to{opacity:1;transform:none}}
section[aria-label="Bitget welcome"] h1{animation:bgUp .9s cubic-bezier(.22,1,.36,1) both}
section[aria-label="Bitget welcome"] .sIcV4lOvNpLMbvFLEj5t{animation:bgUp 1s .2s cubic-bezier(.22,1,.36,1) both}
@media (prefers-reduced-motion:reduce){
  .bg-rv{opacity:1;transform:none;transition:none}
  section[aria-label="Bitget welcome"] h1,section[aria-label="Bitget welcome"] .sIcV4lOvNpLMbvFLEj5t{animation:none}
}


/* ---- light theme tweaks for the Bitget-added pieces ---- */
html:not(.dark){background:#fff}
html:not(.dark) .bg-appbar{background:#fff;color:#151517;border-bottom:1px solid #ececec}
html:not(.dark) .bg-appbar-t span{color:#6b6f76}
html:not(.dark) .bg-appbar a{background:#151517;color:#fff}
html:not(.dark) .bg-burger{color:#151517}
html:not(.dark) .bgm-card{background:#f6f7f8;border-color:#e6e8eb}
html:not(.dark) .mobile-app-nav{background:#fff !important;border-top:1px solid #e6e8eb !important;box-shadow:none !important}
html:not(.dark) .mobile-app-nav a{color:#7b7f86 !important}
html:not(.dark) .mobile-app-nav a.active{color:#151517 !important}

/* light theme: solid white header with dark text/icons (the hero below stays dark) */
html:not(.dark) #web-header-container{background:#fff;color:#151517;border-bottom:1px solid #eceef0}
html:not(.dark) #web-header-container .micro-action i,
html:not(.dark) #web-header-container .micro-action svg,
html:not(.dark) #web-header-container #MicroMenu .menu-item,
html:not(.dark) #web-header-container #MicroMenu span,
html:not(.dark) #web-header-container #MicroMenu a{color:#151517 !important}
html:not(.dark) #web-header-container a[href*="mode=login"]{color:#151517 !important}
html:not(.dark) #web-header-container a[href*="mode=signup"]{background:#151517 !important;color:#fff !important}
html:not(.dark) #web-header-container a[href*="mode=signup"] *{color:#fff !important}
html:not(.dark) #web-header-container .micro-header .bg,
html:not(.dark) #web-header-container div.bg{background:#fff !important}


/* the saved header logo is the dark-theme (white text) image: tint it for the light theme */
html:not(.dark) #web-header-container a[href="/"] img{filter:invert(1) hue-rotate(180deg)}


/* ---- phone hero: "Get started" button instead of the sign-up form ---- */
.bg-getstarted{display:none}
@media (max-width: 767px) {
  section[aria-label="Bitget welcome"] .sIcV4lOvNpLMbvFLEj5t{display:none !important}
  .bg-getstarted{display:flex;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;width:calc(100% - 10px);max-width:560px;height:44px;margin:10px 5px 0;border-radius:8px;background:#fff;color:#151517;font-size:16px;font-weight:500;text-decoration:none;position:relative;z-index:2}
}


/* hero indicator (phones): two thin lines, active one longer + white */
.bg-hdots{display:none}
@media (max-width: 767px) {
  .bg-arrows{display:none !important}
  .bg-hdots{display:flex;justify-content:center;align-items:center;gap:8px;margin:14px 0 6px}
  .bg-hdots button{width:26px;height:2px;padding:0;border:0;border-radius:2px;background:rgba(255,255,255,.32);cursor:pointer;transition:width .35s ease,background-color .35s ease}
  .bg-hdots button.on{width:48px;background:#fff}
  .bg-hdots button::after{content:"";position:absolute;inset:-10px 0}
  .bg-hdots button{position:relative}
}

/* Markets showcase (Your gateway to global core assets): charts draw in, icons pop in */
@keyframes bgmDraw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes bgmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bgmPop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes bgmReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
#bgMarkets.bgm-anim .bgm-line { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: bgmDraw 1.7s cubic-bezier(.22,1,.36,1) .1s forwards; }
#bgMarkets.bgm-anim .bgm-area { opacity: 0; animation: bgmFade 1.5s ease .35s forwards; }
#bgMarkets.bgm-anim .bgm-vl { opacity: 0; animation: bgmFade .7s ease forwards; }
#bgMarkets.bgm-anim #bgTopChart { animation: bgmReveal 1.5s cubic-bezier(.22,1,.36,1) both; }
#bgMarkets.bgm-anim .bgm-cell { opacity: 0; animation: bgmPop .55s cubic-bezier(.22,1,.36,1) forwards; animation-delay: calc(var(--i, 0) * 38ms + 150ms); }
@media (prefers-reduced-motion: reduce) {
  #bgMarkets .bgm-line, #bgMarkets .bgm-area, #bgMarkets .bgm-vl, #bgMarkets .bgm-cell, #bgMarkets #bgTopChart { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; stroke-dasharray: none !important; }
}



/* Security panel in the Bitget style: dark frame, cyan highlight block, big stat rows */
.bgs-shot{background:#0b0c0d}
.bgs-mock{display:grid;grid-template-columns:17% 1fr 17%;height:100%;min-height:100%}
.bgs-bar{display:block;background:#18191b}
.bgs-mid{display:flex;flex-direction:column;gap:3px;justify-content:center;min-width:0}
.bgs-fill{flex:1;min-height:34px;background:#16171a}
.bgs-fill2{min-height:64px}
.bgs-cy{background:#00ecff;color:#04181b;padding:16px 14px;display:flex;flex-direction:column;gap:6px}
.bgs-cy b{font-size:20px;line-height:1.15;font-weight:700;letter-spacing:-.2px}
.bgs-cy span{font-size:11px;line-height:1.3;opacity:.85}
.bgs-st{background:#131416;padding:16px 14px;display:flex;flex-direction:column;gap:6px}
.bgs-st strong{font-size:26px;line-height:1.1;font-weight:600;color:#f4f5f7}
.bgs-st span{font-size:11px;color:rgba(255,255,255,.55);line-height:1.3}

/* running numbers: vertical column of in-between values slides up step by step (Bitget style) */
.rl{display:inline-block;height:1em;overflow:hidden;vertical-align:top;line-height:1em}
.rl-col{display:block;transition:transform .42s cubic-bezier(.4,0,.2,1);will-change:transform}
.rl-col > span{display:block;height:1em;line-height:1em;white-space:nowrap}


/* Security accordion on phones: same layout as desktop (3 cards in a row, tap to open) */
@media (max-width:1023px){
  .bgs{height:430px}
  .bgs-closed,.bgs-open{padding:20px}
  .bgs-closed h3,.bgs-body h3{font-size:20px;line-height:26px}
  .bgs-shot{width:180px;height:300px}
  .bgs-open{gap:20px}
}
@media (max-width:767px){
  /* phones: cards stacked vertically, tap one to open it */
  .bgs{flex-direction:column;height:auto}
  .bgs-card,.bgs-card.is-active{flex:none;border-inline-start:0;border-top:1px solid rgba(255,255,255,.24);transition:background-color .4s}
  .bgs-card:first-child{border-top:0}
  .bgs-closed,.bgs-open{position:static;inset:auto;padding:20px;transition:none}
  .bgs-closed{flex-direction:row;align-items:center;justify-content:flex-start;gap:16px}
  .bgs-closed img{width:40px;height:40px}
  .bgs-closed h3{writing-mode:horizontal-tb;transform:none;font-size:18px;line-height:24px;max-height:none;margin:0;align-self:center}
  .bgs-open{display:none;flex-direction:column;gap:16px;opacity:1;visibility:visible;pointer-events:auto}
  .bgs-card.is-active .bgs-closed{display:none}
  .bgs-card.is-active .bgs-open{display:flex}
  .bgs-shot{width:100%;height:200px;flex:none}
  .bgs-body h3{font-size:18px;line-height:24px}
  .bgs-body ul{margin-top:12px;gap:8px}
  .bgs-body li{font-size:13px;line-height:19px}
  .bgs-more{font-size:13px;margin-top:12px}
}

/* ---- phones: app strip + header row stay fixed at the top while scrolling ---- */
@media (max-width: 767px) {
  .bg-appbar { position: fixed; top: 0; left: 0; right: 0; z-index: 102; }
  #web-header-container { position: fixed !important; top: 64px !important; left: 0; right: 0; width: 100%; z-index: 101; }
  body { padding-top: 112px; }
  /* saved Earn/Institution pages: their header wrapper reserves 111px (header + sub-tabs); only the 48px header stays fixed */
  #web-header-container { height: 48px; }
  #web-header-container .mc-header-placeholder { height: 48px !important; min-height: 0 !important; }
}

/* Bitget saved-page support widget: we use our own floating headset (#floatingSupportBtn) */
#customer-chat-button{display:none !important}

/* saved Bitget pages ship their own support button; we use #floatingSupportBtn (same look) */
div.fixed[class*="bottom-[24px]"][class*="right-[24px]"]:has(> img[src*="customer."]){display:none !important}
