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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
  background: #f4f4f5;
  min-height: 100vh;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
}

.container {
  max-width: 42rem;
  width: 100%;
}

.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.05),
    0 8px 10px -6px rgb(0 0 0 / 0.05);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  width: 11rem;
}

.subtitle {
  font-size: 0.875rem;
  color: #71717a;
}

.form-group {
  margin-bottom: 1.5rem;
}

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #52525b;
  margin-bottom: 0.5rem;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  overflow: hidden;
  transition: all 0.2s;
}

.input-wrapper:focus-within {
  outline: 3px solid rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
}

.input-prefix {
  background: #f4f4f5;
  border-right: 1px solid #e5e7eb;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #71717a;
  white-space: nowrap;
}

input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #3f3f46;
}

select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #3f3f46;
  background: white;
  outline: none;
  transition: all 0.2s;
}

select:focus {
  outline: 3px solid rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
}

.button-container {
  display: flex;
  justify-content: flex-end;
}

button {
  background: #000;
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover:not(:disabled) {
  background: #27272a;
}

button:disabled {
  background: #d4d4d8;
  color: #71717a;
  cursor: not-allowed;
}

button.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.error-box {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #dc2626;
  padding: 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.roast-container {
  display: none;
  position: relative;
  overflow: hidden;
}

.roast-container::before {
  content: "🧨";
  position: absolute;
  bottom: -3rem;
  right: 0;
  font-size: 8rem;
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}

.roast-header {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.roast-text {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #6b7280;
  white-space: pre-wrap;
  position: relative;
  z-index: 1;
  margin-bottom: 1.25rem;
}

.share-btn {
  margin-top: 1rem;
}

.share-output {
  display: none;
  margin-top: 1.25rem;
  padding: 0.75rem;
  background: #f4f4f5;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #3f3f46;
}

@media (max-width: 640px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  .input-prefix {
    font-size: 0.75rem;
  }
  button {
    width: 100%;
  }
}

#language-select {
  max-width: 150px;
}
