:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #f1f5f9;
    --secondary-hover: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --border: #cbd5e1;
    --danger: #ef4444;
    --radius: 12px;
    --font-heading: system-ui, -apple-system, sans-serif;
    --font-body: system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    background: var(--bg-main);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

header.site-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    margin-left: 24px;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
}

.hero-section {
    padding: 60px 0 80px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.tool-container {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: left;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.platform-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-main);
    font-size: 0.875rem;
    cursor: pointer;
}

.char-counter {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

textarea {
    width: 100%;
    min-height: 250px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 12px;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.warning-text {
    color: var(--danger);
    font-size: 0.875rem;
    min-height: 20px;
    margin-bottom: 12px;
    font-weight: 500;
}

.tool-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.content-section {
    padding: 80px 0;
}

.bg-light {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.content-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.grid-2 p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.card h3 {
    margin-bottom: 12px;
    color: var(--primary);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.ad-container {
    margin: 40px auto;
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--secondary);
    border-radius: var(--radius);
}

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}

.copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2rem; }
    .grid-2, .card-grid { grid-template-columns: 1fr; }
    .tool-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .footer-content { flex-direction: column; text-align: center; align-items: center; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
