/* ==========================================================================
   FancyTexto - Clean, Minimalist, Modern Stylesheet
   ========================================================================== */

/* --- CSS Reset & Global Variables --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-color: #cbd5e1;
  --border-focus: #3b82f6;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-unicode: "Segoe UI Symbol", "Apple Symbols", "Arial Unicode MS", sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.15);
  --max-width: 1180px;
}

/* --- Document Body --- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header & Brand --- */
.site-header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  padding: 16px 24px;
}

.brand {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--text-main);
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  border-radius: var(--radius-sm);
  user-select: none;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

/* --- Main Wrapper --- */
.main-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 60px;
  flex: 1;
  width: 100%;
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  margin-bottom: 36px;
}

.page-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 12px;
}

.page-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto;
}

/* --- Generator Dual Textareas Layout --- */
.generator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 50px;
}

.generator-panel {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
}

.panel-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.label-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.label-hint {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-weight: 500;
}

/* --- Clean Textarea Design --- */
.text-box {
  width: 100%;
  height: 480px;
  min-height: 360px;
  padding: 18px 20px;
  font-family: var(--font-sans), var(--font-unicode);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: pre-wrap;
  word-break: break-word;
}

.text-box::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.text-box:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.input-box {
  background-color: #ffffff;
}

.output-box {
  background-color: #fafbfc;
  cursor: text;
}

/* Subtle Scrollbars */
.text-box::-webkit-scrollbar {
  width: 8px;
}

.text-box::-webkit-scrollbar-track {
  background: transparent;
}

.text-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.text-box::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --- Informational Content & SEO Section --- */
.content-section {
  border-top: 1px solid var(--border-color);
  padding-top: 48px;
  max-width: 900px;
  margin: 0 auto;
}

.info-block {
  margin-bottom: 44px;
}

.info-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 14px;
}

.info-block p {
  color: #334155;
  font-size: 1rem;
  margin-bottom: 14px;
}

.info-block code {
  background-color: var(--bg-tertiary);
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.info-block kbd {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.85em;
  font-family: inherit;
  box-shadow: 0 1px 0 #cbd5e1;
}

/* Steps List */
.steps-list {
  padding-left: 20px;
  color: #334155;
}

.steps-list li {
  margin-bottom: 10px;
  padding-left: 4px;
}

/* Platforms List */
.platforms-list {
  padding-left: 20px;
  color: #334155;
}

.platforms-list li {
  margin-bottom: 8px;
}

/* Styles Grid */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.style-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.style-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.preview-text {
  font-size: 1.15rem;
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 8px !important;
  word-break: break-all;
}

.style-card p {
  font-size: 0.92rem;
  color: #475569;
  margin-bottom: 0;
}

/* FAQ Details Accordion */
.faq-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 36px;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background-color: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: #94a3b8;
}

.faq-question {
  padding: 16px 20px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 16px;
  color: #475569;
  font-size: 0.96rem;
}

/* --- Minimal Footer --- */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  background-color: var(--bg-primary);
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-tagline {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

/* --- Responsive Media Queries --- */
@media (max-width: 820px) {
  .generator-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .text-box {
    height: 340px;
    min-height: 280px;
  }

  .page-title {
    font-size: 1.85rem;
  }

  .page-desc {
    font-size: 1rem;
  }

  .main-wrapper {
    padding: 28px 16px 44px;
  }

  .styles-grid {
    grid-template-columns: 1fr;
  }
}
