:root {
  --phone-width: 393px;
  --phone-height: 852px;
  --radius: 54px;
  --safe-top: 52px;
  --safe-bottom: 88px;
  --nav-bar: 48px;
  --brand: #4f46e5;
  --brand-soft: #eef2ff;
}

* {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0 !important;
  width: 393px;
  height: 852px;
  overflow: hidden;
  font-family: "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 100%);
  text-rendering: optimizeLegibility;
}
.fa-solid,
.fa-regular,
.fa-brands,
.fas,
.far,
.fab {
  font-style: normal;
  font-variant: normal;
  line-height: 1;
  text-rendering: auto;
  display: inline-block;
}

.fa-solid,
.fas {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.fa-regular,
.far {
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
}

.fa-brands,
.fab {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
}

.phone {
  width: var(--phone-width);
  height: var(--phone-height);
  box-sizing: border-box;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: #f8fafc;
}

.status-bar {
  height: var(--safe-top);
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  padding: 14px 22px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.2), transparent);
  backdrop-filter: blur(2px);
}

.status-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dynamic-island {
  display: none;
}

.app-nav {
  height: var(--safe-bottom);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #e2e8f0;
  backdrop-filter: blur(14px);
  padding: 10px 12px 22px;
  z-index: 20;
}

.app-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 100%;
  align-items: center;
}

.app-nav li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  min-width: 0;
}

.app-nav li .tab-icon {
  width: 22px;
  height: 22px;
  color: #94a3b8;
  flex-shrink: 0;
  display: block;
}

.app-nav li span {
  display: block;
  line-height: 1.2;
  white-space: nowrap;
}

.app-nav .active {
  color: #0f172a;
  font-weight: 600;
}

.app-nav .active .tab-icon {
  color: var(--brand);
}

.screen {
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: var(--radius);
  border: 10px solid #0f172a;
  box-shadow: 0 30px 55px rgba(15, 23, 42, 0.35);
}

.scroll-area {
  height: 100%;
  overflow-y: auto;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--safe-bottom) + 12px);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-area.no-tab {
  padding-bottom: 28px;
}

.scroll-area.with-subnav {
  padding-top: calc(var(--safe-top) + var(--nav-bar));
}

.scroll-area::-webkit-scrollbar {
  display: none;
}

.subnav {
  position: absolute;
  top: var(--safe-top);
  left: 0;
  right: 0;
  height: var(--nav-bar);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 8px;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
}

.subnav-title {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
}

.subnav-back {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--brand);
  font-size: 16px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: default;
  font-weight: 500;
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
}

.option-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  transition: border-color 0.15s;
}

.option-card.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.option-card.correct {
  border-color: #10b981;
  background: #ecfdf5;
}

.option-card.wrong {
  border-color: #ef4444;
  background: #fef2f2;
}

.progress-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) var(--pct, 0%), #e2e8f0 0);
  display: grid;
  place-items: center;
}

.progress-ring-inner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
}
