/* Cursive Text Generator - Styling */

/* Import Google Fonts for Visual Reference */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Dancing+Script:wght@700&family=Allura&display=swap');

.cursive-generator {
  padding: 9rem 0 4rem;
  min-height: 100vh;
}

.cursive-header {
  text-align: center;
  margin-bottom: 3rem;
}

.cursive-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--foreground);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.cursive-description {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--muted-foreground);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.generator-section {
  max-width: 900px;
  margin: 0 auto;
}

/* Input Area (Main Page Only) */
.input-area {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: border-color 0.2s;
}

.input-area:focus-within {
  border-color: var(--foreground);
}

#text-input {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--foreground);
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}

#text-input:focus {
  outline: none;
  border-color: var(--foreground);
  background: white;
}

#text-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  gap: 1rem;
}

#clear-btn {
  padding: 0.5rem 1.25rem;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--foreground);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

#clear-btn:hover {
  background: var(--border);
  transform: translateY(-1px);
}

#clear-btn:active {
  transform: translateY(0);
}

.char-count {
  font-size: 14px;
  color: var(--muted-foreground);
  font-weight: 500;
}

#char-count {
  font-weight: 600;
  color: var(--foreground);
}

/* Output Grid */
#output-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.output-section {
  margin-bottom: 2rem;
}

.output-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
  text-align: center;
}

.output-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.output-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.output-card:hover {
  border-color: var(--foreground);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.output-card:active {
  transform: translateY(0);
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.output-title {
  flex: 1;
}

.output-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.output-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.copy-btn {
  padding: 0.375rem 0.875rem;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: var(--foreground);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 1;
  flex-shrink: 0;
}

.copy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.copy-btn:active {
  transform: scale(0.95);
}

.output-preview {
  font-size: 32px;
  color: var(--foreground);
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.4;
  user-select: all;
  text-align: center;
  font-weight: 400;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted-foreground);
  grid-column: 1 / -1;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state .empty-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.empty-state .empty-subtext {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

/* Visual Reference Section (Letter Pages) */
.visual-reference-section {
  background: var(--secondary);
  padding: 3rem 0;
  margin-bottom: 3rem;
}

.visual-reference-section .section-title {
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--foreground);
}

#visual-reference {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.visual-item {
  text-align: center;
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.visual-font-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.visual-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.visual-lowercase,
.visual-uppercase {
  font-size: 5rem;
  color: var(--foreground);
}

.font-great-vibes {
  font-family: 'Great Vibes', cursive;
}

.font-dancing-script {
  font-family: 'Dancing Script', cursive;
}

.font-allura {
  font-family: 'Allura', cursive;
}

/* A-Z Navigation */
.az-navigation {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
}

.az-navigation h3 {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.az-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.az-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.az-link:hover {
  background: var(--foreground);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.az-link.active {
  background: var(--foreground);
  color: white;
  border-color: var(--foreground);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--foreground);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* SEO Content Section */
.seo-content {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 1.8;
  color: var(--foreground);
}

.seo-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.seo-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.seo-content strong {
  color: var(--foreground);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cursive-generator {
    padding: 6rem 0 3rem;
  }

  .cursive-title {
    font-size: 2rem;
  }

  .cursive-description {
    font-size: 1rem;
  }

  .generator-section {
    padding: 0 1rem;
  }

  .input-area {
    padding: 1rem;
  }

  #text-input {
    min-height: 100px;
    font-size: 16px;
  }

  .input-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #clear-btn {
    width: 100%;
  }

  .char-count {
    text-align: center;
  }

  .output-grid-row {
    grid-template-columns: 1fr;
  }

  .output-preview {
    font-size: 28px;
  }

  .visual-lowercase,
  .visual-uppercase {
    font-size: 4rem;
  }

  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    text-align: center;
  }

  .az-links {
    gap: 0.5rem;
  }

  .az-link {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .cursive-header {
    margin-bottom: 2rem;
  }

  .output-card {
    padding: 1.25rem;
  }

  .output-header {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  .output-preview {
    font-size: 24px;
  }

  #visual-reference {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .visual-display {
    gap: 1.5rem;
  }

  .visual-lowercase,
  .visual-uppercase {
    font-size: 3.5rem;
  }

  .seo-content {
    padding: 1.5rem;
  }
}

/* Smooth Transitions */
.output-card,
.copy-btn,
#text-input,
.az-link {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading State */
#output-grid.loading {
  opacity: 0.5;
  pointer-events: none;
}
/* New SEO Content Sections */
.letter-intro-section,
.characteristics-section,
.writing-tips-section,
.comparison-section,
.words-section,
.use-cases-section,
.faq-section,
.copy-paste-section {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 1.8;
}

.intro-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

/* Meta Badges */
.letter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.meta-badge {
  padding: 0.5rem 1rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.meta-badge strong {
  color: var(--foreground);
  font-weight: 600;
}

/* Characteristics List */
.characteristics-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.characteristics-list li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.characteristics-list li:last-child {
  border-bottom: none;
}

.characteristics-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--foreground);
  font-weight: 600;
}

/* Writing Steps */
.tips-container {
  margin: 1.5rem 0;
}

.writing-steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.writing-steps li {
  counter-increment: step-counter;
  padding: 1rem;
  padding-left: 3rem;
  margin-bottom: 0.75rem;
  background: var(--secondary);
  border-radius: 8px;
  position: relative;
}

.writing-steps li:before {
  content: counter(step-counter);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--foreground);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.tip-callout {
  padding: 1rem 1.25rem;
  background: var(--background);
  border-left: 4px solid var(--foreground);
  border-radius: 4px;
  font-size: 0.9375rem;
}

/* Comparison Table */
.cursive-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.cursive-comparison-table th,
.cursive-comparison-table td {
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--border);
}

