/* Modern Variables & Reset */
:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --bg-color: #f3f4f6;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 0.75rem;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

/* Container & Card */
.stc-container {
  width: 100%;
  max-width: 1000px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: var(--transition);
}


.stc-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  padding: 2rem;
  text-align: center;
  position: relative;
  /* Added for positioning the return button if needed, though flex might be better */
}

/* Return Button */
.return-btn {
  display: inline-block;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  backdrop-filter: blur(4px);
}

.return-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateX(-3px);
}

/* Title Styling from previous context */
.stc-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.stc-title span {
  font-size: 1.5rem;
}

.stc-description {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Form Elements */
.stc-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.input-group {
  margin-bottom: 0;
  /* Remove bottom margin as grid gap handles spacing */
  position: relative;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  color: var(--text-muted);
  font-weight: 500;
  z-index: 1;
}

.input-icon.left {
  left: 1rem;
}

.input-icon.right {
  right: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background-color: #f9fafb;
}

.form-input.has-left-icon {
  padding-left: 2.5rem;
}

.form-input.has-right-icon {
  padding-right: 2.5rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Action Buttons */
/* Action Buttons */
.button-group {
  grid-column: 1 / -1;
  /* Span all columns */
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  max-width: 600px;
  /* Limit width for better usability */
  margin-left: auto;
  margin-right: auto;
}

.btn {
  border: none;
  padding: 0.875rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
  background-color: #ffe4e6;
  color: var(--danger-color);
}

.btn-secondary:hover {
  background-color: #fecdd3;
  transform: translateY(-2px);
}

/* Result Section */
.result-display {
  grid-column: 1 / -1;
  /* Span all columns */
  margin-top: 1rem;
  padding: 1.5rem;
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
  border-radius: var(--radius);
  color: #065f46;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
  display: none;
}

.result-display.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.result-display.error {
  background-color: #fef2f2;
  border-color: #fee2e2;
  color: #991b1b;
}

/* Responsive Footer (for credits/links if needed) */
.footer-link {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer-link a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

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

/* SEO Content Styles */
.seo-content {
  margin-top: 3rem;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.seo-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.seo-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #4b5563;
}

.seo-content ul,
.seo-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #4b5563;
}

.seo-content li {
  margin-bottom: 0.5rem;
}

.seo-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  display: block;
  box-shadow: var(--shadow-sm);
}

.seo-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.seo-content th,
.seo-content td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.seo-content th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #111827;
}

.seo-content tr:last-child td {
  border-bottom: none;
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.table-responsive table {
  margin: 0;
  border: none;
}

/* Specific overrides for tables inside .table-responsive to avoid double borders if needed */
.table-responsive td,
.table-responsive th {
  white-space: nowrap;
  /* Prevent wrapping on small screens for data tables */
}


@media (max-width: 768px) {
  .stc-body {
    grid-template-columns: 1fr;
    /* Stack on smaller screens */
  }
}

@media (max-width: 640px) {
  .seo-content {
    padding: 1.5rem;
    margin-top: 2rem;
  }

  .seo-content h2 {
    font-size: 1.25rem;
  }

  .seo-content h3 {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .stc-header {
    padding: 1.5rem;
  }

  .stc-body {
    padding: 1.5rem;
  }

  .button-group {
    grid-template-columns: 1fr;
  }
}