:root {
  color-scheme: dark;

  --bg: #08090d;
  --bg-elevated: #12141a;

  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.16);

  --text: #f4f4f5;
  --text-muted: #a1a1aa;

  --border: #27272a;

  --error: #fb7185;
  --success: #4ade80;

  --radius-lg: 14px;
  --radius-sm: 9px;

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.18s ease;

  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;

  background:
    radial-gradient(circle at top left, #12372d 0, #08090d 42%, #050505 100%);

  color: var(--text);

  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 640px;
  padding: 24px;
}

.header {
  text-align: left;
  margin-bottom: 20px;
}

.header h1 {
  margin: 0 0 8px;

  font-size: 1.8rem;
  letter-spacing: 0.02em;
}

.header p {
  margin: 0;

  color: var(--text-muted);
  font-size: 0.95rem;
}

.card {
  background: rgba(18, 20, 26, 0.96);

  border-radius: var(--radius-lg);

  padding: 20px 20px 18px;

  box-shadow: var(--shadow-soft);

  border: 1px solid rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(12px);
}

.label {
  display: block;

  margin-bottom: 8px;

  font-size: 0.9rem;

  color: var(--text-muted);
}

.textarea {
  width: 100%;
  min-height: 140px;

  resize: vertical;

  border-radius: var(--radius-sm);

  border: 1px solid var(--border);

  background: #090a0d;

  color: var(--text);

  padding: 10px 12px;

  font-size: 0.95rem;

  outline: none;

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.textarea::placeholder {
  color: #71717a;
}

.textarea:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 3px var(--accent-soft);

  background: #0c0f12;
}

.button {
  margin-top: 12px;

  width: 100%;

  border: none;

  border-radius: var(--radius-sm);

  padding: 10px 14px;

  font-size: 0.98rem;

  font-weight: 600;

  letter-spacing: 0.02em;

  color: #022c22;

  background:
    linear-gradient(
      135deg,
      #34d399,
      #14b8a6
    );

  cursor: pointer;

  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    filter var(--transition-fast);

  box-shadow:
    0 12px 24px rgba(16, 185, 129, 0.3);
}

.button:hover {
  transform: translateY(-1px);

  filter: brightness(1.08);
}

.button:active {
  transform: translateY(0);

  box-shadow:
    0 8px 18px rgba(16, 185, 129, 0.25);
}

.status {
  margin-top: 10px;

  font-size: 0.9rem;
}

.status-error {
  color: var(--error);
}

.status-success {
  color: var(--success);
}

.center {
  text-align: center;
}

/* Small screens */
@media (max-width: 480px) {
  .app {
    padding: 16px;
  }

  .card {
    padding: 18px 16px 16px;
  }
}

.textarea-wrapper {
  position: relative;
}

.textarea {
  width: 100%;
  padding-bottom: 30px; /* space for counter */
  box-sizing: border-box;
}

.char-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.85rem;
  color: #777;
  pointer-events: none;
}