.sitemap-tool-page {
  padding: 32px 0 72px;
}

.sitemap-hero,
.result-panel {
  max-width: 980px;
  margin: 0 auto 24px;
}

.sitemap-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.sitemap-form {
  display: grid;
  gap: 20px;
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group label {
  font-weight: 700;
  color: #0f172a;
}

.field-group input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  font-size: 16px;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.field-group small {
  color: #64748b;
  font-size: 13px;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #334155;
}

.btn-row,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.btn-primary:active,
.btn-secondary:active,
.btn-primary.is-busy {
  transform: scale(0.98);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status-box,
.loading-box,
.note-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
}

.status-box.success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-box.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.loading-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.stat-label {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  line-height: 1;
  color: #0f172a;
}

.note-box {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  margin-bottom: 16px;
}

.xml-output {
  width: 100%;
  min-height: 460px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #cbd5e1;
  background: #0f172a;
  color: #e2e8f0;
  font: 14px/1.65 Consolas, Monaco, monospace;
  resize: vertical;
}

.is-hidden {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
  .sitemap-tool-page {
    padding: 18px 0 48px;
  }

  .sitemap-card,
  .result-panel {
    padding: 18px;
  }

  .field-grid,
  .stats-grid,
  .result-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .result-head {
    gap: 14px;
  }

  .btn-row,
  .result-actions {
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .xml-output {
    min-height: 360px;
  }
}
