/* ==================== RESET ==================== */
body {
  margin: 0;
  padding: 0;
  background-color: white;
  font-family: poppins, sans-serif;
  overflow-x: hidden;
  height: 100%;
}
:root {
  --primary-color: #218c74; /* Primary color for the game */
  --secondary-color: #34ace0; /* Secondary color for chips */
  --text-color: black; /* Default text color */
  --tooltip-bg: black; /* Tooltip background color */
  --tooltip-text-color: white; /* Tooltip text color */
  --default-border-radius: 14px; /* Default border radius for elements */
  --default-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.40); /* Default box shadow */
}
/* ==================== HEADER ==================== */
.site-header {
  position: relative;
  height: 50px;
  /* background-color: var(--primary-color); */
}

.header-inner {
  height: 100%;
  position: relative; /* so we can position children inside */
}

.game-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%); 
  font-size: 20px;
  font-weight: 500;
  color: black;
}
.how-to-play-button {
  position: absolute;
  right: 200px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.how-to-play-button .material-symbols-outlined {
  font-size: 40px;
  color: black;
  transition: transform 0.2s ease, color 0.2s ease;
}

.how-to-play-button:hover .material-symbols-outlined {
  color: var(--primary-color);
}

.tooltip-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  visibility: hidden;
  width: 100px;
  background-color: black;
  color: white;
  text-align: center;
  border-radius: 10px;
  padding: 5px 0;
  position: absolute;
  top: 100%; /* 🔥 adjusted slightly */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 14px;
  pointer-events: none;
  z-index: 9999; /* 🔥 very high to be safe */
}

/* On hover: show tooltip */
.how-to-play-button:hover .tooltip-text {
  visibility: visible;
  opacity: 1;

}
.how-to-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.how-to-modal.hidden {
  display: none;
}

.how-to-modal-content {
  background: #f9f5ef;
  padding: 24px;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-family: 'Poppins', sans-serif;
  color: #000;
  position: relative;
}

.how-to-title {
  margin-top: 0;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.how-to-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: red;
  cursor: pointer;
}


.main-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center; /* ✅ center horizontally */
  justify-content: center; /* ✅ center vertically */

}

/* ==================== LOCATION (City + Country) ==================== */

.location-container {
  width: 40%;
  height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;  /* ✅ center horizontally */
  justify-content: flex-start; /* ✅ stack from top */
  box-sizing: border-box;
  margin:auto;
  padding-top: 10px;
}
.city-wrapper {
  width: 40vw;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.city-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  text-align: center;
  max-width: 30vw;
  max-height: 100%;
  
  font-size: 60px;
  line-height: 1;
  white-space: normal;
  word-break: break-word;
  
  text-wrap: pretty;
}



.clue-row-wrapper {
  position: relative;
  display: flex;
  justify-content: center; /* keeps the clue-row centered */
  align-items: center;
  width: 100%; /* full width of screen */
  margin-bottom: 20px; /* optional spacing */
}


.clue-row {
  display: flex;
  gap: 10px;
}
.clue-box {
  width: 106px;
  height: 98px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  
}

.clue-title {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 3px; /* small space between title and outer box */
}

.clue-box-body {
  width: 105px;
  height: 80px;
  background-color: white;
  border-radius: var(--default-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.40);
}

.flag-icon {
  max-width: 65px;
  max-height: 32px;
  object-fit: contain;
  border: 1px solid black; /* optional border */
}
.tooltip-target {
  position: relative;
}

.tooltip-popup {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  font-family: poppins, sans-serif;
}

.tooltip-popup.active {
  opacity: 1;
  pointer-events: auto;
}
.weather-icon {
  width: 46px; /* adjust as needed */
  height: auto;
  object-fit: contain;
}
.season-icon {
  width: 36px; /* adjust as needed */
  height: auto;
  object-fit: contain;
}
.time-icon{
  font-size: 24px;
}

.divider-mobile{
  display: none;
}
/* ==================== STATS AREA ==================== */
.chips-container {
  width: 236px;;
  height: 65px;
  display: flex;
  justify-content: space-between; /* chips attached to each side */
  align-items: center; /* vertical centering */
  box-sizing: border-box;
  margin-top: 70px;
  margin-bottom: 30px;
}

.chip{
  align-items: center;
  justify-items: center;
}
.chip-name{
  font-family: poppins, sans-serif;
  font-size: 14px;

  
}
.chip-inner-box {
  background-color: white;
  /* border: 1px solid black; */
  width: 90.4px;
  height: 63px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: var(--default-border-radius);
  box-shadow: var(--default-box-shadow);
}

