/* ==============================
   VARIABLES
============================== */
:root {
  --font-family: 'Roboto', sans-serif;
  --color-background: #f0f2f5;
  --color-text: #333;
  --color-heading: #2c3e50;
  --color-primary: #3498db;
  --color-primary-hover: #2980b9;
  --color-primary-active: #1f5d7b;
  --color-success: #4caf50;
  --color-error: #e74c3c;
  --color-warning: #f39c12;
  --color-info: #3498db;
  --border-radius: 5px;
  --transition-duration: 0.3s;
}


//////
.terpene-options-container button {
   display: none; /* Initially hide all terpene buttons */
}

.game-section.active .terpene-options-container button {
   display: inline-block;
}


/* ==============================
   GLOBAL ELEMENT STYLES
============================== */
body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  background-color: var(--color-background);
  color: var(--color-text);
}

h1, h2 {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-heading);
}

p {
  margin: 0.5rem 0;
}

/* ==============================
   BUTTON STYLES
============================== */
button {
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color var(--transition-duration) ease, 
              box-shadow var(--transition-duration) ease, 
              transform var(--transition-duration) ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
}

button:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

button:active {
  background-color: var(--color-primary-active);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}


/* ==============================
   CUSTOM BUTTON COLORS
============================== */
.button-red {
  background-color: var(--color-error);
  color: white;
  background: linear-gradient(145deg, var(--color-error), #d32f2f);
}

.button-green {
  background-color: var(--color-success);
  color: white;
  background: linear-gradient(145deg, var(--color-success), #388e3c);
}

.button-blue {
  background-color: var(--color-info);
  color: white;
  background: linear-gradient(145deg, var(--color-info), #1e88e5);
}

.button-yellow {
  background-color: var(--color-warning);
  color: white;
  background: linear-gradient(145deg, var(--color-warning), #fbc02d);
}

/* ==============================
   RECEPTOR STYLES
============================== */
.receptor {
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-duration) ease, border-color var(--transition-duration) ease;
}

.receptor-cb1 {
  background-color: #9b59b6;
  border-color: #8e44ad;
}

.receptor-cb2 {
  background-color: #f1c40f;
  border-color: #f39c12;
}

.receptor.drag-over {
  border-color: var(--color-primary);
  background-color: #ecf9f2;
}

.label {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px dashed #ccc;
  border-radius: var(--border-radius);
  background-color: #f9f9f9;
  cursor: grab;
}

/* ==============================
   TERPENE BUTTON COLORS
============================== */
.terpene-option {
  margin: 0.5rem;
  padding: 0.5rem 1rem;
  color: white;
}

.terpene-option-pinene,
.terpene-option-humulene {
  background-color: #16a085;
}

.terpene-option-limonene,
.terpene-option-linalool {
  background-color: #e67e22;
}

.terpene-option-myrcene,
.terpene-option-beta-caryophyllene {
  background-color: #e74c3c;
}

/* ==============================
   GENERAL BUTTON STYLING
============================== */
button {
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin: 5px;
}

button:hover {
  opacity: 0.8;
}

/* ==============================
  LAYOUT FOR MAIN SECTIONS
============================== */
#menu, .game-section {
  width: 90%;
  max-width: 700px;
  margin: 2rem auto;
  background: linear-gradient(to right, #ffecd2, #fcb69f);

  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 8px;
}
#menu {
  text-align: center;
}
#menu ul {
  list-style: none;
  padding: 0;
}
#menu li {
  margin-bottom: 1rem;
}
#menu a {
  text-decoration: none;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
