@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

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

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #fff;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* === СКРИНЫ === */
.screen {
  display: none;
  width: 100%;
  max-width: 700px;
  animation: fadeUp 0.5s ease;
}
.screen.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === СТАРТ === */
.start-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.start-emoji {
  font-size: 72px;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.start-card h1 {
  font-size: 2.2em;
  font-weight: 900;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #f7971e, #ffd200, #f7971e);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.subtitle {
  color: rgba(255,255,255,0.6);
  font-size: 1.1em;
  margin-bottom: 30px;
}

.type-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 35px;
}

.type-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
}
.type-badge.medal { background: rgba(255,215,0,0.2); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
.type-badge.explorer { background: rgba(0,200,150,0.2); color: #00c896; border: 1px solid rgba(0,200,150,0.3); }
.type-badge.wolf { background: rgba(200,50,50,0.2); color: #ff6b6b; border: 1px solid rgba(200,50,50,0.3); }
.type-badge.talker { background: rgba(100,150,255,0.2); color: #7eb8ff; border: 1px solid rgba(100,150,255,0.3); }

.btn-start {
  background: linear-gradient(135deg, #f7971e, #ffd200);
  color: #1a1a2e;
  border: none;
  padding: 16px 40px;
  border-radius: 14px;
  font-size: 1.15em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}
.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(247,151,30,0.4);
}
.btn-start:active { transform: scale(0.97); }

/* === ВОПРОС === */
.quiz-header {
  margin-bottom: 24px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress-fill {
  height: 100%;
  width: 5%;
  background: linear-gradient(90deg, #f7971e, #ffd200);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.question-counter {
  text-align: right;
  font-size: 0.9em;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

.question-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

#question-text {
  font-size: 1.35em;
  font-weight: 700;
  margin-bottom: 28px;
  line-height: 1.4;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-btn {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 16px 22px;
  border-radius: 14px;
  font-size: 1em;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s;
  font-family: inherit;
  line-height: 1.4;
}
.answer-btn:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  transform: translateX(6px);
}
.answer-btn.selected {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
  opacity: 0.5;
}

/* === НАВИГАЦИЯ === */
.quiz-nav {
  margin-bottom: 14px;
}

.btn-back {
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.9em;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-back:hover {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.btn-back:active { transform: scale(0.97); }
.btn-back.hidden { visibility: hidden; pointer-events: none; }

/* === РЕЗУЛЬТАТ === */
.result-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

#result-title {
  font-size: 2em;
  font-weight: 900;
  margin-bottom: 12px;
}

.result-description {
  color: rgba(255,255,255,0.65);
  font-size: 1.05em;
  margin-bottom: 35px;
  line-height: 1.5;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.result-bars {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 35px;
  text-align: left;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bar-icon { font-size: 1.6em; width: 40px; text-align: center; flex-shrink: 0; }

.bar-info { flex: 1; }
.bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.95em;
}
.bar-pct { font-weight: 700; }

.bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 6px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill.medal { background: linear-gradient(90deg, #b8860b, #ffd700); }
.bar-fill.explorer { background: linear-gradient(90deg, #007a5e, #00c896); }
.bar-fill.wolf { background: linear-gradient(90deg, #8b1a1a, #ff6b6b); }
.bar-fill.talker { background: linear-gradient(90deg, #3a5fcd, #7eb8ff); }

.result-type-detail {
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 30px;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.08);
}
.result-type-detail h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
}
.result-type-detail p {
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

/* === ШАРИНГ === */
.share-section {
  margin-top: 20px;
  margin-bottom: 0;
}

.share-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.65);
  font-size: 0.95em;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}
.share-toggle:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.share-arrow {
  font-size: 1.1em;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-block;
}
.share-toggle.open .share-arrow {
  transform: rotate(180deg);
}

.share-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.35s ease,
              opacity 0.3s ease;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.share-panel.open {
  max-height: 120px;
  opacity: 1;
  padding-top: 16px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 0.9em;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}
.share-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.1);
}
.share-btn .share-icon {
  font-size: 1.3em;
  line-height: 1;
}

/* Цвета соцсетей при наведении */
.share-btn.vk:hover { border-color: #507299; background: rgba(80,114,153,0.15); }
.share-btn.telegram:hover { border-color: #26a5e4; background: rgba(38,165,228,0.15); }
.share-btn.twitter:hover { border-color: #e7e9ea; background: rgba(231,233,234,0.1); }
.share-btn.whatsapp:hover { border-color: #25d366; background: rgba(37,211,102,0.15); }
.share-btn.copy:hover { border-color: #ffd200; background: rgba(255,210,0,0.1); }
.share-btn.copied { border-color: #00c896; background: rgba(0,200,150,0.15); color: #00c896; }

/* === АДАПТИВ === */
@media (max-width: 600px) {
  .start-card, .question-card, .result-card {
    padding: 30px 22px;
  }
  .start-card h1 { font-size: 1.6em; }
  #question-text { font-size: 1.15em; }
  .result-card { padding: 35px 22px; }
}