.chip-icon {
  width: 18px; /* adjust as needed */
  height: auto;
  margin-right: 5px; /* spacing between icon and number */
}

.chip-value {
  font-size: 18px; /* adjust as needed */
  font-weight: 400;
  color: black;
}

/* ==================== GUESS AREA ==================== */
.guess-section-wrapper {
  position: relative;
  overflow: hidden;
  width: 250px; /* Adjust based on your existing input */
  height: 100px; /* Adjust based on your content */
  margin: 0 auto;
}
.guess-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.guess-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid black;
  border-radius: var(--default-border-radius);
  overflow: hidden;
  height: 50px; /* Ensures consistent height across children */
  padding-left: 10px;
}
.below-zero{
  display: none;
}
.guess-input {
  width: 130px;
  height: 100%;
  padding: 0 10px;
  font-size: 20px;
  text-align: center;
  font-family: Poppins, sans-serif;

  border: none;
  outline: none;
  background-color: white;

  /* Remove the radius from input; the wrapper handles it */
  border-radius: 0;
  box-sizing: border-box;
}

/* Optional: clean placeholder styling */
.guess-input::placeholder {
  font-size: 16px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guess-submit {
  background-color: var(--primary-color);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  width: 60px;
  height: 100%;

  border: none;
  border-left: 1px solid black;
  cursor: pointer;

  transition: background-color 0.2s ease, transform 0.1s ease;

  /* Remove radius from button */
  border-radius: 0;
  box-sizing: border-box;
}

.guess-submit:hover {
  background-color: #34d3b0;
}

.guess-instructions {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
  color: black;
  text-align: center;
}



.guess-feedback-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feedback-message {
  font-family: Poppins, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  margin-bottom: 4px;
}

.actual-temp {
  font-family: Poppins, sans-serif;
  font-size: 14px;
  text-align: left;
  margin-bottom: 8px;
}

.next-button {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 24px; /* Base size defines container space */
  text-align: left;
  cursor: pointer;
  color: var(--primary-color);
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  display: inline-block;
  width: fit-content; /* Keep button sizing based on base font size */
}

.next-text {
  display: inline-block;
  transition: font-size 0.15s ease;
  font-size: 22px;
}

.next-button:hover .next-text {
  font-size: 24px;
}
.guess-slider {
  display: flex;
  width: 300%;
  transition: transform 0.5s ease;
  
}

.guess-slide {
  width: 33.33%; /* 100% / 3 slides */
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
/* ==================== THEMES (Light / Dark) ==================== */
/* ==================== Game Over Screen ==================== */
.lose-screen-container {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lose-screen-container.visible {
  display: flex;
  opacity: 1;
  pointer-events: auto; /* Enable interaction when visible */
}
.lose-screen-content {
  width: 30%;
  max-width: 400px;
  min-width: 280px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: left;
  text-align: left;
  padding: 20px;
  box-sizing: border-box;
  margin-top: 50px; /* Space from top to avoid header overlap */
}

.lose-screen-title {
  font-size: 40px;
  font-weight: 600;
  margin-bottom: 30px;
  text-align: center;
}

.game-statistics {
  width: max-content;
  text-align: left;
  margin-bottom: 30px;
  box-shadow: var(--default-box-shadow);
  border-radius: var(--default-border-radius);
  padding: 10px;
}

.statistics-title {
  font-weight: 600;
  text-align: left;
  font-size: 18px;
  width: 100%;
  width: 100%;
  

}

.history {
  width: 100%;
  padding: 10px;
  align-items: left;
}

.history-title {
  font-weight: 600;
  text-align: left;
  margin-bottom: 10px;
  font-size: 18px;
  padding-left: 3px;
}

.history-table {
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: var(--default-box-shadow);
  border-radius: var(--default-border-radius);
  margin-left: -10px;
}

.history-header {
  display: grid;
  grid-template-columns: 30px 1fr 60px 60px;
  font-weight: 600;
  background-color: #227093;
  padding-right: 19px;
  color: white;
  padding-left: 8px;
  font-size: 14px;
  box-sizing: border-box;
  border-radius: var(--default-border-radius) var(--default-border-radius) 0 0; 
  height: 30px;
  align-items: center;
}

#history-list {
  display: flex;
  flex-direction: column;
  max-height: calc(5 * 40px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  border-radius: 0 0 var(--default-border-radius) var(--default-border-radius); 
}
#history-list::-webkit-scrollbar {
  width: 6px; 
}

#history-list::-webkit-scrollbar-thumb {
  background-color: #aaa; 
  border-radius: 3px;
}

#history-list::-webkit-scrollbar-track {
  background: transparent; 
}