#menu a:hover {
  background-color: #eee;
}
.game-section {
  display: none; /* Initially hide all game sections */
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.game-section.active {
    display: block; /* Show the active section */
    opacity: 1;
    transform: translateX(0);
}

 .terpene-options-container button {
      display: none; /* Initially hide all terpene buttons */
  }

  .game-section.active .terpene-options-container button {
      display: inline-block;
  }

/* ==============================
   SCORE DISPLAY
============================== */
.score-container {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  padding: 1em;
  max-width: 300px;
  margin: 1em auto;
  border-radius: var(--border-radius);
}

.score-container p {
  margin: 0.5em 0;
  font-weight: 500;
}

.score-container hr {
  margin: 0.7em 0;
}

.score-container span {
  font-weight: 700;
  color: var(--color-success);
}

/* ==============================
   HEADER STYLES
============================== */
.main-header {
  display: flex;
//  align-items: center;
  justify-content: center;
  background-color: #f0f2f5;
  padding: 2rem;
  box-shadow: 1 2px 8px rgba(0,0,0,0.15);
}

.logo {
  height: 60px;
  margin-right: 1rem;
}

/* ==============================
   TERPENE GAME
============================== */
.terpene-options-container,
.options-container {
  margin: 1rem 0;
  text-align: center;
}

#terpene-game h1 {
  color: white;
}

#terpene-game {
  background: url('nature-background.jpg.webp') no-repeat center center fixed;
  background-size: cover;
}

#terpene-image {
  display: block;
  margin: 1rem auto;
}

#result-message,
#connection-result {
  text-align: center;
  font-weight: bold;
  margin-bottom: 1rem;
}

#result-message {
  color: #e67e22;
}

#connection-result {
  color: #8e44ad;
}

/* ==============================
   CONNECTION GAME
============================== */

.connection-option {
  padding: 15px 25px; /* Increase padding for better spacing */
  margin: 10px; /* Increase margin for separation */
  font-size: 18px; /* Increase font size for readability */
  cursor: pointer;
  border: 2px solid #ccc; /* Add border for better visibility */
  background-color: #f9f9f9;
  color: #f5f5f5; /* Ensure text color is dark for contrast */
  border-radius: var(--border-radius); /* Add border radius for rounded corners */
  transition: background-color var(--transition-duration) ease, color var(--transition-duration) ease;
}

.connection-option:hover {
  background-color: #e0e0e0; /* Change background color on hover */
  color: #000; /* Ensure text color remains readable */
}

.connection-option:focus {
  outline: none; /* Remove default outline */
  background-color: #d0d0d0; /* Change background color on focus */
}


/* ==============================
   CONNECTION GAME QUESTIONS
============================== */
.connection-question {
  padding: 20px 30px; /* Increase padding for better spacing */
  margin: 15px 0; /* Increase margin for separation */
  font-size: 20px; /* Increase font size for readability */
  line-height: 1.5; /* Increase line height for better readability */
  border: 2px solid #ccc; /* Add border for better visibility */
  background-color: #f0f2f5; /* Use a light background color */
  color: #2c3e50; /* Ensure text color is dark for contrast */
  border-radius: var(--border-radius); /* Add border radius for rounded corners */
  transition: background-color var(--transition-duration) ease, color var(--transition-duration) ease;
}

.connection-question:hover {
  background-color: #e0e0e0; /* Change background color on hover */
  color: #000; /* Ensure text color remains readable */
}

.connection-question:focus {
  outline: none; /* Remove default outline */
  background-color: #d0d0d0; /* Change background color on focus */
}

#connection-game {
  background: linear-gradient(to right, #ffffff, #e6e6e6);
}

/* ==============================
  RESPONSIVE MEDIA QUERIES
============================== */

@media (max-width: 768px) {
  /* Tablet Styles */
  h1, h2 {
    font-size: 1.8rem; /* reduce header sizes */
    margin-top: 1rem;
    margin-bottom: 0.8rem;
  }

  button {
     padding: 0.4rem 0.8rem; /*reduce padding on buttons */
     font-size: 0.9rem;
   }

  .score-container{
     max-width: 80%; /* let the score container take up more space */
     margin: 1.5rem auto;
  }
}


@media (max-width: 480px) {
  /* Phone Styles */
    h1, h2 {
    font-size: 1.5rem; /* reduce header sizes further */
    margin-top: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .terpene-options-container, .options-container {
   display: block;
  }

    .terpene-options-container button,
    .options-container button {
    display: block;
    width: 80%;
    margin: 0.5rem auto;
  }

   .score-container{
     max-width: 90%; /* let the score container take up most of the space */
     margin: 1rem auto;
  }
}
