* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #f1f1f1;
  color: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 40px;
}

.section {
  width: 100%;
}

.container {
  max-width: 100% !important;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

.box {
  width: 100%;
  max-width: 100%;
}

.image {
  max-width: 100%;
}

.image img {
  width: 100%;
  height: auto;
}

.title {
  text-align: center;
  margin-bottom: 18px;
}

.title h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #2d2d2d;
}

.title p {
  margin: 6px 0 0;
  font-size: 15px;
  color: #777;
}

.captcha-card {
  width: 460px;
  max-width: 100%;
  background: #fff;
  border: 1px solid #cfcfcf;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.challenge-header {
  background: #4a90e2;
  color: #fff;
  padding: 16px;
  border-bottom: 1px solid #d7d7d7;
}

.challenge-header .small {
  font-size: 13px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.challenge-header .big {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 280px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: #fff;
  padding: 2px;
}

.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border: none;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  background: #d6e7f8;
  user-select: none;
}

.tile.disabled {
  pointer-events: none;
}

.tile.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(66, 133, 244, 0.38);
  box-shadow: inset 0 0 0 4px #4285f4;
  z-index: 2;
}

.tile.selected::before {
  content: "✓";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4285f4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  z-index: 3;
}

.tile.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  z-index: 4;
}

.tile.loading::before {
  content: "↻";
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #4285f4;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.tile-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #ddd;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px 8px 14px;
  border-top: 1px solid #e4e4e4;
  min-height: 58px;
}

.left-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #444;
  font-size: 24px;
  user-select: none;
}

.refresh-btn,
.audio-btn,
.help-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #333;
  padding: 0;
}

.verify-btn {
  min-width: 84px;
  height: 40px;
  border: none;
  background: #4a90e2;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.verify-btn:disabled {
  background: #a9c7ef;
  cursor: default;
}

.status {
  width: 460px;
  max-width: 100%;
  margin-top: 14px;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  min-height: 42px;
  text-align: left;
}

.final-box {
  padding: 20px 16px;
  background: #fff;
}

.final-box h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #333;
}

.final-box p {
  margin: 0 0 10px;
  color: #666;
  line-height: 1.5;
  font-size: 14px;
}

.final-result {
  margin-top: 12px;
  padding: 12px;
  background: #f6f6f6;
  border: 1px solid #dddddd;
  font-size: 15px;
  line-height: 1.55;
  color: #333;
}

@media (max-width: 520px) {
  .challenge-header .big {
    font-size: 21px;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-background {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}

.modal-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Claim Button */
.claim-btn {
  float: right;
  margin-left: 16px;
  margin-top: -4px;
  min-width: 100px;
}
