*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: #0a0a0f;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(ellipse at 20% 50%, rgba(240,81,56,0.12) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(100,120,255,0.08) 0%, transparent 50%);
}

.container {
  width: 100%;
  max-width: 640px;
  padding: 1.5rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2rem;
}
.swift-logo { width: 44px; height: 44px; filter: drop-shadow(0 4px 12px rgba(240,81,56,.5)); }
.brand {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #F05138 0%, #ff8c6e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: .75rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F05138, #ff8c6e);
  border-radius: 2px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

.q-counter {
  font-size: .8rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.25rem;
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.card h2 {
  font-size: 1.15rem;
  color: #f0f0f0;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.options { display: flex; flex-direction: column; gap: .75rem; }

.option-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: .9rem 1.2rem;
  color: #d8d8d8;
  font-size: .95rem;
  text-align: left;
  cursor: pointer;
  transition: all .2s ease;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.option-btn:hover:not(:disabled) {
  background: rgba(240,81,56,0.12);
  border-color: rgba(240,81,56,0.4);
  color: #fff;
  transform: translateX(4px);
}
.option-btn.correct {
  background: rgba(52,199,89,0.15);
  border-color: #34C759;
  color: #34C759;
}
.option-btn.wrong {
  background: rgba(255,69,58,0.15);
  border-color: #FF453A;
  color: #FF453A;
}
.option-btn:disabled { cursor: default; }

.btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #F05138 0%, #c73a24 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  letter-spacing: .02em;
}
.btn:hover { opacity: .9; transform: scale(1.01); }

/* Result */
.result-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.trophy { font-size: 3.5rem; margin-bottom: 1rem; }
.result-card h2 { font-size: 1.8rem; color: #fff; margin-bottom: .5rem; }
.result-card p { color: rgba(255,255,255,0.55); margin-bottom: 1.5rem; font-size: .95rem; }

.score-circle {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 3px solid #F05138;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 24px rgba(240,81,56,.35);
}
.score-circle span { font-size: 1.6rem; font-weight: 700; color: #F05138; }

.review { text-align: left; margin-bottom: 1.5rem; }
.review-item { margin-bottom: 1rem; padding: .9rem 1rem; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
.review-item .r-q { font-size: .8rem; color: rgba(255,255,255,0.4); margin-bottom: .3rem; font-family: 'SF Mono','Fira Code',monospace; }
.review-item .r-ans { font-size: .9rem; }
.review-item.pass .r-ans { color: #34C759; }
.review-item.fail .r-ans { color: #FF453A; }
