/* Small Caps Generator - Styling */

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

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

.small-caps-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;
}

.small-caps-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 */
.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 Area */
.output-area {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  transition: all 0.2s;
  cursor: pointer;
}

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

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

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

#copy-btn {
  padding: 0.5rem 1.5rem;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  background: var(--foreground);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 1;
}

#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.5;
  user-select: all;
  text-align: center;
  font-weight: 400;
  min-height: 48px;
}

/* SEO Content Sections */
.content-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.content-section .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.section-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--foreground);
}

.section-content p {
  margin-bottom: 1.25rem;
}

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

.section-content code {
  font-family: 'Monaco', 'Courier New', monospace;
  background: var(--border);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--foreground);
}

/* Use Cases Grid */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.use-case {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}

.use-case:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.use-case-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.use-case h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.use-case p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Example Box */
.example-box {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-size: 1.5rem;
  text-align: center;
  color: var(--foreground);
  font-weight: 500;
}

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

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

  .small-caps-title {
    font-size: 2rem;
  }

  .small-caps-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-area {
    padding: 1.5rem;
  }

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

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

  .use-cases-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .content-section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }
}

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

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

  #copy-btn {
    width: 100%;
  }

  #output-preview {
    font-size: 20px;
  }

  .example-box {
    font-size: 1.25rem;
  }
}

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


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