:root {
  --bg: #f5f5f2;
  --card-bg: #e0f2e9;
  --accent: #20332a;
  --max-width: 650px;
}

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

/* Fonts */
@font-face {
  font-family: "PKMN-RBYGSC";
  src: url("fonts/PKMN_RBYGSC.ttf") format("truetype");
}

@font-face {
  font-family: "Automate_OT_Regular";
  src: url("fonts/Automate_OT_Regular.ttf") format("opentype");
  font-weight: 700;
}

/* Body */
body {
  font-family: "PKMN-RBYGSC", sans-serif;
  background: var(--bg);
  color: var(--accent);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Wrapper */
.wrapper {
  width: 100%;
  max-width: var(--max-width);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  height: 90%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  overflow-y: auto;
}

/* Landing Page */
#landing-page {
  justify-content: center;
}

/* Subtitle */
.subtitle {
  font-family: "Automate_OT_Regular", sans-serif;
  font-weight: 400;
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: var(--accent);
  text-align: left;
  width: 100%;
  margin-bottom: 8px;
  letter-spacing: 1px;
  line-height: 1.2;
}

/* Title */
h1.title {
  font-family: "Automate_OT_Regular", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--accent);
  text-align: left;
  width: 100%;
  line-height: 1.1;
  margin: 0;
  word-break: break-word;
}

.header-image {
  width: 460px;
  height: auto;
  border-radius: 12px;
}

/* Question Image */
#question-image {
  width: 100%;
  max-width: 420px;
  max-height: 65vh;     /* ADD */
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 12px;
  pointer-events: none;
  object-fit: contain; /* ADD */
}


/* Choice Buttons */
.choice-button {
  display: block;
  width: 100%;
  margin: 16px 0;
  padding: 24px 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: "PKMN-RBYGSC", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  letter-spacing: 3px;
  word-spacing: 3px;
  line-height: 1.8;
  position: relative;
}

.choice-button:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  background: #f2d646;
  color: #4a5f4b;
}

/* Choice Images */
.answer-image {
  width: 180px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.choice-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

/* Arrow */
.choice-button:hover::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("images/arrow.png");
  background-size: cover;
  background-repeat: no-repeat;
}

/* Story + Choices */
#story-text {
  margin-bottom: 16px;
  width: 100%;
  line-height: 1.8;
  word-spacing: 5px;
  text-align: center; 
}


#choices {
  width: 100%;
}

/* Result container */
.result-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
  max-width: 900px;
  margin: auto;
  padding: 20px;
  box-sizing: border-box;
}

#result .result-card {
  width: 100%;
  max-width: none;        /* Let it fill the card */
  align-self: stretch;    /* BREAKS OUT of center alignment */
}


/* Left column */
.result-left,
.result-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Result image */
.result-img {
  width: 100%;
  max-width: 220px;
  border-radius: 15px;
}

/* Full-width beige category box */
.detail-box {
  width: 100%;
  background: #f7f1e6;      /* beige */
  padding: 20px 24px;
  margin: 0;
  margin-bottom: 22px;
  box-sizing: border-box;
}

/* CATEGORY TITLE — THIS WAS THE MISSING PART */
.title-box {
  background: #6b4f3a;      /* brown */
  color: #f7f1e6;           /* beige */
  text-align: center;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Category description */
.detail-box p {
  margin: 0;
  line-height: 1.7;
  letter-spacing: 0.3px;
  color: #3d2e22;
  font-size: 1rem;
}

.result-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #5b3a29;
  font-weight: 700;
}

/* Mobile layout */
@media (max-width: 550px) {
  .result-card {
    grid-template-columns: 1fr;
  }

  .result-img {
    max-width: 240px;
    margin: 0 auto;
  }
}
