:root {
  color-scheme: light;
  --primary-color: #1f2937;
  --accent-color: #3b82f6;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6;
  --border-color: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
  width: 100%;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.toolbar {
  margin: 2rem 0 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

button:active {
  transform: translateY(0);
}

#addBoxButton {
  background: var(--accent-color);
  color: #fff;
}

#addBoxButton:hover {
  background: #2563eb;
}

.text-box-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.text-box-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}

.text-box-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.875rem;
  font: inherit;
  resize: vertical;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

.copy-button {
  background: var(--success-color);
  color: #fff;
  flex: 1;
}

.copy-button:hover {
  background: #059669;
}

.remove-button {
  background: var(--danger-color);
  color: #fff;
  flex: 1;
}

.remove-button:hover {
  background: #dc2626;
}

.legal {
  margin: 2.5rem 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.legal h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.legal ul {
  margin: 0;
  padding-left: 1.5rem;
}

.legal li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.legal li:last-child {
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: auto;
}

.footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .container {
    padding: 1.5rem 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .lead {
    font-size: 1rem;
  }

  .actions {
    flex-direction: column;
  }

  .copy-button,
  .remove-button {
    flex: 1;
  }
}

