@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;500&display=swap');

:root {
  --bg-color: #f7f5f2;
  --text-color: #1a1a1a;
}

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

body {
  min-height: 100vh;
  background-color: var(--bg-color);
  font-family: 'Crimson Pro', Georgia, serif;
  font-weight: 450;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  padding-top: 25vh;
  letter-spacing: 0.25px;
}

.container {
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 450;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--text-color);
  opacity: 0.6;
  text-shadow: 0 0 0.25px rgba(0,0,0,0.25);
  margin-bottom: 1rem;
}

.share-link {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.4;
  text-decoration: none;
  text-transform: lowercase;
}

.share-link:hover {
  opacity: 0.7;
}

.answer-section {
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 1rem;
  position: relative;
}

.cooldown-indicator {
  position: absolute;
  display: flex;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.answer-text {
  font-family: 'Crimson Pro', Georgia, serif;
  font-weight: 450;
  font-size: 1.25rem;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.6;
  letter-spacing: 0.25px;
  text-shadow: 0 0 0.25px rgba(0,0,0,0.25);
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.answer-text.visible {
  opacity: 1;
}

.input-section {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#question {
  flex: 1;
  padding: 0.5rem 0;
  font-family: inherit;
  font-weight: 450;
  font-size: 1.25rem;
  color: var(--text-color);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 26, 26, 0.15);
  outline: none;
  resize: none;
  min-height: 36px;
  max-height: 80px;
  line-height: 1.6;
  overflow: hidden;
  text-shadow: 0 0 0.25px rgba(0,0,0,0.25);
}

#question:focus {
  border-bottom-color: rgba(26, 26, 26, 0.3);
}

#question::placeholder {
  color: var(--text-color);
  opacity: 0.3;
  text-transform: lowercase;
}

#question:disabled {
  opacity: 0.5;
}

#submit {
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-weight: 450;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--text-color);
  background: transparent;
  border: 1px solid rgba(26, 26, 26, 0.15);
  cursor: pointer;
}

#submit:hover {
  border-color: rgba(26, 26, 26, 0.35);
}

#submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ad-container {
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  transition: opacity 1s ease;
}

.ad-container.visible {
  opacity: 1;
}

.ad-container:empty::before {
  content: '';
}

.cooldown-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.cooldown-indicator.visible {
  opacity: 1;
}

.cooldown-indicator .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #1a1a1a;
  opacity: 0.25;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.cooldown-indicator .dot.filled {
  opacity: 1;
  transform: scale(1.1);
}

.footer {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  opacity: 0.4;
}

.footer a {
  color: var(--text-color);
  text-decoration: none;
}

.footer a:hover {
  opacity: 0.7;
}
