/* BASIC RESET & LAYOUT */
body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

header {
  background-color: #282828;
  color: white;
  padding-top: 20px;
  text-align: center;
  height: 75px;
  width: 100%;
}

main {
  width: 100%;
  display: flex;
  gap: 50px;
}

button {
  background-color: #282828;
  color: #ffae00;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 18px;
}

button:disabled,
button:disabled:hover {
  background-color: #8f1f1f;
  cursor: not-allowed;
  color: #000;
}

button:hover {
  background: #ffae00;
  color: #000;
}

/* FOOTER & SOCIAL */
footer {
  background-color: #282828;
  color: white;
  text-align: center;
  height: 150px;
  padding-top: 50px;
  width: 100%;
}

header h1 {
    margin: 0;
}

input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  box-sizing: border-box; /* Ensures padding doesn't break width */
}

.logo {
  max-height: 75px;
  position: sticky;
  left: 70%;
  height: 100%;
}

.left_container {
  max-width: 350px;
  width: 100%;
  padding-top: 24px;
}

.main_container {
  padding: 24px;
  text-align: center;
  width: 100%;
}

.right_container {
  max-width: 350px;
  width: 100%;
  padding-top: 24px;
}

/* SIDEBAR & GAME LIST */
.game-list {
  display: grid;
  gap: 20px;
  padding: 15px;
}

.game_list_a {
  text-decoration: none;
}

.game {
  background-color: #fff;
  border: 3px solid #282828;
  border-radius: 10px;
  text-align: center;
  color: #282828;
  font-size: 12px;
  margin-top: 7px;
}

.game:hover {
  border: 3px solid #ffae00;
  background-color: #282828;
  color: #ffae00;
}

.footer_list {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.social_icons {
  font-size: 40px;
  color: #fff;
}

.social_icons:hover {
  color: #ffae00;
}

/* MOBILE MENU (Common to both) */
.menu-toggle {
  display: none;
  position: absolute;
  left: 20px;
  top: 20px;
  background: transparent;
  font-size: 24px;
}

.social_share_section {
  margin-top: 50px;
  margin-bottom: 50px;
}
.share-buttons a{
  padding: 5px 30px;
  color: #000;
  font-size: 36px;
  border: 1px solid;
  border-radius: 10px;
}
.share-buttons a:hover {
  background: #282828;
  color: #ffae00;
}
.share-buttons i {
  margin-bottom: 20px;
}

/* DATE CONTROLS */
#dateContainer {
  gap: 10px;
  margin-bottom: 20px;
}
#datePicker {
  max-width: 200px;
  width: 50%;
}

/* MAIN QUIZ BOX */
.bigtale_quize {
  position: relative;
  text-align: center;
  background-color: #000;
  color: #00a859;
  border-radius: 15px;
  min-height: 300px;
  padding-top: 10px;
  margin: 10px;
  max-width: calc(100% - 18px);
  width: auto;
}

.social-icon-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    width: 50px;
}

/* Container for the floating suggestions */
.suggestions-list {
  position: absolute;
  z-index: 1000;
  background: #222;
  border: 1px solid #444;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  display: none;
  list-style: none;
  padding: 0;
  margin-top: 10px;
  width: 100%;
  top: 100%;
  left: 0;
}

.suggestion-item,
.suggestions-list li {
  padding: 8px 12px;
  cursor: pointer;
  color: #eee;
  border-bottom: 1px solid #333;
  font-size: 14px;
}

.suggestion-item:hover,
.suggestions-list li:hover {
  background: #ffae00;
  color: #000;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  visibility: hidden; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Modal Content Box */
.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  text-align: center;
  border: 1px solid #3a3a3c;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-content h2 {
  margin-top: 0;
  color: #000;
}

.rules-text {
  text-align: left;
  line-height: 1.6;
  margin: 20px 0;
  font-size: 0.95rem;
}

/* Show class to be triggered by JS */
.modal-overlay.show {
  visibility: visible;
  opacity: 1;
}

.primary-btn:hover {
  background: #ffae00;
  color: #000;
}

/* Responsive design */
@media (max-width: 1000px) {
  /* Sidebar specific layout common to both */
  body.menu-open {
      overflow: hidden;
  }
  main {
      flex-direction: column;
      align-items: center;
      gap: 20px;
  }
  header {
      padding-top: 10px;
      height: auto;
  }
  footer {
      height: auto;
      padding-top: 30px;
      padding-bottom: 20px;
  }
  .menu-toggle {
    display: block;
  }
  .logo {
    left: 25%;
    max-height: 60px;
    position: relative;
    margin-right: 10px;
  }
  .left_container {
    position: fixed;
    top: 0;
    left: -350px;
    width: 280px;
    height: 100%;
    background: #282828;
    z-index: 1000;
    transition: 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    padding-top: 60px;
  }
  .left_container.open {
    left: 0;
  }
  .right_container,
  .main_container {
    width: auto;
  }
  .right_container {
    max-width: 100%;
    width: auto;
    padding-top: 10px;
    margin-bottom: 20px;
  }
  .game-list h3 {
    color: #ffae00;
  }
  .footer_list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 0 10px;
  }
  .social_icons {
    font-size: 30px;
  }
  .social-icon-link {
    width: 40px;
  }
  .game {
      border: 1px solid #444;
      margin: 0 10px;
      padding: 0;
  }
}

@media (max-width: 480px) {
  header {
    padding: 10px;
  }
  #resultsTable {
    font-size: 12px;
  }
  .logo {
    max-height: 50px;
    position: relative;
    margin-bottom: -12px;
  }
  .footer_list {
    grid-template-columns: 1fr;
  }
}
