/* styles.css */

body {
  background-color: #ffffff;
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 40px 15px;
}

/* ---------- LANGUAGE BAR ---------- */

#languageBar {
  display: none;
  margin: 0 auto 18px auto;
  font-size: 14px;
  color: #111;
}

#languageBar .langs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}

#languageBar a {
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#languageBar .sep {
  color: #999;
  user-select: none;
}

#languageBar img.flag {
  width: 30px;
  height: 15px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* ---------- BUTTONS ---------- */

.btnRow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  padding: 12px 24px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid #cfcfcf;
  background: #f7f7f7;
  transition: transform 0.05s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  user-select: none;
}

button:hover {
  background: #f0f0f0;
  box-shadow: 0 8px 18px rgba(0,0,0,0.10);
}

button:active {
  transform: translateY(2px) scale(0.99);
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- CONTENT ---------- */

#content {
  margin-top: 30px;
  display: none;
}

#joke {
  font-size: 18px;
  line-height: 1.5;
  white-space: pre-line;
  min-height: 80px;
  margin-bottom: 18px;
}

/* ---------- RATING ---------- */

#ratingIcons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  min-height: 72px;
  align-items: center;
}

#ratingIcons img {
  width: 64px;
  height: 64px;
  cursor: pointer;
  transition: transform 0.08s ease;
}

#ratingIcons img:hover {
  transform: scale(1.06);
}

#ratingIcons img:active {
  transform: scale(0.96);
}

#voteMessage {
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  background: #fafafa;
  display: none;
  width: fit-content;
  margin: 0 auto 14px auto;
}

/* ---------- LINKS ---------- */

#extras {
  font-size: 13px;
}

#extras a {
  color: #0000ee;
  text-decoration: underline;
}

/* ---------- ERROR ---------- */

#errorBox {
  display: none;
  margin: 18px auto 0 auto;
  padding: 12px 14px;
  border: 1px solid #f3c2c2;
  border-radius: 10px;
  background: #fff2f2;
  color: #7a1b1b;
  width: fit-content;
  max-width: 90%;
  text-align: left;
  white-space: pre-wrap;
}

/* ---------- COPY TOAST ---------- */

#copyToast {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(20,20,20,0.92);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  max-width: 92%;
  z-index: 9999;
}

.bottomRow {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

/* ---------- TERMS ---------- */

#termsNote {
  margin: 14px auto 18px auto;
  font-size: 12px;
  color: #333;
  max-width: 520px;
  line-height: 1.35;
}

#termsNote a {
  color: #0000ee;
  text-decoration: underline;
}

/* ---------- LOGO ---------- */

#logoContainer {
  text-align: center;
  margin-top: 40px;
}

#appLogo {
  width: 220px;
  transition: all 0.4s ease;
}

#appLogo.small {
  width: 90px;
  margin-top: 10px;
}

#showLangLabel {
  display: none;
}

/* ---------- INSTALL BANNER SPACING ---------- */

/* Add space when bottom install banner is visible */
body.has-install-banner {
  padding-bottom: calc(40px + 110px);
}

/* iPhone safe area support */
@supports (padding: env(safe-area-inset-bottom)) {
  body.has-install-banner {
    padding-bottom: calc(40px + 110px + env(safe-area-inset-bottom));
  }
}
