/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0e27;
  --bg-card: #111638;
  --bg-hover: #1a1f4a;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --text: #e8eaf6;
  --text-dim: #8b8fb0;
  --red: #ff4d6a;
  --orange: #ff9f43;
  --yellow: #ffd32a;
  --green: #00d4aa;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 39, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  font-size: 1.6rem;
  color: var(--accent);
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.header-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.header-nav a:hover {
  color: var(--text);
}
.btn-nav {
  background: var(--accent);
  color: var(--bg) !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: opacity var(--transition);
}
.btn-nav:hover {
  opacity: 0.85;
}

/* ===== Progress Bar ===== */
.progress-bar {
  position: fixed;
  top: 61px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition);
}
.progress-bar.visible {
  opacity: 1;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #00f5c8);
  transition: width 0.5s ease;
  border-radius: 0 2px 2px 0;
}

/* ===== Screens ===== */
.screen {
  display: none;
  min-height: 100vh;
  padding: 100px 1.5rem 3rem;
  justify-content: center;
  align-items: center;
}
.screen.active {
  display: flex;
}

/* ===== Intro ===== */
.intro-content {
  max-width: 640px;
  text-align: center;
  animation: fadeUp 0.6s ease;
}

.intro-badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.intro-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto 2rem;
}

.intro-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  text-align: left;
}
.intro-feat {
  font-size: 0.95rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.feat-icon {
  color: var(--accent);
  font-weight: 700;
}

.intro-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* ===== Buttons ===== */
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.3);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ===== Question Screen ===== */
.question-container {
  max-width: 600px;
  width: 100%;
  animation: fadeUp 0.4s ease;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.question-category {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}
.question-count {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.question-text {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 2rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.option-btn {
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.option-btn:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}
.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.option-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
}
.option-btn.selected .option-marker {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.question-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* ===== Results ===== */
.results-container {
  max-width: 700px;
  width: 100%;
  animation: fadeUp 0.6s ease;
}
.results-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.score-display {
  text-align: center;
  margin-bottom: 3rem;
}

.score-gauge {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
}
.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 10;
}
.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition:
    stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1),
    stroke 0.5s ease;
}
.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.gauge-score {
  font-size: 3rem;
  font-weight: 800;
  display: block;
  line-height: 1;
}
.gauge-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.grade-badge {
  display: inline-block;
  font-size: 2rem;
  font-weight: 800;
  width: 64px;
  height: 64px;
  line-height: 64px;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  transition: background 0.5s ease;
}
.grade-label {
  color: var(--text-dim);
  font-size: 1rem;
}

/* Category bars */
.category-breakdown {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.category-breakdown h3 {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.cat-row {
  margin-bottom: 1rem;
}
.cat-row:last-child {
  margin-bottom: 0;
}
.cat-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.cat-name {
  font-weight: 600;
}
.cat-score {
  color: var(--text-dim);
}
.cat-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.cat-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  transition: width 1s ease 0.3s;
}

/* Recommendations */
.recommendations {
  margin-bottom: 2rem;
}
.recommendations h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.rec-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--accent);
}
.rec-card.priority-high {
  border-left-color: var(--red);
}
.rec-card.priority-medium {
  border-left-color: var(--orange);
}
.rec-card.priority-low {
  border-left-color: var(--yellow);
}

.rec-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.rec-priority {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.rec-card.priority-high .rec-priority {
  background: rgba(255, 77, 106, 0.15);
  color: var(--red);
}
.rec-card.priority-medium .rec-priority {
  background: rgba(255, 159, 67, 0.15);
  color: var(--orange);
}
.rec-card.priority-low .rec-priority {
  background: rgba(255, 211, 42, 0.15);
  color: var(--yellow);
}

.rec-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.rec-body {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Results actions */
.results-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* Share */
.share-section {
  text-align: center;
  margin-bottom: 2.5rem;
}
.share-section h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}
.share-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-share {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  color: #fff;
}
.btn-share:hover {
  transform: translateY(-1px);
}
.btn-linkedin {
  background: #0a66c2;
}
.btn-twitter {
  background: #1d9bf0;
}
.btn-copy {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
}
.btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* CTA Banner */
.cta-banner {
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 170, 0.1),
    rgba(0, 245, 200, 0.05)
  );
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: var(--radius);
  padding: 2rem;
}
.cta-banner h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.cta-banner p {
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

/* ===== Modals ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 200;
  padding: 1.5rem;
}
.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 440px;
  width: 100%;
  position: relative;
  animation: scaleIn 0.3s ease;
  box-shadow: var(--shadow);
}
.modal-small {
  text-align: center;
  max-width: 380px;
}

.modal h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.modal p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}
.modal-close:hover {
  color: var(--text);
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.modal input {
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.modal input:focus {
  outline: none;
  border-color: var(--accent);
}
.modal input::placeholder {
  color: var(--text-dim);
}

.modal-skip {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 1rem;
  text-decoration: underline;
  transition: color var(--transition);
}
.modal-skip:hover {
  color: var(--text);
}

.modal-check {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: 700;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .header {
    padding: 0.75rem 1rem;
  }
  .header-nav a:not(.btn-nav) {
    display: none;
  }
  .intro-features {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: 1.5rem;
  }
  .results-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .results-actions .btn-primary,
  .results-actions .btn-secondary {
    justify-content: center;
  }
  .question-nav {
    flex-direction: column-reverse;
  }
  .question-nav .btn-secondary,
  .question-nav .btn-primary {
    width: 100%;
    justify-content: center;
  }
}
