/* ================================================================
   TWEETLONG — Shared Stylesheet
   X/Twitter dark-mode palette, fully responsive
   ================================================================ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #000;
  color: #e7e9ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: #1d9bf0; text-decoration: none; transition: color .15s; }
a:hover { color: #1a8cd8; }

img { max-width: 100%; display: block; }

/* ── SITE HEADER (sticky) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #2f3336;
  padding: 0 24px;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e7e9ea;
}

.header-logo {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid #1d9bf0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: transparent;
}

.header-logo span {
  font-size: 15px;
  font-weight: 800;
  color: #1d9bf0;
  line-height: 1;
  letter-spacing: -0.5px;
}

.header-brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e7e9ea;
}

/* Nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: #71767b;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color .15s;
}

.nav-links a:hover,
.nav-links a.active { color: #e7e9ea; }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: #e7e9ea;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ── SITE FOOTER ── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid #2f3336;
  padding: 32px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: #71767b;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: #71767b; transition: color .15s; }
.footer-links a:hover { color: #e7e9ea; }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  gap: 32px;
  width: 100%;
}

/* ── PAGE HEADER (hero-ish) ── */
.page-hero {
  text-align: center;
  max-width: 640px;
  padding: 24px 0;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #e7e9ea;
  margin-bottom: 12px;
  line-height: 1.25;
}

.page-hero p {
  font-size: 1.05rem;
  color: #71767b;
  line-height: 1.6;
}

/* ── SECTION TITLE ── */
.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #71767b;
  text-transform: uppercase;
}

