:root {
  --bg-obsidian: #080C16;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.88);
  --bg-hud: rgba(13, 19, 34, 0.82);
  --border-glass: rgba(255, 255, 255, 0.11);
  --accent-blue: #3B82F6;
  --accent-indigo: #6366F1;
  --accent-gold: #F59E0B;
  --accent-emerald: #10B981;
  --accent-danger: #EF4444;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  touch-action: manipulation;
}

/* Block printing completely */
@media print {
  html, body {
    display: none !important;
  }
}

.screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 10;
}

.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  z-index: 0;
}

/* ==========================================
   1. LUXURY SPLASH SCREEN
   ========================================== */
#splash-screen {
  background: radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.22) 0%, rgba(8, 12, 22, 1) 68%);
  z-index: 50;
}

.splash-logo-wrap {
  width: 112px;
  height: 112px;
  border-radius: 30px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.65), rgba(255, 255, 255, 0.08));
  box-shadow: 0 24px 55px rgba(37, 99, 235, 0.42);
  animation: splashPop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.splash-logo-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
  display: block;
}

.splash-title {
  margin-top: 24px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  background: linear-gradient(90deg, #FFFFFF 0%, #93C5FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-subtitle {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--text-muted);
}

.splash-loader {
  margin-top: 42px;
  width: 130px;
  height: 4px;
  background: #1E293B;
  border-radius: 99px;
  overflow: hidden;
}

.splash-loader-bar {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  animation: splashProgress 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashPop {
  0% { opacity: 0; transform: scale(0.65); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes splashProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ==========================================
   2. FINTECH PIN LOGIN SCREEN
   ========================================== */
#login-screen {
  background: radial-gradient(circle at 50% 16%, rgba(37, 99, 235, 0.19) 0%, rgba(8, 12, 22, 1) 62%);
  justify-content: space-between;
  padding: calc(var(--safe-top) + 20px) 20px calc(var(--safe-bottom) + 18px);
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 4px;
}

.login-logo-box {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.55), rgba(255, 255, 255, 0.1));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.35);
}

.login-logo-box img {
  width: 100%;
  height: 100%;
  border-radius: 18.5px;
  object-fit: cover;
}

.login-brand {
  margin-top: 12px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.login-badge {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #93C5FD;
  font-size: 11px;
  font-weight: 600;
}

/* 4-Digit PIN Indicators */
.pin-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 340px;
}

.pin-boxes {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

.pin-boxes.shake {
  animation: pinShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.pin-box {
  width: 54px;
  height: 62px;
  border-radius: 16px;
  background: #111827;
  border: 1.5px solid #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-box.active {
  border-color: #60A5FA;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.pin-box.filled {
  background: #1E293B;
  border-color: #3B82F6;
  transform: scale(1.06);
}

.pin-box.error {
  border-color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.1);
}

.pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #60A5FA;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.8);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-box.filled .pin-dot {
  transform: scale(1);
}

.pin-box.error .pin-dot {
  background: var(--accent-danger);
}

.pin-status {
  margin-top: 12px;
  min-height: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.pin-status.error {
  color: #F87171;
  font-weight: 600;
}

/* Alphanumeric Fallback Input */
.keyboard-mode-card {
  width: 100%;
  background: #111827;
  border: 1px solid #1E293B;
  border-radius: 20px;
  padding: 18px;
  display: none;
  flex-direction: column;
  gap: 12px;
}

.keyboard-mode-card.visible {
  display: flex;
}

.keyboard-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid #334155;
  background: #0B1120;
  color: #FFFFFF;
  font-size: 16px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.keyboard-input:focus {
  border-color: var(--accent-blue);
}

.primary-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.text-link-btn {
  background: none;
  border: none;
  color: #60A5FA;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
}

/* Tactile 3x4 PIN Keypad */
.keypad-wrap {
  width: 100%;
  max-width: 310px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.keypad-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.key-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid #1E293B;
  color: #F8FAFC;
  font-size: 26px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}

.key-btn:active {
  transform: scale(0.91);
  background: rgba(59, 130, 246, 0.22);
  border-color: #3B82F6;
}

.key-btn.utility {
  background: transparent;
  border-color: transparent;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 600;
}

.key-btn.utility:active {
  background: rgba(255, 255, 255, 0.06);
}

/* PWA Install Banner */
.pwa-install-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34D399;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-install-pill:active {
  transform: scale(0.96);
}

.pwa-install-pill.installed-state {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93C5FD;
  cursor: default;
}

.pwa-install-pill.installing-state {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #FBBF24;
}

@keyframes pinShake {
  10%, 90% { transform: translate3d(-4px, 0, 0); }
  20%, 80% { transform: translate3d(6px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-8px, 0, 0); }
  40%, 60% { transform: translate3d(8px, 0, 0); }
}

/* ==========================================
   3. FULL-SCREEN ZEN PDF READER
   ========================================== */
#reader-screen {
  background-color: var(--bg-obsidian);
  overflow: hidden;
}

