:root {
  --x-black: #0f1419;
  --x-white: #ffffff;
  --x-gray: #536471;
  --x-border: #eff3f4;
  --x-blue: #1d9bf0;
  --x-blue-hover: #1a8cd8;
  --x-bg: #f7f9f9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--x-bg);
  color: var(--x-black);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

.nav a {
  color: var(--x-black);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.nav .links a {
  margin-left: 16px;
  font-weight: 400;
  font-size: 14px;
  color: var(--x-gray);
}

h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.subtitle {
  color: var(--x-gray);
  font-size: 14px;
  margin: 0 0 20px;
}

textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--x-border);
  border-radius: 16px;
  padding: 16px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  background: var(--x-white);
}

textarea:focus {
  outline: none;
  border-color: var(--x-blue);
}

.btn {
  display: inline-block;
  background: var(--x-black);
  color: var(--x-white);
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
}

.btn:hover { background: #272c30; }
.btn:disabled { background: var(--x-gray); cursor: not-allowed; }

.btn-secondary {
  background: var(--x-white);
  color: var(--x-black);
  border: 1px solid var(--x-border);
}
.btn-secondary:hover { background: var(--x-bg); }

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
  margin-top: 0;
}

.error-box {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fdecea;
  color: #d32f2f;
  font-size: 14px;
  display: none;
}

.loading {
  margin-top: 16px;
  color: var(--x-gray);
  font-size: 14px;
  display: none;
}

.tweet-card {
  background: var(--x-white);
  border: 1px solid var(--x-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.tweet-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tweet-index {
  font-size: 12px;
  color: var(--x-gray);
  font-weight: 700;
}

.tweet-text {
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  outline: none;
  min-height: 24px;
}

.tweet-text:focus {
  background: var(--x-bg);
  border-radius: 8px;
}

.char-count {
  font-size: 12px;
  color: var(--x-gray);
  margin-top: 6px;
}

.top-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.pricing-card {
  background: var(--x-white);
  border: 1px solid var(--x-border);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
}

.price {
  font-size: 40px;
  font-weight: 800;
  margin: 12px 0;
}

.price span { font-size: 16px; color: var(--x-gray); font-weight: 400; }

.badge {
  display: inline-block;
  background: var(--x-bg);
  color: var(--x-gray);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-top: 16px;
}

.feature-list {
  text-align: left;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  color: var(--x-black);
  font-size: 14px;
}
.feature-list li { padding: 6px 0; }
.feature-list li::before { content: "✓ "; color: var(--x-blue); font-weight: 700; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--x-black);
  color: var(--x-white);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
