JSFiddle - React, Tailwind, and code Playground

HTML

<div class="game-container">

  <!-- Start Page -->
  <div id="start-area" class="start-box">

    <h1>❤️ Guess The Red Place</h1>

    <p>
      16 red icons.<br>
      16 places around the world.<br><br>

      Can you recognize them all from just one red detail? 🌍
    </p>

    <button id="start-btn">
      Start Challenge
    </button>

  </div>



  <!-- Question Page -->
  <div id="question-area" style="display:none;">

    <div id="progress" class="progress">
      Question 1/16
    </div>


    <img 
      id="question-image"
      class="question-image"
      src=""
      alt="Red landmark"
    >


    <h2 class="question-title">
      Where does this red icon belong to?
    </h2>


    <div id="options-container">

      <!-- JavaScript will generate options here -->

    </div>


    <div id="answer-box" class="answer-box">

    </div>


    <button 
      id="next-btn"
      style="display:none;">
      Next Question →
    </button>


  </div>





  <!-- Result Page -->
  <div id="result-area" class="result-box" style="display:none;">

    <h1>
      ❤️ Your Red World Score
    </h1>


    <div class="score-text">

      You got 
      <span id="final-score">
        0
      </span>
      /100

    </div>



    <div class="share-box">

      <h3>
        💬 Share Your Red Memory
      </h3>


      <p>
        Which red landmark impressed you the most? ❤️
      </p>


      <p>
        Was it:
        <br><br>

        ✈️ A place you visited during a trip?
        <br><br>

        🏡 A landmark from your hometown?
        <br><br>

        🛠️ A scene that inspired your building project?
      </p>


      <p>
        Share your story in the comments!
      </p>


    </div>



    <button id="close-btn">
      Close
    </button>


  </div>


</div>

CSS

* {
  box-sizing: border-box;
}


body {
  margin: 0;
  padding: 0;
  background: #fff7f5;
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
}


.game-container {
  max-width: 650px;
  margin: 0 auto;
  padding: 20px;
}


/* =====================
   Start / Result Card
===================== */

.start-box,
.result-box {

  background: #ffffff;

  border-radius: 24px;

  padding: 35px 25px;

  text-align: center;

  box-shadow: 0 8px 25px rgba(0,0,0,0.08);

}


.start-box h1,
.result-box h1 {

  color: #d62828;

  margin-bottom: 20px;

}


.start-box p {

  font-size: 17px;

  line-height: 1.7;

  color: #555;

}



/* =====================
   Buttons
===================== */


button {

  border: none;

  background: #d62828;

  color: white;

  padding: 13px 28px;

  border-radius: 30px;

  font-size: 16px;

  cursor: pointer;

  transition: .2s;

}


button:hover {

  opacity: .85;

  transform: scale(1.03);

}




/* =====================
   Question Area
===================== */


.progress {

  text-align: center;

  font-size: 18px;

  font-weight: bold;

  color: #d62828;

  margin-bottom: 18px;

}



.question-image {

  width: 100%;

  height: 350px;

  object-fit: cover;

  border-radius: 18px;

  background: #eee;

}



.question-title {

  text-align: center;

  margin: 22px 0;

  font-size: 22px;

  color: #333;

}




/* =====================
   Answer Options
===================== */


.option-btn {

  width: 100%;

  background: white;

  color: #333;

  border: 2px solid #ddd;

  border-radius: 15px;

  padding: 15px;

  margin: 10px 0;

  text-align: left;

  font-size: 16px;

  cursor: pointer;

}



.option-btn:hover {

  border-color: #d62828;

}



.option-btn.correct {

  border: 3px solid #35a853;

  background: #edfff1;

  color:...

JavaScript

const questions = [

  // =========================
  // Easy Level (7 × 4 points)
  // =========================


  {
    image:"https://www.robotimeonline.com/cdn/shop/files/BlossomBookBooth-2.jpg?v=1774342071&width=1000",

    correct:"London",

    options:[
      "London",
      "Paris",
      "Dublin",
      "Tokyo"
    ],

    place:"London Red Telephone Booth",

    description:
    "The iconic red telephone booth is one of London's most recognizable symbols."
  },



  {
    image:"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMuIzEtigOQz3unjZpuNPqj4JAF1-xIGRoqLjQNBWgqtIKPqqkQHKq6b8&s=10",

    correct:"Tokyo",

    options:[
      "Tokyo",
      "Kyoto",
      "Seoul",
      "Taipei"
    ],

    place:"Tokyo Red Torii Gate",

    description:
    "The red torii gate is a famous symbol often seen at Japanese shrines."
  },



  {
    image:"https://images.chinahighlights.com/allpicture/2021/07/ba7326f5e3544102917eb2c0_cut_800x500_349.jpg",

    correct:"Beijing",

    options:[
      "Beijing",
      "Hong Kong",
      "Seoul",
      "Kyoto"
    ],

    place:"Beijing Forbidden City",

    description:
    "The red walls of the Forbidden City are a classic symbol of Beijing."
  },



  {
    image:"https://theabroadguide.com/wp-content/uploads/2025/04/1_times-square-after-dark-the-red-light-secrets-unveiled.jpg",

    correct:"New York",

    options:[
      "New York",
      "Hong Kong",
      "Shanghai",
      "Sydney"
    ],

    place:"New York Times Square",

    description:
    "The glowing red neon lights make Times Square instantly recognizable."
  },



  {
    image:"https://s7ap1.scene7.com/is/image/incredibleindia/red-fort-delhi-attr-hero?qlt=82&ts=1742170556347",

    correct:"New Delhi",

    options:[
      "New Delhi",
      "Kuala Lumpur",
      "Paris",
      "Las Vegas"
    ],

    place:"New Delhi Red Fort",

   ...