#reader-screen.mode-eye-care {
  background-color: #1A1610;
}

#reader-screen.mode-night {
  background-color: #05070B;
}

/* Full-screen book viewport */
.book-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1400px;
  touch-action: none;
}

.page-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

/* Transition Animations */
.page-stage.anim-card-next {
  animation: cardNext 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-stage.anim-card-prev {
  animation: cardPrev 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-stage.anim-flip-next {
  animation: flipNext 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-stage.anim-flip-prev {
  animation: flipPrev 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-stage.anim-cube-next {
  animation: cubeNext 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-stage.anim-cube-prev {
  animation: cubePrev 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardNext {
  0% { opacity: 0.45; transform: translateX(48px) scale(0.95); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes cardPrev {
  0% { opacity: 0.45; transform: translateX(-48px) scale(0.95); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes flipNext {
  0% { opacity: 0.5; transform: perspective(1400px) rotateY(-38deg) scale(0.95); transform-origin: left center; }
  100% { opacity: 1; transform: perspective(1400px) rotateY(0deg) scale(1); transform-origin: left center; }
}
@keyframes flipPrev {
  0% { opacity: 0.5; transform: perspective(1400px) rotateY(38deg) scale(0.95); transform-origin: right center; }
  100% { opacity: 1; transform: perspective(1400px) rotateY(0deg) scale(1); transform-origin: right center; }
}
@keyframes cubeNext {
  0% { opacity: 0.5; transform: perspective(1400px) translateX(60px) rotateY(28deg) scale(0.92); }
  100% { opacity: 1; transform: perspective(1400px) translateX(0) rotateY(0deg) scale(1); }
}
@keyframes cubePrev {
  0% { opacity: 0.5; transform: perspective(1400px) translateX(-60px) rotateY(-28deg) scale(0.92); }
  100% { opacity: 1; transform: perspective(1400px) translateX(0) rotateY(0deg) scale(1); }
}

.canvas-card {
  position: relative;
  max-width: 96vw;
  max-height: 92vh;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.65);
  background: #FFFFFF;
  transform-origin: center center;
  will-change: transform;
}

#pdf-canvas {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  transition: filter 0.25s ease;
}

/* Reading Color Modes on Canvas */
#reader-screen.mode-eye-care #pdf-canvas {
  filter: sepia(0.28) brightness(0.95) contrast(0.96);
}

#reader-screen.mode-night #pdf-canvas {
  filter: invert(0.9) hue-rotate(180deg) contrast(1.05);
}

/* Bookmark Ribbon on Page Top-Right */
.page-bookmark-ribbon {
  position: absolute;
  top: 0;
  right: 18px;
  width: 26px;
  height: 38px;
  background: linear-gradient(180deg, #EF4444, #DC2626);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.45);
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 5;
}

.page-bookmark-ribbon.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle Dynamic Watermark */
.watermark-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 4;
}

.watermark-text {
  transform: rotate(-28deg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(100, 116, 139, 0.10);
  white-space: nowrap;
}

/* Floating Frosted-Glass Top HUD */
.hud-top {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 14px;
  right: 14px;
  max-width: 680px;
  margin: 0 auto;
  height: 50px;
  padding: 0 12px;
  border-radius: 16px;
  background: var(--bg-hud);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.hud-top.zen-hidden {
  transform: translateY(-90px);
  opacity: 0;
  pointer-events: none;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hud-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.hud-brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-pill-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.hud-pill-btn:active {
  transform: scale(0.94);
}

.hud-pill-btn.active-mode {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(96, 165, 250, 0.45);
  color: #93C5FD;
}

.hud-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: #CBD5E1;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hud-icon-btn.bookmarked {
  color: #F87171;
}

/* Floating Frosted-Glass Bottom HUD */
.hud-bottom {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 14px);
  left: 14px;
  right: 14px;
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: 18px;
  background: var(--bg-hud);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 30;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.hud-bottom.zen-hidden {
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
}

.nav-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-circle-btn:disabled {
  opacity: 0.32;
  cursor: default;
}

.slider-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-slider {
  width: 100%;
  accent-color: var(--accent-blue);
  height: 4px;
  cursor: pointer;
}

.page-counter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Paywall Overlay on Page 4+ */
.paywall-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  touch-action: auto;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.paywall-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.paywall-card {
  width: 100%;
  max-width: 370px;
  background: linear-gradient(180deg, #162036 0%, #0F172A 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 26px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.paywall-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.paywall-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.paywall-title {
  font-size: 21px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.paywall-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: #CBD5E1;
  margin-bottom: 20px;
}

.paywall-buy-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, #F59E0B, #EA580C);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(234, 88, 12, 0.4);
  margin-bottom: 14px;
}

.vip-code-section {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 12px 12px 10px;
  margin-bottom: 12px;
}

.vip-divider {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #93C5FD;
  margin-bottom: 8px;
}

.vip-input-row {
  display: flex;
  gap: 8px;
}

.vip-code-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #334155;
  background: #080C16;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.vip-code-input:focus {
  border-color: #3B82F6;
}

.vip-activate-btn {
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.vip-code-status {
  margin-top: 6px;
  min-height: 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: #F87171;
}

.paywall-card.shake {
  animation: pinShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.paywall-back-btn {
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: rgba(30, 41, 59, 0.6);
  color: #93C5FD;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Resume Reading Toast Notification */
.resume-toast {
  position: fixed;
  top: calc(var(--safe-top) + 72px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #6EE7B7;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.resume-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* iOS / PWA Install Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background: #111827;
  border: 1px solid #1E293B;
  border-radius: 24px;
  padding: 24px;
  text-align: center;
}

.modal-steps {
  text-align: left;
  margin: 16px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
  color: #E2E8F0;
}

.modal-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1E293B;
  padding: 10px 12px;
  border-radius: 12px;
}

/* Full-Screen Live Install Progress & Success Modal */
.install-status-card {
  background: linear-gradient(180deg, #162036 0%, #0F172A 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.78);
  padding: 28px 22px;
}

.install-spinner-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(59, 130, 246, 0.18);
  border-top-color: #3B82F6;
  border-right-color: #60A5FA;
  animation: installSpin 0.95s linear infinite;
}

.install-ring.done {
  animation: none;
  border-color: #10B981;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
}

.install-app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.install-check-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #10B981;
  border: 2.5px solid #0F172A;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.install-check-badge.visible {
  transform: scale(1);
}

.install-step-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.16);
  color: #93C5FD;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.install-step-badge.done {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
}

.install-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.install-modal-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #94A3B8;
  margin-bottom: 18px;
}

.install-bar-wrap {
  width: 100%;
  margin-bottom: 8px;
}

.install-bar-track {
  width: 100%;
  height: 8px;
  background: #080C16;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.install-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563EB, #38BDF8, #10B981);
  transition: width 0.35s ease;
}

.install-bar-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: #CBD5E1;
}

.install-success-box {
  text-align: left;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.install-success-item {
  font-size: 12.5px;
  line-height: 1.45;
  color: #E2E8F0;
}

.install-done-btn {
  background: linear-gradient(135deg, #10B981, #059669);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.35);
}

.hidden-box {
  display: none !important;
}

@keyframes installSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
