/* ---------- RESET ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

[hidden] {
  display: none !important;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f5f0e8;
  color: #4a4238;
  min-height: 100vh;
}


/* ---------- APP WRAPPER ---------- */
#app {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
}

/* ---------- HOME VIEW ---------- */
#homeView {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.homeView-title {
  text-align: center;
  margin-bottom: 30px;
}

.homeView-title h2 {
  margin-bottom: 10px;
}

.homeView-title a {
  color: #c97a5f;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.topic-list button {
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #c97a5f;
  border-radius: 8px;
  background: transparent;
  color: #5d4037;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(193, 105, 76, 0.25);
  transform: translateY(0);
}

.topic-list button:hover {
  background: #f0e4d6;
  border-color: #b8673d;
  box-shadow: 0 8px 20px rgba(193, 105, 76, 0.35);
  transform: translateY(-4px);
}

.topic-list button:active {
  box-shadow: 0 2px 4px rgba(193, 105, 76, 0.2);
  transform: translateY(-1px);
}

.divider {
  border-top: 2px solid #c97a5f;
  margin: 10px 0px 10px 0px;
}

/* ---------- SESSION VIEW ---------- */
#sessionView {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 300px;
}

/* ---------- HEADER ---------- */
.session-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.session-header-left {
  flex-shrink: 0;
  width: auto;
}

.session-header-right {
  flex: 1;
  text-align: center;
}

#backButton {
  cursor: pointer;
  border: none;
  background: transparent;
  align-self: left;
  color: inherit;
}

#backButton:visited {
  color: inherit;
}

#topicTitle {
  font-size: 1.2rem;
}

/* ---------- PROGRESS ---------- */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#progressText {
  font-size: 0.9rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e8dace;
  border-radius: 3px;
  overflow: hidden;
}

#progressFill {
  width: 20%;
  height: 100%;
  background: #c97a5f;
}

/* ---------- CARD ---------- */
.card {
  background: #fffbf7;
  padding: 20px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(193, 105, 76, 0.1);
  width: 300px;
}

.question {
  font-size: 1.4rem;
  text-align: center;
}

/* ---------- ANSWERS ---------- */
.answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.answers button {
  padding: 12px;
  cursor: pointer;
  border: 2px solid #d4a574;
  background: #f9f5f0;
  color: #5d4037;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(193, 105, 76, 0.2);
  transform: translateY(0);
}

.answers button:hover {
  background: #f0e4d6;
  border-color: #c97a5f;
  box-shadow: 0 8px 16px rgba(193, 105, 76, 0.3);
  transform: translateY(-3px);
}

.answers button:active {
  box-shadow: 0 2px 4px rgba(193, 105, 76, 0.15);
  transform: translateY(-1px);
}

/* ---------- FEEDBACK ---------- */
.feedback {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#feedbackText {
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#nextButton {
  padding: 12px;
  cursor: pointer;
  border: 2px solid #c97a5f;
  background: #f9f5f0;
  color: #5d4037;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(193, 105, 76, 0.2);
  transform: translateY(0);
}

#nextButton:hover {
  background: #f0e4d6;
  border-color: #b8673d;
  box-shadow: 0 8px 16px rgba(193, 105, 76, 0.3);
  transform: translateY(-3px);
}

#nextButton:active {
  box-shadow: 0 2px 4px rgba(193, 105, 76, 0.15);
  transform: translateY(-1px);
}

/* ---------- MOBILE MEDIA QUERY ---------- */
@media (max-width: 380px) {
  #app {
    max-width: 100%;
    padding: 12px;
  }

  .session-header {
    gap: 8px;
  }

}