/* =============================================
   Cappuweb kviz - styly
   ============================================= */

:root {
  --cappu-brand:    #7a3102;
  --cappu-cafe:     #3b1f0e;
  --cappu-caramel:  #c8743c;
  --cappu-cream:    #f5ede3;
  --cappu-foam:     #fdf7f2;
  --cappu-text:     #2b1507;
  --cappu-muted:    #9e7356;
  --cappu-correct:  #3a7d44;
  --cappu-wrong:    #b03a2e;
}

/* --- wrapper --- */
.quiz-wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: 'Matel Sans', sans-serif;
  color: var(--cappu-text);
}

/* --- header --- */
.quiz-header {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.quiz-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--cappu-cafe);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.quiz-header p {
  color: var(--cappu-muted);
  font-size: 0.95rem;
}

/* --- progress --- */
.progress-bar-wrap {
  background: var(--cappu-cream);
  border-radius: 99px;
  height: 8px;
  margin-bottom: 0.6rem;
  overflow: hidden;
  border: 1px solid #ddd0c4;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cappu-caramel), var(--cappu-brand));
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

.progress-label {
  text-align: right;
  font-size: 0.8rem;
  color: var(--cappu-muted);
  margin-bottom: 1.5rem;
}

/* --- question card --- */
.question-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(122,49,2,0.09), 0 1px 4px rgba(122,49,2,0.06);
  border: 1px solid #e8ddd5;
  margin-bottom: 1.5rem;
  animation: cappu-fadeUp 0.35s ease both;
}

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

.question-num {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cappu-caramel);
  margin-bottom: 0.75rem;
}

.question-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--cappu-cafe);
  line-height: 1.45;
  margin-bottom: 1.5rem;
}

/* --- options --- */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option-btn {
  background: var(--cappu-foam);
  border: 2px solid #e2d4c8;
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  text-align: left;
  font-family: 'Matel Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--cappu-text);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.option-btn:hover:not(:disabled) {
  background: var(--cappu-cream);
  border-color: var(--cappu-caramel);
  transform: translateX(4px);
}

.option-btn.correct {
  background: #d4edda;
  border-color: var(--cappu-correct);
  color: var(--cappu-correct);
  font-weight: 700;
}

.option-btn.wrong {
  background: #fddede;
  border-color: var(--cappu-wrong);
  color: var(--cappu-wrong);
}

.option-btn:disabled { cursor: default; }

.option-letter {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--cappu-cream);
  border-radius: 50%;
  text-align: center;
  line-height: 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cappu-muted);
  margin-right: 0.6rem;
  transition: all 0.18s;
}

.option-btn.correct .option-letter { background: var(--cappu-correct); color: white; }
.option-btn.wrong   .option-letter { background: var(--cappu-wrong);   color: white; }

/* --- feedback --- */
.feedback {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  display: none;
}

.feedback.show       { display: block; animation: cappu-fadeUp 0.25s ease both; }
.feedback.correct-fb { background: #eaf5ec; color: #2d6a35; border-left: 3px solid var(--cappu-correct); }
.feedback.wrong-fb   { background: #fef0ef; color: #8e2e24; border-left: 3px solid var(--cappu-wrong); }

/* --- tlacitko dalsi --- */
.next-btn {
  display: none;
  margin-top: 1.2rem;
  background: linear-gradient(135deg, var(--cappu-caramel), var(--cappu-brand));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.8rem;
  font-family: 'Matel Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 12px rgba(122,49,2,0.2);
}

.next-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(122,49,2,0.25); }
.next-btn.show  { display: inline-block; animation: cappu-fadeUp 0.3s ease both; }

/* --- vysledkova karta --- */
.result-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(122,49,2,0.1);
  border: 1px solid #e8ddd5;
  text-align: center;
  display: none;
  animation: cappu-fadeUp 0.45s ease both;
}

.result-card.show { display: block; }

.result-emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  animation: cappu-pop 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes cappu-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.result-score {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--cappu-brand);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.result-score span { font-size: 1.2rem; color: var(--cappu-muted); font-weight: 400; }

.result-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--cappu-cafe);
  margin: 1rem 0 0.6rem;
}

.result-text {
  color: var(--cappu-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 1.8rem;
}

/* --- restart a link --- */
.restart-btn {
  background: transparent;
  border: 2px solid var(--cappu-brand);
  color: var(--cappu-brand);
  border-radius: 10px;
  padding: 0.7rem 1.6rem;
  font-family: 'Matel Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}

.restart-btn:hover { background: var(--cappu-brand); color: white; }

.cappuweb-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--cappu-brand);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.cappuweb-link:hover { border-color: var(--cappu-brand); }

/* --- share tlacitka --- */
.quiz-share {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.5rem 0 0.75rem;
}

.quiz-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: var(--cappu-foam);
  border: 2px solid #e2d4c8;
  color: var(--cappu-brand);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  flex-shrink: 0;
}

.quiz-share-btn svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.quiz-share-btn:hover {
  background: var(--cappu-brand);
  border-color: var(--cappu-brand);
  color: white;
  transform: translateY(-2px);
}

.quiz-share-btn.loading {
  opacity: 0.5;
  cursor: wait;
}

.quiz-share-btn.copied {
  background: var(--cappu-correct);
  border-color: var(--cappu-correct);
  color: white;
}

.quiz-share-hint {
  font-size: 0.8rem;
  color: var(--cappu-muted);
  margin: 0 0 0.5rem;
}

.quiz-share-hint a {
  color: var(--cappu-brand);
  text-decoration: none;
  font-weight: 700;
}

.quiz-share-hint a:hover { text-decoration: underline; }
