* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
  margin: 0;
  line-height: 1.6;
}

/* Header */
header {
  text-align: center;
  background: #007bff;
  color: #fff;
  padding: 2rem 1rem;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

header p.intro {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.95;
}

/* Layout */
main {
  max-width: 1200px;
  margin: auto;
  padding: 2rem 1rem;
}

section {
  background: #fff;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

/* Section titles */
.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: #007bff;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #007bff;
  border-radius: 2px;
  opacity: 0.8;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  margin: 0.25rem;
  transition: 0.2s;
}

.btn-primary {
  background: #007bff;
  color: #fff;
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
}

.btn-secondary:hover {
  background: #545b62;
}

/* Upload area */
.upload-area {
  display: block;
  border: 2px dashed #007bff;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8f9ff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  background: #e3f2fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.upload-area.drag-over {
  background: #d6ecff;
  border-color: #0056b3;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.upload-hint {
  font-size: 0.9rem;
  color: #555;
}

.file-input-offscreen {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* Preview section */
.preview-section {
  display: none;
  margin-top: 2rem;
}

.preview-section.show {
  display: block;
}

.preview-section h3 {
  margin-top: 0;
  color: #007bff;
}

/* Favicon layout */
.favicon-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}

.favicon-original,
.favicon-generated {
  background: #f8f9ff;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid #e1e8ef;
}

.favicon-original h4,
.favicon-generated h4 {
  margin-top: 0;
  color: #007bff;
}

.orig-image-wrap {
  border-radius: 10px;
  background: #ffffff;
  padding: 1rem;
  border: 1px solid #dde2ea;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orig-image-wrap img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.file-info {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.75rem;
}

.small-text {
  font-size: 0.9rem;
  color: #555;
}

/* Icons grid */
.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.icon-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #dde2ea;
  padding: 0.8rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.icon-card canvas,
.icon-card img {
  border-radius: 6px;
  background: #f3f3f3;
  display: block;
  margin: 0 auto 0.5rem;
}

.icon-card h5 {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.icon-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

/* HTML snippet */
.html-snippet {
  margin-top: 1.25rem;
}

#htmlSnippet {
  width: 100%;
  min-height: 140px;
  border-radius: 8px;
  border: 1px solid #ced4da;
  padding: 0.75rem;
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  resize: vertical;
}

/* Note box */
.note-box {
  text-align: center;
  margin: 2rem auto 0;
  padding: 1rem 1.5rem;
  max-width: 800px;
  border: 2px solid #007bff;
  border-radius: 8px;
  background: #e9f5ff;
  font-weight: 500;
  color: #0056b3;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.step {
  background: #ffffff;
  border: 1px solid #e1e8ef;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.3s; }
.step:nth-child(3) { animation-delay: 0.5s; }

.step:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.15);
}

.step-number {
  width: 65px;
  height: 65px;
  background: linear-gradient(145deg, #007bff, #0056b3);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.25);
  transition: background 0.3s ease, transform 0.3s ease;
}

.step:hover .step-number {
  background: linear-gradient(145deg, #0069d9, #004d9f);
  transform: scale(1.05);
}

.step h3 {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.step p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Animation */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Benefits */
.benefits-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.benefits-grid li {
  background: #f8f9fa;
  padding: 1rem;
  border-left: 4px solid #007bff;
  border-radius: 6px;
  font-size: 1rem;
}

/* FAQ */
#faq {
  margin-top: 2rem;
}

.faq-question {
  width: 100%;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  color: #007bff;
}

.faq-answer {
  display: none;
  padding: 1rem;
  border-left: 3px solid #007bff;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 4px;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Footer */
footer {
  background: #f1f1f1;
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
}

footer a {
  color: #007bff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .favicon-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.6rem;
  }

  .step {
    padding: 1.5rem 1rem;
  }

  .step-number {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }

  .note-box {
    font-size: 0.95rem;
    padding: 1rem;
  }
}

/* Related Tools Section */
.related-tools {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.related-tools h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: #007bff;
}

/* Tools Grid layout */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* Tool Card */
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #e3e6ea;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* Tool icons inside card */
.tool-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #007bff;
}

.tool-card h3, 
.tool-card h2 {
  margin: 0.25rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #333;
}

.tool-card p {
  font-size: 0.95rem;
  color: #555;
  margin: 0.35rem 0;
}

