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

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

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

.section-title {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.6rem;
  color: #007bff;
}

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

.upload-area:hover,
.upload-area:focus {
    border-color: #0056b3;
    background: #e3f2fd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.upload-area.dragover {
    border-color: #28a745;
    background: #e8f5e8;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* keep file input accessible but off-screen (NOT display:none) */
.file-input-offscreen {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.note-box {
  margin: 1rem auto;
  padding: 1rem;
  border: 2px solid #007bff;
  border-radius: 8px;
  background: #e9f5ff;
  text-align: center;
}

.controls {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.controls input {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  flex: 1;
  min-width: 200px;
}

.btn-primary, .btn-secondary, .btn-danger {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
}

.btn-primary { background: #007bff; }
.btn-secondary { background: #6c757d; }
.btn-danger { background: #dc3545; }

.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.page-thumb {
  position: relative;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.page-thumb.selected {
  border-color: #dc3545;
}

.page-thumb canvas {
  width: 100%;
  height: auto;
  border: 1px solid #ccc;
}

.page-thumb .remove-x {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #dc3545;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.page-thumb.selected .remove-x {
  display: flex;
}

.hidden { display: none; }

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f8f9fa;
  cursor: pointer;
  color: #007bff;
  font-weight: bold;
  font-size: 1.125rem; /* ~18px */
  line-height: 1.5;   /* more breathing room */
}

.faq-answer { display: none; padding: 0.5rem 1rem; }
.faq-item.active .faq-answer { display: block; }

/* Limit main content width to 80% of screen */
main {
  width: 80%;
  max-width: 1200px; /* still keep max cap */
  margin: 0 auto;    /* center it */
}
@media (max-width: 600px) {
  main {
    width: 95%; /* more space on small screens */
  }
}

footer {
    background: #f1f1f1;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    color: #666;
}

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

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

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

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem auto;
}

.steps .step p {
  text-align: left;
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .step-number {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

/* 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 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

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

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

.tool-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

footer p, footer a {
  color: #222 !important;  /* darker text */
}


