/* Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 1rem 0;
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f0f6fc;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-list a { color: #8b949e; font-size: 0.95rem; }
.nav-list a:hover { color: #f0f6fc; }

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}
.hero h1 { font-size: 2.2rem; font-weight: 700; color: #f0f6fc; margin-bottom: 0.5rem; }
.hero p { font-size: 1.1rem; color: #8b949e; max-width: 600px; margin: 0 auto; }

/* Tool area */
.tool-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}
@media (max-width: 768px) {
  .tool-area { grid-template-columns: 1fr; }
}
.section-title { font-size: 1.4rem; color: #f0f6fc; margin-bottom: 1rem; border-bottom: 1px solid #30363d; padding-bottom: 0.5rem; }

/* Form */
.form-group { margin-bottom: 1.2rem; }
label { display: block; font-size: 0.9rem; color: #8b949e; margin-bottom: 0.3rem; }
input, textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 0.95rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
input:focus, textarea:focus { outline: none; border-color: #58a6ff; box-shadow: 0 0 0 2px rgba(88,166,255,0.3); }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1rem 0; }
.presets span { color: #8b949e; font-size: 0.9rem; margin-right: 0.3rem; }
.presets button {
  background: #21262d;
  border: 1px solid #30363d;
  color: #c9d1d9;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.presets button:hover { background: #30363d; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn-secondary {
  background: #21262d;
  border: 1px solid #30363d;
  color: #c9d1d9;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-secondary:hover { background: #30363d; }

/* Output */
.output-panel { position: relative; }
#output-container { display: none; background: #161b22; border: 1px solid #30363d; border-radius: 6px; padding: 1rem; }
#output-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9rem;
  color: #7ee787;
  background: transparent;
  margin-bottom: 1rem;
}
.btn-primary {
  background: #238636;
  border: 1px solid rgba(240,246,252,0.1);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-primary:hover { background: #2ea043; }
.empty-state { color: #8b949e; font-style: italic; padding: 2rem 1rem; text-align: center; border: 1px dashed #30363d; border-radius: 6px; }
#status-message { margin-top: 0.75rem; font-size: 0.85rem; color: #8b949e; min-height: 1.2em; }

/* Support content */
.support-content {
  margin: 3rem 0;
  padding: 2rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
}
.support-content h2 { font-size: 1.6rem; color: #f0f6fc; margin-bottom: 1rem; }
.support-content h3 { font-size: 1.2rem; color: #f0f6fc; margin: 1.5rem 0 0.8rem; }
.support-content p { margin-bottom: 1rem; color: #c9d1d9; }
.support-content ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.support-content li { margin-bottom: 0.5rem; }
.support-content strong { color: #f0f6fc; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: #161b22;
  border-top: 1px solid #30363d;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #8b949e;
}
.site-footer a { color: #8b949e; }
.site-footer a:hover { color: #f0f6fc; }



/* 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;
}