.history-row {
  display: grid;
  grid-template-columns: 30px 1fr 60px 60px;
  padding: 8px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  align-items: start; 
  word-break: break-word; 
}



.button-row {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  margin-top: 20px;
  font-size: 24px;
}
#share-button {
  color: #227093;
}
.lose-screen-title,
.game-statistics,
.history,
.button-row {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1.4s ease;
}

/* Triggered */
.lose-screen-title.visible,
.game-statistics.visible,
.history.visible,
.button-row.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== ADS ==================== */
/* Horizontal layout: ads on sides */
/* Fixed Side Ads */
.ad-banner.ad-left,
.ad-banner.ad-right {
  position: fixed;
  top: 80px; /* adjust if you have a header */
  width: 160px;
  z-index: 999;
}

.ad-banner.ad-left {
  left: 0;
}

.ad-banner.ad-right {
  right: 0;
}

/* Make sure images scale */
.ad-banner img {
  width: 100%;
  height: auto;
}

/* Page wrapper to avoid content touching the ads */
.page-wrapper {
  margin: 0 180px; /* leaves space for 160px ads + buffer */
}

/* Main content stays centered */
.main-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}
.ad-banner.ad-bottom {
  display: none;
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #000;
  text-align: center;
  z-index: 999;
}
.guess-input[type="tel"] {
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  text-align: center;
}

@media (max-width: 768px) {
  .site-header {
    background-color: transparent; /* remove green */
    height: 50px; /* keep the space */
  }
  html, body {
    height: 100%;
    overflow-x: hidden; /* prevent horizontal scroll */
  }
  .game-title {
    display: none; /* hide title on mobile */
  }
  .how-to-play-button{
    right: 20px;
  }
  .how-to-play-button:hover .tooltip-text {
  visibility: hidden;
  opacity: 1;

}
  .location-container {
    width: 90%;
    padding: 0;
    height: auto;
    margin: 0;
  }

.city-wrapper {
  width: 80vw;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.city-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  text-align: center;
  max-width: 100%;
  height: auto;
  font-size: clamp(40px, 6vw, 60px); /* ✅ Responsive font size */
  line-height: 1;
  white-space: normal;
  word-break: break-word;
}
.lose-screen-content{
  margin-top: 20px;
  width: 90%;
}
.lose-screen-title {
  font-size: 40px; /* smaller title for mobile */
  font-weight: 600;
  margin-bottom: 20px;
}

.clue-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  padding: 0 10px;
}

.clue-box {
  flex: 1 1 22%;
  max-width: 85px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.clue-title {
  font-size: 11px;
  margin-bottom: 2px; /* smaller space for mobile */
}
.flag-icon,
.condition-icon,
.season-icon {
  max-width: 32px;
  max-height: 28px;
}
.tooltip-popup {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;

  /* Prevent edge overflow */
  max-width: calc(100vw - 32px); /* 16px margin on each side */
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.time-icon {
  font-size: 24px;
}
.clue-box-body {
  width: 100%;
  height: 65px;
}
.divider-mobile {
  width: 90%;
  height: 1px;
  background-color: black;
  margin: 20px auto; /* space above and below */
  display: block;
}



.chip-icon {
  width: 16px;
  height: auto;
  margin-right: 4px;
}
.chip-name{
  text-align: center;
}
.chips-container{
  width: 60%;
  margin-top: 25px;
}
.guess-box {
  width: clamp(260px, 80vw, 320px); /* ✅ Adjusts from 260px up to 320px */
  padding: 16px;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  border-radius: var(--default-border-radius);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}
.below-zero {
  background-color: var(--primary-color);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  width: 20px;
  height: 20px;
  cursor: pointer;
  border: black 1px solid;
  font-size: 10px;
  left: 10px;
  display: flex;
  justify-content: center;
  align-items: center;;
}
  .guess-controls-row {
    width: 100%;
    max-width: 250px;
    gap: 10px;
  }

  .guess-number {
    font-size: 72px;
  }

  .confirm-button {
    width: 80%;
    height: 50px;
    font-size: 20px;
    margin-top: 12px;
  }

  .confirm-label {
    font-size: 12px;
    text-align: center;
  }
  
  .ad-banner.ad-left,
  .ad-banner.ad-right {
    display: none;
  }

  .ad-banner.ad-bottom {
    display: block;
  }

  .page-wrapper {
    margin: 0; /* no margin needed without side ads */
  }

  .main-content {
    padding-bottom: 100px; /* leave space for bottom ad */
  }
}








