html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #fdfbf7;
  color: #222;
  line-height: 1.6;
  padding: 2rem 1rem 5rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

header {
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 5px;
  line-height: 3.5rem;
}

.subtitle {
  color: #666;
  font-size: 1.1rem;
}

.acronym-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0rem;
  margin-bottom: 4rem;
  row-gap: 0.25rem;
  padding: 1.5rem 0.75rem;
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.letter {
  position: relative;
  font-size: 2.5rem;
  font-weight: 800;
  padding: 0.1rem 0.1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
  user-select: none;
  line-height: 1.1;
}

.letter:hover,
.letter:focus {
  transform: translateY(-4px);
  background-color: #f0f0f0;
  outline: none;
}

.letter:nth-child(6n+1):hover { color: #CD66FF; }
.letter:nth-child(6n+2):hover { color: #FF6599; }
.letter:nth-child(6n+3):hover { color: #FF0000; }
.letter:nth-child(6n+4):hover { color: #FF8E00; }
.letter:nth-child(6n+5):hover { color: #ffdf00; }
.letter:nth-child(6n+6):hover { color: #008E00; }
.letter:nth-child(6n+7):hover { color: #00C0C0; }
.letter:nth-child(6n+8):hover { color: #400098; }
.letter:nth-child(6n+9):hover { color: #8E008E; }

.letter::after {
  content: attr(data-meaning);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background-color: #222;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  max-width: 220px;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.letter::before {
  content: "";
  position: absolute;
  bottom: 98%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  border-width: 6px;
  border-style: solid;
  border-color: #222 transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.letter:hover::after,
.letter:hover::before,
.letter:focus::after,
.letter:focus::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.submit-section {
  max-width: 600px;
  margin: 0 auto;
  scroll-margin-top: 2rem;
}

.submit-section h2 {
  margin-bottom: 0.5rem;
}

.submit-section p {
  color: #555;
  margin-bottom: 1.5rem;
}

.form-wrapper {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.form-placeholder {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 3rem 1rem;
  color: #777;
}

.form-wrapper iframe {
  width: 100%;
  border: none;
}

.jump-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: #222;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.2rem;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background-color 0.15s ease;
  z-index: 100;
}

.jump-btn:hover {
  background-color: #444;
  transform: translateY(-2px);
}

footer {
    font-style: italic;
    font-size: 80%;
    padding-top: 1.5rem;
    text-align: center;
    color: #a9a9a9;
}
