.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tool-main {
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  background: #f7f8fa;
}

.tool-hero {
  padding: 48px 0 32px;
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f3ff 100%);
  text-align: center;
}

.tool-hero h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1d2129;
  margin-bottom: 12px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-title-row h1 {
  margin-bottom: 0;
}

.btn-favorite-page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5e6eb;
  border-radius: 20px;
  color: #86909c;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-favorite-page .fav-icon {
  font-size: 16px;
  color: #FFB800;
}

.btn-favorite-page:hover {
  border-color: #FFB800;
  color: #d48806;
  background: #fffbe6;
  box-shadow: 0 4px 16px rgba(255, 184, 0, 0.2);
  transform: translateY(-1px);
}

.btn-favorite-page.favorited {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border-color: #FFB800;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 184, 0, 0.35);
}

.btn-favorite-page.favorited .fav-icon {
  color: #fff;
  animation: starPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-favorite-page.favorited:hover {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  border-color: #f53f3f;
  box-shadow: 0 4px 16px rgba(245, 63, 63, 0.3);
}

.tool-hero-sub {
  font-size: 16px;
  color: #4e5969;
  margin-bottom: 20px;
}

.tool-hero-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.badge-green { background: #e8ffea; color: #00B42A; }
.badge-blue { background: #e8f3ff; color: #165DFF; }
.badge-orange { background: #fff7e8; color: #FF7D00; }
.badge-red { background: #ffe8e8; color: #F53F3F; }

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  padding: 24px 0 48px;
}

@media (max-width: 900px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1d2129;
}

.panel-hint {
  font-size: 12px;
  color: #86909c;
}

.tool-specs {
  padding: 48px 0;
  background: #fff;
}

.tool-specs h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #1d2129;
  margin-bottom: 24px;
}

.specs-table-wrap {
  overflow-x: auto;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.specs-table th {
  background: #f7f8fa;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #4e5969;
  border-bottom: 2px solid #e5e6eb;
  white-space: nowrap;
}

.specs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f2f3f5;
  color: #1d2129;
}

.specs-table tr:hover td {
  background: #f7f9ff;
}

.tool-security {
  padding: 48px 0;
  background: #f7f8fa;
}

.tool-security h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #1d2129;
  margin-bottom: 24px;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .security-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .security-grid { grid-template-columns: 1fr; }
}

.security-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.security-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.security-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1d2129;
  margin-bottom: 8px;
}

.security-card p {
  font-size: 13px;
  color: #86909c;
  line-height: 1.6;
}

.tool-related {
  padding: 48px 0;
  background: #fff;
}

.tool-related h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #1d2129;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .related-grid { grid-template-columns: 1fr; }
}

.related-card {
  background: #f7f8fa;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
}

.related-card:hover {
  background: #f0f5ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.1);
  color: inherit;
}

.related-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.related-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #1d2129;
  margin-bottom: 4px;
}

.related-card p {
  font-size: 12px;
  color: #86909c;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #86909c;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.modal-close:hover {
  color: #1d2129;
}

.nav-highlight {
  color: #165DFF !important;
  font-weight: 600;
}

.tool-input-area {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.tool-input-area:focus {
  border-color: #165DFF;
  outline: none;
}

.tool-input-area::placeholder {
  color: #c9cdd4;
}

.result-list {
  max-height: 400px;
  overflow-y: auto;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f2f3f5;
  font-size: 13px;
}

.result-item:last-child {
  border-bottom: none;
}

.result-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.result-icon.pass { color: #00B42A; }
.result-icon.fail { color: #F53F3F; }
.result-icon.warn { color: #FF7D00; }

.result-value {
  flex: 1;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  word-break: break-all;
  color: #1d2129;
}

.result-msg {
  font-size: 12px;
  color: #86909c;
}

.result-stats {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f2f3f5;
  margin-bottom: 12px;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-num.green { color: #00B42A; }
.stat-num.red { color: #F53F3F; }
.stat-num.orange { color: #FF7D00; }
.stat-num.blue { color: #165DFF; }

.stat-label {
  font-size: 12px;
  color: #86909c;
}

.output-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.output-actions .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.upload-zone {
  border: 2px dashed #c9cdd4;
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #165DFF;
  background: #f0f5ff;
}

.upload-zone.drag-over {
  transform: scale(1.01);
}

.upload-icon {
  margin-bottom: 12px;
}

.upload-text {
  font-size: 15px;
  color: #4e5969;
  margin-bottom: 6px;
}

.upload-sub {
  font-size: 12px;
  color: #86909c;
}

.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: #e5e6eb;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar-inner {
  height: 100%;
  background: #165DFF;
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

.format-radio {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.format-radio input[type="radio"],
.format-radio input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #165DFF;
  cursor: pointer;
  flex-shrink: 0;
}

.format-radio span {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  font-size: 13px;
  color: #4e5969;
  transition: all 0.2s ease;
}

.format-radio input[type="radio"]:checked + span {
  border-color: #165DFF;
  background: #f0f5ff;
  color: #165DFF;
  font-weight: 500;
}

.format-radio input[type="checkbox"]:checked + span {
  border-color: #165DFF;
  background: #f0f5ff;
  color: #165DFF;
  font-weight: 500;
}

.tools-cta {
  padding: 48px 0;
  background: #f7f8fa;
}

.cta-card {
  background: linear-gradient(135deg, #165DFF 0%, #0E42D2 100%);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  color: #fff;
}

.cta-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-card > p {
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 16px;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-size: 14px;
  opacity: 0.9;
}

.cta-card .btn {
  background: #fff;
  color: #165DFF;
  font-weight: 600;
}

.cta-card .btn:hover {
  background: #f0f5ff;
}

@media (max-width: 600px) {
  .tool-hero h1 { font-size: 24px; }
  .tool-hero-sub { font-size: 14px; }
  .tool-hero { padding: 32px 0 24px; }
  .tool-specs, .tool-security, .tool-related { padding: 32px 0; }
  .cta-card { padding: 32px 20px; }
  .cta-card h2 { font-size: 20px; }
  .cta-features { gap: 10px; font-size: 13px; }
}

.btn-reset-small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 400;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  background: #f7f8fa;
  color: #86909c;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-reset-small::before {
  content: "⟳";
  font-size: 13px;
  font-weight: normal;
  opacity: 0.8;
}
.btn-reset-small:hover {
  background: #fff2f0;
  border-color: #ffc7c7;
  color: #F53F3F;
}
.btn-reset-small:hover::before {
  opacity: 1;
  animation: btnResetRotate 0.4s ease-in-out;
}
.btn-reset-small:active {
  background: #ffece8;
  transform: scale(0.97);
}

@keyframes btnResetRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

@media (max-width: 600px) {
  .btn-reset-small {
    padding: 4px 10px;
    font-size: 11px;
  }
  .btn-reset-small::before {
    font-size: 12px;
  }
}