/* eSIM Doctor — light & airy, warm neutrals, orange accent, 3D orbs */
:root {
  --bg: #f5f3ee;
  --bg-2: #ebe7de;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #4a4a48;
  --ink-3: #8a8880;
  --line: #e6e2d8;
  --line-2: #d8d3c6;
  --accent: #ff6b35;
  --accent-2: #ff8d63;
  --accent-ink: #2a1a12;
  --sky: oklch(0.92 0.04 230);
  --sea: oklch(0.82 0.06 230);
  --mint: oklch(0.9 0.04 160);
  --sand: oklch(0.9 0.05 80);
  --rose: oklch(0.9 0.05 20);
  --violet: oklch(0.9 0.05 290);
  --shadow-lg: 0 30px 60px -20px rgba(30, 20, 10, .25), 0 10px 20px -10px rgba(30, 20, 10, .15);
  --shadow-md: 0 12px 28px -10px rgba(30, 20, 10, .18), 0 4px 10px -4px rgba(30, 20, 10, .1);
  --shadow-sm: 0 2px 8px -2px rgba(30, 20, 10, .1);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  font-family: var(--font-ui);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* Mobile root — fills viewport like a native app */
.mobile-root {
  position: fixed; inset: 0;
  background: var(--bg);
  overflow: hidden;
}

/* Desktop root — normal document flow */
.desktop-root {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

/* subtle paper grain on mobile */
.mobile-root::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,170,120,.07), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(120,170,255,.05), transparent 40%);
  pointer-events: none;
  z-index: 1;
}

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 2;
}

.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }


/* bottom tab bar — liquid glass */
.tabbar-glass {
  position: relative;
  display: flex;
  background: rgba(238, 234, 226, 0.70);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-radius: 999px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow:
    0 20px 56px -10px rgba(30, 20, 10, 0.26),
    0 4px 16px -4px rgba(30, 20, 10, 0.12),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(30, 20, 10, 0.05);
}

/* sliding active pill */
.tabbar-glass-pill {
  position: absolute;
  left: 5px; top: 5px;
  width: calc((100% - 10px) / 4);
  height: calc(100% - 10px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow:
    0 2px 14px rgba(30, 20, 10, 0.13),
    inset 0 1.5px 0 rgba(255, 255, 255, 1),
    inset 0 -0.5px 0 rgba(30, 20, 10, 0.06);
  transition: transform 0.42s cubic-bezier(0.34, 1.38, 0.64, 1);
  pointer-events: none;
}

.tab-glass {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 10px 10px;
  min-width: 64px;
  border: 0; background: none; cursor: pointer;
  color: rgba(26, 26, 26, 0.38);
  font-size: 10px; font-weight: 600;
  letter-spacing: .025em;
  font-family: var(--font-ui);
  transition: color 0.22s;
}
.tab-glass.active { color: rgba(26, 26, 26, 0.88); }
.tab-glass svg {
  width: 22px; height: 22px;
  transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tab-glass.active svg { transform: scale(1.1); }

/* orb — the core 3D primitive */
.orb {
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.3) 18%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,.15) 0%, transparent 50%),
    var(--orb-color, var(--sky));
  box-shadow:
    inset -8px -12px 20px rgba(0,0,0,.12),
    inset 6px 8px 16px rgba(255,255,255,.5),
    0 14px 24px -8px rgba(30,20,10,.25);
}
.orb::after {
  content: ""; position: absolute;
  left: 18%; top: 10%; width: 28%; height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.9), transparent 70%);
  filter: blur(2px);
}

/* tilt card */
.tilt {
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt:active { transform: perspective(800px) rotateX(6deg) scale(.985); }

/* buttons */
.btn {
  appearance: none; border: 0; cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: 999px;
  padding: 16px 22px;
  font-size: 15px;
  letter-spacing: .01em;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.5);
}
.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 24px -8px rgba(255,107,53,.55);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}

/* input */
.field {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 16px;
  font-family: var(--font-ui);
  width: 100%;
  outline: none;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(0,0,0,.05); }