/* ── CONTROLS PANEL ── */
.controls {
  background: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label,
label.field-label {
  font-size: 0.78rem;
  color: #71767b;
  font-weight: 500;
}

input[type="text"], textarea {
  background: #000;
  border: 1px solid #2f3336;
  border-radius: 8px;
  color: #e7e9ea;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 10px 14px;
  outline: none;
  transition: border-color .15s;
  width: 100%;
  resize: none;
}

input[type="text"]:focus, textarea:focus { border-color: #1d9bf0; }

/* Avatar upload */
.avatar-row { display: flex; align-items: center; gap: 12px; }

.avatar-preview {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #2f3336;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid #2f3336;
  transition: border-color .15s;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  overflow: hidden;
}
.avatar-preview:hover { border-color: #1d9bf0; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
#avatarFileInput { display: none; }
.upload-hint { font-size: 0.75rem; color: #71767b; }

/* Toggle */
.toggle-row { display: flex; align-items: center; gap: 10px; }
.toggle-row label { margin: 0; cursor: pointer; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: #2f3336; border-radius: 22px;
  cursor: pointer; transition: background .2s;
}
.slider::before {
  content: ""; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
input:checked + .slider { background: #1d9bf0; }
input:checked + .slider::before { transform: translateX(18px); }

/* Char count */
.char-count { font-size: 0.75rem; color: #71767b; text-align: right; margin-top: -8px; }
.char-count.over { color: #f4212e; }

/* Generate button */
.btn-generate {
  background: #1d9bf0; color: #fff; border: none;
  border-radius: 9999px; padding: 12px 28px;
  font-size: 0.95rem; font-weight: 700; cursor: pointer;
  width: 100%; transition: background .15s; font-family: inherit;
}
.btn-generate:hover { background: #1a8cd8; }
.btn-generate:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── PREVIEW ── */
.preview-wrap { width: 100%; max-width: 540px; }
.preview-label {
  font-size: 0.75rem; color: #71767b;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px;
}

/* ── THE TWEET CARD ── */
#tweetCard {
  background: #000;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 16px 16px 12px 16px;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #e7e9ea;
}

.tweet-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.tweet-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: #333; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.tweet-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.tweet-meta { flex: 1; min-width: 0; }

.tweet-name-line {
  line-height: 1.2;
  white-space: nowrap;
}
.tweet-display-name {
  font-weight: 700; font-size: 15px; color: #e7e9ea;
  display: inline-block; vertical-align: middle;
}

/* The badge artwork fills its whole viewBox, so it needs a real gap after
   the name or it reads as touching the last letter. */
.checkmark {
  display: none; width: 18px; height: 18px;
  vertical-align: middle; margin-left: 5px;
}
.checkmark.show { display: inline-block; }

.tweet-handle-line { margin-top: 1px; }
.tweet-handle { font-size: 15px; color: #71767b; }

/* Top-right icons */
.tweet-header-right {
  flex-shrink: 0; margin-left: auto;
  white-space: nowrap;
}

/* Tweetlong "T" circle logo on card */
.tl-logo {
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1.75px solid #71767b;
  display: inline-block;
  vertical-align: middle;
  text-align: center;
  background: transparent;
  margin-right: 8px;
  position: relative;
}
.tl-logo span {
  font-size: 11px;
  font-weight: 800;
  color: #71767b;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.tweet-more {
  font-size: 1rem; color: #71767b;
  letter-spacing: 1px; cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.tweet-body {
  font-size: 17px; line-height: 24px;
  color: #e7e9ea; white-space: pre-wrap; word-break: break-word;
  margin-bottom: 16px;
}

.tweet-dateline {
  font-size: 15px; color: #71767b;
  margin-bottom: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2f3336;
}
.tweet-dateline .views-bold { font-weight: 700; color: #e7e9ea; }

.tweet-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.stat {
  display: inline-block;
  color: #71767b; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}

.stat svg {
  width: 18.75px; height: 18.75px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

.stat span {
  display: inline-block;
  vertical-align: middle;
}

.share-stat svg { margin-right: 0; }

.stat-right-group {
  display: flex; align-items: center;
  gap: 14px;
}

/* ════════════════════════════════════════════════════════
   ABOUT PAGE
   ════════════════════════════════════════════════════════ */

.about-section {
  max-width: 720px;
  width: 100%;
  padding: 0 16px;
}

.about-section h2 {
  font-size: 1.35rem; font-weight: 700;
  color: #e7e9ea; margin-bottom: 12px;
}

.about-section p {
  font-size: 0.98rem; color: #a1a5aa;
  line-height: 1.7; margin-bottom: 16px;
}

/* 3-step cards */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0 32px;
}

.step-card {
  background: #16181c;
  border: 1px solid #2f3336;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}

.step-icon {
  font-size: 2rem;
  line-height: 1;
}

.step-card h3 {
  font-size: 0.95rem; font-weight: 700; color: #e7e9ea;
}

.step-card p {
  font-size: 0.85rem; color: #71767b; margin-bottom: 0;
}

/* CTA button */
.btn-cta {
  display: inline-block;
  background: #1d9bf0; color: #fff;
  border-radius: 9999px; padding: 12px 32px;
  font-size: 0.95rem; font-weight: 700;
  transition: background .15s;
  text-decoration: none;
}
.btn-cta:hover { background: #1a8cd8; color: #fff; }

/* ════════════════════════════════════════════════════════
   PRIVACY PAGE
   ════════════════════════════════════════════════════════ */

.privacy-box {
  background: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.privacy-box p {
  color: #a1a5aa;
  font-size: 0.98rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════
   BLOG INDEX
   ════════════════════════════════════════════════════════ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 720px;
  width: 100%;
}

.blog-card {
  background: #16181c;
  border: 1px solid #2f3336;
  border-radius: 14px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s;
}

.blog-card:hover { border-color: #1d9bf0; }

.blog-card h2 {
  font-size: 1.05rem; font-weight: 700;
  color: #e7e9ea; line-height: 1.35;
}

.blog-card p {
  font-size: 0.88rem; color: #71767b;
  line-height: 1.55; flex: 1;
}

.blog-card .read-more {
  font-size: 0.85rem; font-weight: 600;
  color: #1d9bf0;
}
.blog-card .read-more:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════
   BLOG ARTICLE
   ════════════════════════════════════════════════════════ */

.article-wrap {
  max-width: 680px;
  width: 100%;
  padding: 0 16px;
}

.article-wrap h1 {
  font-size: 1.75rem; font-weight: 800;
  color: #e7e9ea; margin-bottom: 8px; line-height: 1.3;
}

.article-meta {
  font-size: 0.82rem; color: #71767b;
  margin-bottom: 28px;
}

.article-wrap h2 {
  font-size: 1.3rem; font-weight: 700;
  color: #e7e9ea; margin: 32px 0 12px;
}

.article-wrap h3 {
  font-size: 1.1rem; font-weight: 600;
  color: #e7e9ea; margin: 24px 0 10px;
}

.article-wrap p {
  font-size: 0.98rem; color: #a1a5aa;
  line-height: 1.75; margin-bottom: 16px;
}

.article-wrap ul, .article-wrap ol {
  margin: 0 0 16px 24px;
  color: #a1a5aa;
  font-size: 0.98rem;
  line-height: 1.75;
}

.article-wrap li { margin-bottom: 6px; }

.article-wrap strong { color: #e7e9ea; }

.article-wrap blockquote {
  border-left: 3px solid #1d9bf0;
  padding: 12px 20px;
  margin: 20px 0;
  background: #16181c;
  border-radius: 0 8px 8px 0;
  color: #a1a5aa;
  font-style: italic;
}

.article-cta {
  background: #16181c;
  border: 1px solid #2f3336;
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  margin-top: 32px;
}

.article-cta p {
  color: #e7e9ea; font-weight: 600;
  margin-bottom: 14px;
}

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; color: #71767b; margin-bottom: 20px;
}
.back-link:hover { color: #1d9bf0; }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr; }
  .blog-grid  { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: #000;
    border-bottom: 1px solid #2f3336;
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links.open { display: flex; }

  .page-hero h1 { font-size: 1.5rem; }

  .header-inner { position: relative; }

  .article-wrap h1 { font-size: 1.35rem; }
}

[data-netlify-widget] { display: none !important; }
#netlify-badge { display: none !important; }