/* Mobile glass theme. Activated only on pages that are already dark. */

html.glass-on {
  background: var(--glass-base) !important;
  color-scheme: dark;
}

html.glass-on body {
  background: transparent !important;
  -webkit-font-smoothing: antialiased;
}

html.glass-on::before,
html.glass-on::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
}

html.glass-on::before {
  width: 520px;
  height: 520px;
  left: -160px;
  top: -140px;
  background: radial-gradient(circle, rgba(var(--glow-primary-rgb), 0.42) 0%, rgba(var(--glow-primary-rgb), 0.08) 42%, transparent 70%);
  filter: blur(18px);
}

html.glass-on::after {
  width: 460px;
  height: 460px;
  right: -180px;
  top: 8%;
  background: radial-gradient(circle, rgba(var(--glow-secondary-rgb), 0.22) 0%, rgba(var(--glow-secondary-rgb), 0.03) 48%, transparent 74%);
  filter: blur(20px);
}

html.glass-on body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.09;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 0.6px, transparent 0.65px);
  background-size: 3px 3px;
}

html.glass-on body::after {
  content: "";
  position: fixed;
  left: 8%;
  right: 8%;
  bottom: -120px;
  height: 260px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(var(--glow-primary-rgb), 0.16), transparent 68%);
}

html.glass-on body {
  position: relative;
  z-index: 1;
}

html.glass-on .main-content,
html.glass-on .page-container,
html.glass-on .login-container,
html.glass-on .chat-container,
html.glass-on .coin-list,
html.glass-on .asset-section,
html.glass-on .form-section {
  background: transparent !important;
  background-image: none !important;
}

html.glass-on .kline-wrapper,
html.glass-on .kline-container,
html.glass-on .klinebox {
  background: #0b0e14 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.glass-on .top-header,
html.glass-on .market-tab,
html.glass-on .list-header,
html.glass-on .bottom-nav,
html.glass-on .tab-bar,
html.glass-on .input-area,
html.glass-on .service-info,
html.glass-on .user-info-bar {
  background: rgba(14, 16, 24, 0.58) !important;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 30px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
}

html.glass-on .top-header,
html.glass-on .market-tab,
html.glass-on .list-header,
html.glass-on .tab-bar,
html.glass-on .service-info,
html.glass-on .user-info-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.glass-on .bottom-nav,
html.glass-on .input-area {
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 -12px 36px rgba(0, 0, 0, 0.35);
}

html.glass-on .nav-item.active,
html.glass-on .nav-icon.active,
html.glass-on .nav-text.active {
  color: var(--accent-light) !important;
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55);
}

html.glass-on .asset-header,
html.glass-on .hot-market,
html.glass-on .section-card,
html.glass-on .form-card,
html.glass-on .info-card,
html.glass-on .user-card,
html.glass-on .menu-card,
html.glass-on .quick-entry,
html.glass-on .stats-section,
html.glass-on .earn-section,
html.glass-on .earn-card,
html.glass-on .notice-bar,
html.glass-on .stat-card,
html.glass-on .contract-header,
html.glass-on .price-info,
html.glass-on .trade-buttons,
html.glass-on .coin-select-card,
html.glass-on .deposit-card,
html.glass-on .notice-card,
html.glass-on .upload-card,
html.glass-on .modal-box,
html.glass-on .popup-box,
html.glass-on .qr-box,
html.glass-on .welcome-msg,
html.glass-on .fiat-notice {
  background: rgba(18, 20, 30, 0.52) !important;
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 16px 40px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

html.glass-on .asset-header {
  background-image: linear-gradient(145deg, rgba(var(--accent-rgb), 0.22), rgba(255, 255, 255, 0.05) 46%, rgba(80, 130, 255, 0.12)) !important;
}

html.glass-on .hot-market,
html.glass-on .earn-card {
  background-image: linear-gradient(145deg, rgba(var(--glow-secondary-rgb), 0.14), rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.03)) !important;
}

html.glass-on .input-field,
html.glass-on .verify-input,
html.glass-on .form-input,
html.glass-on .social-btn,
html.glass-on .action-btn.secondary,
html.glass-on .eye-toggle,
html.glass-on .fullscreen-btn,
html.glass-on .network-tag {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
}

html.glass-on .input-field:focus,
html.glass-on .verify-input:focus,
html.glass-on .form-input:focus {
  border-color: rgba(var(--accent-rgb), 0.85) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09) !important;
}

