/* Base Styling */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: #f5f8fa;
  color: #0f1419;
}

.container {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.04);
}

/* Dual-column Temperature Converter */
.temp-dual-scroll {
  display: flex;
  background: #eef3f7;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  gap: 12px;
}

.temp-scroll-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.temp-scroll-block label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.scrollable .scroll-box {
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.readonly .scroll-box {
  overflow-y: hidden;
  pointer-events: none; /* disables interaction but allows scroll syncing */
}

.scroll-box {
  width: 100%;
  max-height: 70px;
  background: white;
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 8px;
  box-sizing: border-box;
}

.scroll-item {
  font-size: 30px;
  padding: 6px 0;
  text-align: center;
  scroll-snap-align: center;
  transition: background 0.2s, color 0.2s;
  border-radius: 6px;
}

.scroll-item.active {
  background: #1d9bf0;
  color: white;
  font-weight: 600;
}

/* Thermostat Image */
.image-container {
  position: relative;
}

.thermostat-image {
  width: 100%;
  display: block;
  border-radius: 12px;
}

/* Hotspot Buttons */
.hotspot {
  position: absolute;
  cursor: pointer;
  transform: translate(-50%, -50%);
  background-color: transparent;
  border: 2px solid rgba(29, 155, 240, 0.3);
  transition: all 0.25s ease;
}

.hotspot:hover {
  border-color: rgba(29, 155, 240, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.hotspot.square {
  width: 77px;
  height: 48px;
  border-radius: 10px;
}

.hotspot.rect {
  width: 48px;
  height: 70px;
  border-radius: 10px;
}

.hotspot.round {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

/* Popup Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 20, 25, 0.45);
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: fadeIn 0.3s ease-in-out forwards;
}

.popup-box {
  background: #ffffff;
  padding: 24px 20px;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 20, 25, 0.15);
  max-width: 90%;
  width: 360px;
  text-align: left;
  position: relative;
  font-size: 16px;
  color: #0f1419;
  line-height: 1.5;
  animation: slideUp 0.3s ease-out;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 22px;
  background: none;
  border: none;
  color: #657786;
  cursor: pointer;
  transition: color 0.2s ease;
}

.popup-close:hover {
  color: #1d9bf0;
}

.popup-content {
  padding-top: 10px;
  white-space: pre-wrap;
}

/* FAQ Section */
.faq {
  margin-top: 10px;
}

.faq-toggle {
  background: none;
  border: none;
  font-weight: 600;
  font-size: 16px;
  margin: 10px 0 5px;
  cursor: pointer;
  color: #1d9bf0;
  text-align: left;
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.faq-toggle:hover {
  background: rgba(29, 155, 240, 0.05);
}

.faq-answer {
  display: none;
  font-size: 14px;
  color: #444;
  margin: 0 0 15px;
  padding: 0 8px;
}

.faq-toggle.active + .faq-answer {
  display: block;
}

/* Native Ad Style */
.native-ad {
  background: #f0f4f8;
  border-left: 4px solid #1d9bf0;
  padding: 12px 16px;
  margin-top: 30px;
  border-radius: 8px;
  font-size: 15px;
  color: #0f1419;
}

.native-ad h4 {
  margin-top: 0;
  margin-bottom: 5px;
  font-weight: 600;
}

.native-ad a {
  color: #1d9bf0;
  font-weight: 600;
  text-decoration: none;
}

.native-ad a:hover {
  text-decoration: underline;
}

/* Emoji Feedback */
.emoji {
  font-size: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  margin: 0 5px;
  transition: transform 0.2s ease;
}

.emoji:hover {
  transform: scale(1.3);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