/* display type */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* rotating globe */
@keyframes spin360 { to { transform: rotate(360deg); } }
.globe-wrap {
  position: relative; display: grid; place-items: center;
  perspective: 800px;
}
.globe {
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.95) 0%, transparent 35%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,.2) 0%, transparent 55%),
    radial-gradient(circle at 50% 50%, oklch(0.88 0.06 230) 0%, oklch(0.72 0.09 230) 100%);
  box-shadow:
    inset -14px -20px 40px rgba(20, 30, 60, .25),
    inset 10px 14px 24px rgba(255,255,255,.5),
    0 30px 60px -20px rgba(30,40,80,.4);
  overflow: hidden;
}
.globe-land {
  position: absolute; inset: 0;
  border-radius: 50%;
  animation: spin360 40s linear infinite;
  opacity: .55;
}
.globe-shine {
  position: absolute; left: 18%; top: 10%;
  width: 30%; height: 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.85), transparent 70%);
  filter: blur(3px);
  pointer-events: none;
}

/* sheets */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 15, 10, .4);
  backdrop-filter: blur(4px);
  z-index: 20;
  animation: fade .25s;
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  z-index: 21;
  max-height: 90%;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 -20px 40px -10px rgba(0,0,0,.2);
  animation: sheetUp .35s cubic-bezier(.2,.9,.25,1);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--line-2);
  border-radius: 2px;
  margin: 10px auto 0;
}

/* screen transitions */
.page-enter {
  animation: pageIn .35s cubic-bezier(.2,.9,.25,1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateX(12px); }
}

/* utility */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--bg-2);
  color: var(--ink-2);
  letter-spacing: .02em;
  border: 1px solid var(--line);
}
.chip-accent { background: #fff0e9; color: #b64115; border-color: #ffd7c3; }
.chip-ink { background: var(--ink); color: var(--bg); border-color: transparent; }

.row { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--ink-3); }
.micro { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

/* coin */
@keyframes coinFlip {
  0% { transform: rotateY(0) translateY(0); }
  50% { transform: rotateY(720deg) translateY(-30px); }
  100% { transform: rotateY(1440deg) translateY(0); }
}
.coin {
  width: 36px; height: 36px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, #fff5c8, #f4c64a 45%, #c88a1a 100%);
  box-shadow: inset -3px -4px 6px rgba(100,60,10,.5), inset 2px 2px 4px rgba(255,255,255,.6), 0 6px 12px -4px rgba(0,0,0,.3);
  display: grid; place-items: center;
  font-family: var(--font-display);
  color: #8a5610;
  font-size: 18px;
  transform-style: preserve-3d;
}

/* list row */
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  transition: transform .15s, box-shadow .2s;
  cursor: pointer;
}
.list-row:active { transform: scale(.985); }

/* 3D SIM card */
.sim3d {
  width: 100%;
  aspect-ratio: 1.58;
  border-radius: 20px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,.4), transparent 50%),
    linear-gradient(135deg, #1a1a1a 0%, #2a2620 60%, #151310 100%);
  color: #f5f3ee;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 20px 40px -15px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.15);
  transform-style: preserve-3d;
}
.sim3d::before {
  content: ""; position: absolute;
  left: 6%; top: 28%; width: 22%; height: 44%;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #d4a94a, #f4d26a 40%, #a57a1a 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.2);
}
.sim3d::after {
  content: ""; position: absolute;
  left: 8%; top: 32%; width: 18%; height: 36%;
  background-image:
    linear-gradient(to bottom, transparent 22%, rgba(0,0,0,.35) 22% 26%, transparent 26% 48%, rgba(0,0,0,.35) 48% 52%, transparent 52% 74%, rgba(0,0,0,.35) 74% 78%, transparent 78%),
    linear-gradient(to right, transparent 32%, rgba(0,0,0,.35) 32% 36%, transparent 36% 64%, rgba(0,0,0,.35) 64% 68%, transparent 68%);
  border-radius: 8px;
}

/* progress */
.progress {
  height: 6px; border-radius: 99px;
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}
.progress > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}

/* decorative floaties */
.float {
  position: absolute;
  pointer-events: none;
  animation: floaty 6s ease-in-out infinite;
}
.float.slow { animation-duration: 9s; }
.float.fast { animation-duration: 4s; }
@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}

/* loading spinner */
.spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 0;
}