html.glass-on .coin-item,
html.glass-on .menu-item,
html.glass-on .network-item {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.glass-on .coin-item:active,
html.glass-on .menu-item:active,
html.glass-on .network-item:active {
  background: rgba(255, 255, 255, 0.07) !important;
}

html.glass-on .msg-item.received .msg-bubble {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

html.glass-on .msg-item.sent .msg-bubble,
html.glass-on .trade-btn,
html.glass-on .send-btn,
html.glass-on .submit-btn,
html.glass-on .modal-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 8px 22px rgba(0, 0, 0, 0.28);
}

html.glass-on .modal-overlay,
html.glass-on .popup-overlay,
html.glass-on .image-preview-modal {
  background: rgba(5, 7, 12, 0.55) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

html.glass-on .section-header,
html.glass-on .card-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html.glass-on .market-section,
html.glass-on .security-section {
  background: rgba(18, 20, 30, 0.52) !important;
  background-image: linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 55%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

html.glass-on .carousel-inner,
html.glass-on .banner-wrapper .carousel-inner {
  border-radius: 20px !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

html.glass-on .logo-title,
html.glass-on .form-title,
html.glass-on .asset-value,
html.glass-on .header-title,
html.glass-on .logo-text {
  letter-spacing: -0.03em;
}

html.glass-on .section-title,
html.glass-on .form-desc,
html.glass-on .logo-subtitle {
  letter-spacing: 0.02em;
}

html.glass-on .asset-value,
html.glass-on .hot-price,
html.glass-on .coin-price,
html.glass-on .current-price,
html.glass-on .stat-value,
html.glass-on .earn-apy {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

html.glass-on .logo-title {
  background: linear-gradient(180deg, #fff 20%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

html.glass-on .logo-icon {
  filter: drop-shadow(0 10px 18px rgba(var(--accent-rgb), 0.28));
}

html.glass-on .entry-icon,
html.glass-on .security-icon,
html.glass-on .coin-icon {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 16px rgba(0, 0, 0, 0.28);
}

html.glass-on .coin-logo {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 14px rgba(0, 0, 0, 0.28);
}

html.glass-on .change-tag.up {
  background: rgba(14, 203, 129, 0.16) !important;
  box-shadow: inset 0 0 0 1px rgba(14, 203, 129, 0.28);
}

html.glass-on .change-tag.down {
  background: rgba(245, 70, 92, 0.16) !important;
  box-shadow: inset 0 0 0 1px rgba(245, 70, 92, 0.28);
}

html.glass-on .nav-icon.active,
html.glass-on .nav-item.active i {
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.7));
}

html.glass-on .action-btn.primary,
html.glass-on .submit-btn,
html.glass-on .trade-btn.all {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 24px rgba(var(--accent-rgb), 0.22) !important;
}

/* Signature layer: floating dock, gold frame, stronger atmosphere */

html.glass-on .top-header {
  border-bottom: 1px solid rgba(var(--glass-frame-rgb), 0.45) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 32px rgba(0, 0, 0, 0.28) !important;
}

html.glass-on .asset-header,
html.glass-on .hot-market,
html.glass-on .section-card,
html.glass-on .form-card,
html.glass-on .info-card,
html.glass-on .user-card,
html.glass-on .menu-card,
html.glass-on .quick-entry,
html.glass-on .stats-section,
html.glass-on .earn-section,
html.glass-on .notice-bar,
html.glass-on .market-section,
html.glass-on .security-section,
html.glass-on .coin-select-card,
html.glass-on .deposit-card,
html.glass-on .notice-card,
html.glass-on .upload-card,
html.glass-on .modal-box,
html.glass-on .popup-box {
  border-radius: 22px !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 18px 40px rgba(0, 0, 0, 0.32) !important;
}

/* Gold is reserved for focal surfaces only: top bar, asset card, login card, dock. */
html.glass-on .asset-header {
  border: 1px solid rgba(var(--glass-frame-rgb), 0.4) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 18px 44px rgba(0, 0, 0, 0.34) !important;
}

html.glass-on .login-container .form-section {
  background: rgba(16, 18, 26, 0.62) !important;
  background-image: linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(var(--accent-rgb), 0.05)) !important;
  border: 1px solid rgba(var(--glass-frame-rgb), 0.38) !important;
  border-radius: 24px !important;
  padding: 28px 18px 22px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 20px 50px rgba(0, 0, 0, 0.35) !important;
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
}

/* Floating dock only where the page already pins its nav to the viewport.
   Pages that keep the nav inside a flex column (contract chart) stay flush. */
html.glass-dock .bottom-nav {
  left: 14px !important;
  right: 14px !important;
  bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  width: auto !important;
  height: 64px !important;
  padding-bottom: 0 !important;
  border-radius: 22px !important;
  border: 1px solid rgba(var(--glass-frame-rgb), 0.42) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  z-index: 10000 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 16px 40px rgba(0, 0, 0, 0.45) !important;
}

html.glass-dock .main-content {
  padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
}

html.glass-dock .bottom-space {
  height: calc(96px + env(safe-area-inset-bottom)) !important;
}

html.glass-dock > body > .coin-list,
html.glass-dock .content-area {
  padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
}

html.glass-on .page-container .bottom-nav {
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
}

html.glass-on .page-container .price-info,
html.glass-on .page-container .trade-buttons {
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
}

html.glass-on .asset-header {
  border-radius: 0 0 26px 26px !important;
  border-top: 0 !important;
}

html.glass-on .section-title {
  position: relative;
  padding-left: 12px;
}

html.glass-on .section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.85), rgba(var(--accent-rgb), 0.2));
}