.cursive-comparison-table thead {
  background: var(--secondary);
}

.cursive-comparison-table th {
  font-weight: 600;
  color: var(--foreground);
}

.cursive-comparison-table .cursive-char {
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
}

.cursive-comparison-table tbody tr:nth-child(even) {
  background: var(--secondary);
}

.cursive-comparison-table tbody tr:hover {
  background: var(--border);
}

/* Word and Name Tags */
.words-showcase,
.names-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.word-tag,
.name-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--foreground);
  transition: all 0.2s;
}

.word-tag:hover,
.name-tag:hover {
  background: var(--foreground);
  color: white;
  transform: translateY(-2px);
}

.name-tag {
  font-weight: 600;
}

/* Use Cases List */
.use-cases-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.use-cases-list li {
  padding: 1rem;
  padding-left: 2.5rem;
  margin-bottom: 0.75rem;
  background: var(--secondary);
  border-radius: 8px;
  position: relative;
}

.use-cases-list li:before {
  content: "→";
  position: absolute;
  left: 1rem;
  color: var(--foreground);
  font-weight: 600;
  font-size: 1.25rem;
}

/* FAQ Section */
.faq-container {
  margin: 1.5rem 0;
}

.faq-item {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.faq-item h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.faq-item p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--foreground);
}

/* Platform List */
.platform-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}

.platform-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.platform-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--foreground);
  font-weight: 600;
}

/* Section Titles */
.letter-intro-section h2,
.characteristics-section h2,
.writing-tips-section h2,
.comparison-section h2,
.words-section h2,
.use-cases-section h2,
.faq-section h2,
.copy-paste-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.words-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--foreground);
}

/* Mobile Responsive for New Sections */
@media (max-width: 768px) {
  .letter-intro-section,
  .characteristics-section,
  .writing-tips-section,
  .comparison-section,
  .words-section,
  .use-cases-section,
  .faq-section,
  .copy-paste-section {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .letter-meta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .writing-steps li {
    padding-left: 2.5rem;
    font-size: 0.9375rem;
  }

  .writing-steps li:before {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    left: 0.75rem;
  }

  .cursive-comparison-table {
    font-size: 0.875rem;
  }

  .cursive-comparison-table th,
  .cursive-comparison-table td {
    padding: 0.75rem 0.5rem;
  }

  .cursive-comparison-table .cursive-char {
    font-size: 1.5rem;
  }

  .platform-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .words-showcase,
  .names-showcase {
    gap: 0.5rem;
  }

  .word-tag,
  .name-tag {
    font-size: 0.875rem;
    padding: 0.4rem 0.8rem;
  }

  .faq-item {
    padding: 1rem;
  }

  .faq-item h4 {
    font-size: 1rem;
  }

  .cursive-comparison-table {
    display: block;
    overflow-x: auto;
  }
}


/* Dark mode fixes */
[data-theme="dark"] .copy-btn {
  background: var(--foreground);
  color: var(--background);
}

[data-theme="dark"] .toast {
  background: var(--foreground);
  color: var(--background);
}

[data-theme="dark"] .step-number {
  background: var(--foreground);
  color: var(--background);
}

[data-theme="dark"] #text-input:focus {
  background: var(--card);
}


[data-theme="dark"] .az-link:hover,
[data-theme="dark"] .az-link.active {
  background: var(--foreground);
  color: var(--background);
}

[data-theme="dark"] .name-tag:hover {
  background: var(--foreground);
  color: var(--background);
}
