@font-face {
  font-family: 'Mont';
  src: url('../fonts/Mont-Light.otf') format('opentype');
  font-weight: 300;
}
@font-face {
  font-family: 'Mont';
  src: url('../fonts/Mont-Bold.otf') format('opentype');
  font-weight: 700;
}
@font-face {
  font-family: 'Mont';
  src: url('../fonts/Mont-Heavy.otf') format('opentype');
  font-weight: 800;
}

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

:root {
  --bg: #000;
  --primary: #E32464;
  --secondary: #41A5B4;
  --purple: #8B5CF6;
  --white: #fff;
  --gray: #999;
  --gray-dark: #333;
}

html, body {
  height: 100%;
  font-family: 'Mont', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* App container */
.app {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Screens */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* ========== LANDING ========== */
.landing-content {
  min-height: 100vh;
  background: var(--bg);
  cursor: pointer;
}

.landing-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  text-transform: uppercase;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--gray-dark);
}

.btn-secondary:hover {
  border-color: var(--gray);
  color: var(--white);
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--gray-dark);
  position: sticky;
  top: 0;
  z-index: 10;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.4s ease;
}

/* ========== QUIZ ========== */
.quiz-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 2rem;
}

.question-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.question-icon {
  font-size: 1.2rem;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.answer-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gray-dark);
  border-radius: 12px;
  color: var(--white);
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.answer-btn:active {
  transform: scale(0.98);
}

.answer-btn .answer-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.answer-btn[data-type="spark"] .answer-letter {
  background: var(--primary);
}
.answer-btn[data-type="architect"] .answer-letter {
  background: var(--secondary);
}
.answer-btn[data-type="alchemist"] .answer-letter {
  background: var(--purple);
}

/* Hover solo su dispositivi con mouse */
@media (hover: hover) {
  .answer-btn[data-type="spark"]:hover {
    border-color: var(--primary);
    background: rgba(227, 36, 100, 0.08);
  }
  .answer-btn[data-type="architect"]:hover {
    border-color: var(--secondary);
    background: rgba(65, 165, 180, 0.08);
  }
  .answer-btn[data-type="alchemist"]:hover {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.08);
  }
}

/* Stato selezionato (flash neutro al tap) */
.answer-btn.selected {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

/* Transizione tra domande */
.quiz-content {
  transition: opacity 0.25s ease;
}
.quiz-content.fade-out {
  opacity: 0;
}

/* ========== RISULTATO ========== */
.result-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  gap: 2rem;
}

.result-card {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.result-card.spark {
  background: linear-gradient(160deg, #E32464 0%, #FF6B6B 50%, #E32464 100%);
}
.result-card.architect {
  background: linear-gradient(160deg, #41A5B4 0%, #2DD4BF 50%, #41A5B4 100%);
}
.result-card.alchemist {
  background: linear-gradient(160deg, #8B5CF6 0%, #A78BFA 50%, #8B5CF6 100%);
}

.result-card-inner {
  text-align: center;
  padding: 2rem;
}

.result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.result-name {
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-tagline {
  font-size: 1rem;
  font-style: italic;
  opacity: 0.9;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.result-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.result-traits {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trait {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.trait-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.result-superpower h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.result-superpower p {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding-bottom: 2rem;
}

.result-actions .btn {
  width: 100%;
  text-align: center;
}
