/* Paste this into your style.css */

body {
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

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

.instruction-content, .popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-sizing: border-box;
}

button {
  padding: 10px 20px;
  margin-top: 10px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  background-color: #007BFF;
  color: white;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #0056b3;
}

#trialContainer {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
}

#stimulusImage {
  max-width: 300px;
  max-height: 400px;
  object-fit: contain;
  display: block;
  z-index: 1;
}

#fixation {
  position: absolute;
  font-size: 5em;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.key-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 8px 12px;
  border-radius: 6px;
}

#keyLabelLeft {
  left: 5%;
}

#keyLabelRight {
  right: 5%;
}

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
  .key-label {
    font-size: 3vw;
    padding: 2vw 3vw;
  }

  #stimulusImage {
    max-width: 60vw;
    max-height: 80vh;
  }
}

.desktop-only {
  display: block;
}
.mobile-only {
  display: none;
}

body.mobile .desktop-only {
  display: none;
}
body.mobile .mobile-only {
  display: block;
}

#mobileTapReminder {
  position: fixed;
  top: 10px;
  left: 0;
  width: 100%;
  display: none;
  z-index: 500;
  pointer-events: none; /* allows underlying buttons to be clickable */
}

#mobileTapReminder .mobile-left,
#mobileTapReminder .mobile-right {
  position: absolute;
  top: 10px;
  font-size: 1.6em;
  font-weight: bold;
  text-align: center;
  pointer-events: none;
  line-height: 1.3;
}

#mobileTapReminder .mobile-left {
  left: 10px;
}

#mobileTapReminder .mobile-right {
  right: 10px;
}

body.mobile #mobileTapReminder {
  display: block;
}

#stimulusBlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  min-height: 460px; /* 60px for prompt + 400px image max-height */
  margin-bottom: 20px;
}

#stimulusPrompt {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 10px;
}

#stimulusImageContainer {
  width: 300px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stimulusImage {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

#kdeSubmit {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: #2d6cdf;
  color: #fff;
  cursor: pointer;
}
#kdeSubmit:disabled { opacity: 0.6; cursor: not-allowed; }
