body{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:#f8f8fc;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fa,.fa-solid,.fa-brands{
  font-family:FontAwesome;
  font-weight:normal;
  font-style:normal;
  display:inline-block;
  text-rendering:auto;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.fa-wand-magic-sparkles:before{content:"\f276";}
.fa-magnifying-glass:before{content:"\f2eb";}
.fa-house:before{content:"\f237";}
.fa-user-check:before{content:"\f364";}
.fa-file-lines:before{content:"\f1ec";}
.fa-chart-line:before{content:"\f267";}
.fa-pen-to-square:before{content:"\f1c1";}
.fa-file-pdf:before{content:"\f1e7";}
.fa-right-left:before{content:"\f1cc";}
.fa-shield-halved:before{content:"\f2f7";}
.fa-boxes-stacked:before{content:"\f1af";}
.fa-gem:before{content:"\f1b9";}
.fa-mobile-screen-button:before{content:"\f292";}
.fa-arrow-down-a-z:before{content:"\f307";}
.fa-palette:before{content:"\f2a7";}
.fa-x-twitter:before{content:"\f359";}

.gradient-text{
  background: linear-gradient(to right,#7c4dff,#b76cff);
  background-clip: text;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

.hero-bg{
  background:
  radial-gradient(circle at top right, rgba(139,92,246,.18), transparent 35%),
  radial-gradient(circle at bottom left, rgba(59,130,246,.12), transparent 35%);
}

.card-hover{
  transition: all .25s ease;
}

.card-hover:hover{
  transform: translateY(-5px);
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}

.tool-card{
  background:white;
  border:1px solid #ececf2;
  border-radius:24px;
}

.popular-tools-grid{
  display:grid;
  grid-template-columns:1fr;
}

@media (min-width:768px){
  .popular-tools-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (min-width:1024px){
  .popular-tools-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

.soft-shadow{
  box-shadow:0 10px 40px rgba(0,0,0,.05);
}

.prose-content h1,
.prose-content h2,
.prose-content h3,
.prose-content h4{
  font-weight: 700;
  color:#111827;
  line-height:1.25;
  margin-top:1.5em;
  margin-bottom:.6em;
  scroll-margin-top:120px;
}

.prose-content p{
  margin:1em 0;
  line-height:1.85;
  color:#374151;
}

.prose-content a{
  color:#7c4dff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-content img{
  max-width:100%;
  height:auto;
  border-radius:1rem;
  margin:1.5rem 0;
}

.prose-content ul,
.prose-content ol{
  padding-left:1.5rem;
  margin:1rem 0;
}

.prose-content li{
  margin:.35rem 0;
}

.prose-content blockquote{
  border-left:3px solid #7c4dff;
  padding:.75rem 1rem;
  margin:1.5rem 0;
  color:#6b7280;
  font-style:italic;
  background:#faf7ff;
  border-radius:.75rem;
}

.prose-content pre{
  background:#111827;
  color:#e5e7eb;
  border-radius:1rem;
  padding:1rem;
  overflow:auto;
  margin:1.5rem 0;
}

.prose-content code{
  font-size:.92em;
  background:#f3f4f6;
  padding:.15rem .35rem;
  border-radius:.35rem;
}

.prose-content pre code{
  background:none;
  padding:0;
}

.page-shell{
  max-width: 1100px;
  margin: 0 auto;
}

.page-hero{
  position: relative;
  overflow: hidden;
}

.page-hero::before{
  content:'';
  position:absolute;
  inset:auto -8rem -8rem auto;
  width:18rem;
  height:18rem;
  background:rgba(139,92,246,.12);
  filter:blur(50px);
  border-radius:9999px;
  pointer-events:none;
}

.tool-playground{
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 28px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.tool-playground__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1.25rem;
}

.tool-playground__eyebrow{
  margin:0 0 .35rem;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.72rem;
  font-weight:800;
  color:#7c4dff;
}

.tool-playground__title{
  margin:0;
  font-size:1.5rem;
  line-height:1.2;
}

.tool-playground__description{
  margin:.5rem 0 0;
  color:#6b7280;
  line-height:1.7;
}

.tool-playground__badge{
  padding:.55rem .9rem;
  border-radius:999px;
  background:#eef2ff;
  color:#4f46e5;
  font-size:.8rem;
  font-weight:700;
  white-space:nowrap;
}

.tool-playground__body{
  display:grid;
  gap:1rem;
}

.tool-playground__panel{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:22px;
  padding:1rem;
}

.tool-playground__label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin-bottom:.6rem;
}

.tool-playground__label{
  font-size:.9rem;
  font-weight:700;
  color:#111827;
}

.tool-playground__status{
  padding:.35rem .7rem;
  border-radius:999px;
  background:#f3f4f6;
  color:#4b5563;
  font-size:.8rem;
  font-weight:700;
}

.tool-playground__status[data-tone="success"]{
  background:#dcfce7;
  color:#166534;
}

.tool-playground__status[data-tone="error"]{
  background:#fee2e2;
  color:#b91c1c;
}

.tool-playground__textarea,
.tool-playground__output{
  width:100%;
  min-height:17rem;
  border:0;
  border-radius:18px;
  background:#0f172a;
  color:#e5e7eb;
  padding:1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:.95rem;
  line-height:1.7;
  white-space:pre-wrap;
  overflow:auto;
}

.tool-playground__textarea{
  resize: vertical;
  outline:none;
}

.tool-playground__actions{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
}

.tool-playground__button{
  border:1px solid #e5e7eb;
  background:#fff;
  color:#111827;
  padding:.85rem 1rem;
  border-radius:14px;
  font-weight:700;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.tool-playground__button:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15, 23, 42, 0.08);
}

.tool-playground__button--primary{
  background:#7c4dff;
  color:#fff;
  border-color:#7c4dff;
}

.tool-playground__button--ghost{
  background:#f8fafc;
}

.tool-extra-grid{
  display:grid;
  gap:.75rem;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
}

.tool-field span{
  display:block;
  font-size:.82rem;
  font-weight:700;
  color:#374151;
  margin-bottom:.35rem;
}

.tool-field input{
  width:100%;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:.75rem .9rem;
  outline:none;
  background:#fff;
}

.tool-preview svg,
.tool-canvas{
  max-width:100%;
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
}

.tool-swatch{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:6.5rem;
  height:4rem;
  margin:.25rem;
  border-radius:14px;
  color:#fff;
  font-size:.8rem;
  font-weight:700;
  text-shadow:0 1px 3px rgba(0,0,0,.35);
}

.tool-gradient{
  min-height:9rem;
  border-radius:18px;
  border:1px solid #e5e7eb;
}

.tool-serp{
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:1rem;
  background:#fff;
}

.tool-serp div{color:#16a34a;font-size:.85rem;}
.tool-serp h3{color:#1d4ed8;font-size:1.2rem;margin:.25rem 0;}
.tool-serp p{color:#4b5563;}

.tool-barcode{
  display:flex;
  align-items:stretch;
  gap:2px;
  height:90px;
  padding:1rem;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
}

.tool-barcode span{display:block;background:#111827;}

@media (max-width: 768px){
  h1{font-size:2.4rem;}
  .soft-shadow{box-shadow:0 8px 24px rgba(0,0,0,.05);}
  .tool-playground__header{
    flex-direction:column;
  }

  .tool-playground__textarea,
  .tool-playground__output{
    min-height:14rem;
  }
}

/* Pagination Styles */
.pagination-wrapper {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ececf2;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(.pagination-current):not(.pagination-prev):not(.pagination-next) {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.pagination-current {
  background: #7c4dff;
  color: #fff;
  border-color: #7c4dff;
  cursor: default;
}

.pagination-prev,
.pagination-next {
  padding: 0 1rem;
}

.pagination-prev:hover,
.pagination-next:hover {
  background: #7c4dff;
  color: #fff;
  border-color: #7c4dff;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  color: #9ca3af;
  font-size: 0.9rem;
}

.pagination-info {
  font-size: 0.85rem;
  color: #6b7280;
}

@media (max-width: 640px) {
  .pagination-btn {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
    padding: 0 0.5rem;
  }

  .pagination-prev,
  .pagination-next {
    padding: 0 0.75rem;
  }
}
