.tool-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.tool-container {
  background: var(--background);
}

.tool-breadcrumb {
  margin-bottom: 1.5rem;
}

.tool-breadcrumb ol {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.tool-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-breadcrumb li::after {
  content: '/';
  color: var(--text-muted);
}

.tool-breadcrumb li:last-child::after {
  content: '';
}

.tool-breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.tool-breadcrumb a:hover {
  color: var(--primary-color);
}

.tool-breadcrumb [aria-current] {
  color: var(--text-primary);
  font-weight: 500;
}

.tool-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.tool-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.tool-description {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.6;
}

.tool-content {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.tool-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-section,
.output-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.tool-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  resize: vertical;
  min-height: 120px;
  transition: all var(--transition-fast);
}

.tool-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tool-textarea::placeholder {
  color: var(--text-muted);
}

.tool-textarea.code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.action-section {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  letter-spacing: -0.01em;
}

.tool-button.primary {
  background: var(--primary-color);
  color: white;
}

.tool-button.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.tool-button.secondary {
  background: var(--background);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.tool-button.secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tool-button:active {
  transform: translateY(0);
}

.tool-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.tool-button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.panel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.panel-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--background);
}

.panel-btn:active {
  transform: scale(0.95);
}

.panel-btn:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.panel-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.panel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--primary-color);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.icon-btn.success:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.results-section {
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  animation: slideUp var(--transition);
}

.results-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
}

.stat-card.highlight .stat-value {
  color: var(--success);
}

.tool-info {
  margin-bottom: 2rem;
}

.tool-info h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.tool-tags {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tool-tags strong {
  font-weight: 600;
  color: var(--text-primary);
}

.tag {
  display: inline-flex;
  padding: 0.375rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tag:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.related-tools {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-tools h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.conversion-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.case-btn {
  padding: 0.625rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.case-btn:hover {
  border-color: var(--primary-color);
  background: var(--background);
  color: var(--primary-color);
}

.case-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.diff-tool .diff-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.diff-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.diff-output {
  margin-top: 1.5rem;
}

.diff-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
}

.legend-item.removed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.legend-item.added {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.legend-item.equal {
  background: var(--surface);
  color: var(--text-muted);
}

.diff-result {
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  max-height: 400px;
  overflow-y: auto;
}

.diff-line {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.5;
}

.diff-line:last-child {
  border-bottom: none;
}

.diff-line.removed {
  background: rgba(239, 68, 68, 0.08);
}

.diff-line.added {
  background: rgba(16, 185, 129, 0.08);
}

.upload-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: var(--surface);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.upload-content svg {
  color: var(--primary-color);
}

.options-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dimension-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-group input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--background);
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.tool-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.tool-input:hover {
  border-color: var(--text-muted);
}

.tool-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tool-input::placeholder {
  color: var(--text-muted);
}

.tool-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--surface);
}

.tool-input.error {
  border-color: var(--error);
}

.tool-input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.tool-input.success {
  border-color: var(--success);
}

.tool-input.success:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.tool-input-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.tool-input-lg {
  padding: 1rem 1.25rem;
  font-size: 1.0625rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .tool-input {
  padding-left: 2.5rem;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon .input-icon svg {
  width: 18px;
  height: 18px;
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button .tool-input {
  flex: 1;
}

.input-wrapper {
  position: relative;
}

.input-clear-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0;
  transition: all var(--transition-fast);
}

.input-wrapper:hover .input-clear-btn,
.input-wrapper:focus-within .input-clear-btn {
  opacity: 1;
}

.input-clear-btn:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.tool-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  background: var(--background);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 150px;
}

.tool-select:hover {
  border-color: var(--primary-color);
}

.tool-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tool-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tool-select option {
  padding: 0.5rem;
  background: var(--surface);
  color: var(--text-primary);
}

.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper .tool-select {
  padding-right: 2.5rem;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
}

.original-dimensions {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.preview-section {
  margin-top: 1.5rem;
  text-align: center;
}

.preview-section img {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--background);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.char-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: right;
  margin-left: 1rem;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.validation-status {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

@media (max-width: 768px) {
  .diff-tool .diff-inputs {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dimension-inputs {
    grid-template-columns: 1fr;
  }
}

.mode-toggle-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.mode-toggle {
  display: flex;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.25rem;
  gap: 0.25rem;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 2px);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-btn:hover {
  color: var(--text-primary);
}

.mode-btn.active {
  background: var(--primary-color);
  color: white;
}

.mode-btn svg {
  flex-shrink: 0;
}

.feature-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.badge svg {
  color: var(--success);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.output-wrapper {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.copy-btn .check-icon {
  color: white;
}

.success-message {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.seo-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.seo-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.seo-section h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

.seo-section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.seo-section ul,
.seo-section ol {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.seo-section li {
  margin-bottom: 0.5rem;
}

.seo-section code {
  background: var(--surface);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--primary-color);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--background);
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: none;
}

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

.how-to-steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.step-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  counter-increment: step;
}

.step-item::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
}

.step-content h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.step-content p {
  margin: 0;
  font-size: 0.9375rem;
}

.encoding-diagram {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.encoding-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.encoding-flow .text-box {
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.encoding-flow .arrow {
  color: var(--primary-color);
}

.base64-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.char-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--background);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.char-group .label {
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.char-group .chars {
  color: var(--primary-color);
  font-weight: 600;
}

@media (max-width: 768px) {
  .mode-toggle-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .feature-badges {
    justify-content: center;
  }
  
  .encoding-flow {
    flex-direction: column;
  }
}

.json-tool .json-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .json-tool .json-container {
    grid-template-columns: 1fr;
  }
}

.json-tool .json-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.json-tool .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
}

.json-tool .panel-actions {
  display: flex;
  gap: 0.5rem;
}

.json-tool .panel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.json-tool .panel-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.json-tool .panel-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.json-tool .editor-wrapper {
  display: flex;
  flex: 1;
  min-height: 300px;
  max-height: 500px;
  overflow: hidden;
}

.json-tool .line-numbers {
  padding: 1rem 0.75rem;
  background: var(--background);
  border-right: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: right;
  user-select: none;
  overflow: hidden;
  white-space: pre;
}

.json-tool .json-editor {
  flex: 1;
  padding: 1rem;
  background: var(--background);
  border: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  resize: none;
  outline: none;
}

.json-tool .json-editor::placeholder {
  color: var(--text-muted);
}

.json-tool .json-output {
  flex: 1;
  margin: 0;
  padding: 1rem;
  background: var(--background);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.json-tool .json-output code {
  font-family: inherit;
  color: var(--text-primary);
}

.json-tool .json-key {
  color: #0ea5e9;
}

[data-theme="dark"] .json-tool .json-key {
  color: #38bdf8;
}

.json-tool .json-string {
  color: #22c55e;
}

[data-theme="dark"] .json-tool .json-string {
  color: #4ade80;
}

.json-tool .json-number {
  color: #f59e0b;
}

[data-theme="dark"] .json-tool .json-number {
  color: #fbbf24;
}

.json-tool .json-boolean {
  color: #8b5cf6;
}

[data-theme="dark"] .json-tool .json-boolean {
  color: #a78bfa;
}

.json-tool .json-null {
  color: #ef4444;
}

[data-theme="dark"] .json-tool .json-null {
  color: #f87171;
}

.json-tool .error-display {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border-top: 1px solid var(--error);
}

.json-tool .error-icon {
  color: var(--error);
  flex-shrink: 0;
}

.json-tool .error-content {
  flex: 1;
}

.json-tool .error-content .error-message {
  display: block;
  color: var(--error);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.json-tool .error-content .error-location {
  display: block;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.json-tool .tree-view {
  flex: 1;
  min-height: 300px;
  max-height: 500px;
  padding: 1rem 2rem;
  background: var(--background);
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  border-top: 1px solid var(--border-color);
}

.json-tool .tree-node {
  position: relative;
}

.json-tool .tree-toggle {
  position: absolute;
  left: -20px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.json-tool .tree-toggle::before {
  content: '−';
}

.json-tool .tree-toggle.collapsed::before {
  content: '+';
}

.json-tool .tree-toggle:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.json-tool .tree-children {
  margin-left: 16px;
}

.json-tool .tree-children.collapsed {
  display: none;
}

.json-tool .tree-line {
  padding: 2px 0;
}

.json-tool .tree-label {
  color: var(--text-muted);
}

.json-tool .tree-value {
  font-weight: 500;
}

.json-tool .options-section {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.json-tool .option-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.json-tool .option-group label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.json-tool .option-group select {
  padding: 0.5rem 0.75rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-primary);
}

.json-tool .option-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.json-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.type-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-align: center;
}

.type-card code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--primary-color);
  background: var(--background);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.type-card span {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.json-example {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.json-example pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.comparison-table {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table td {
  color: var(--text-secondary);
}

.comparison-table tr:hover td {
  background: var(--surface);
}

.url-tool .encoding-mode-section {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.url-tool .encoding-mode-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.url-tool .encoding-mode-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.url-tool .encoding-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex: 1;
  position: relative;
}

.url-tool .encoding-option:hover {
  border-color: var(--primary-color);
  background: var(--surface);
}

.url-tool .encoding-option input {
  display: none;
}

/* .url-tool .encoding-option input:checked + .option-content {
  background: var(--primary-light);
} */

.url-tool .encoding-option input:checked + .option-content .option-title {
  color: var(--primary-color);
}

.url-tool .encoding-option:has(input:checked) {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
  /* box-shadow: 0 0 0 3px var(--primary-light); */
}

.url-tool .encoding-option:has(input:checked)::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.url-tool .option-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  transition: all var(--transition-fast);
  width: 100%;
}

.url-tool .option-title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.url-tool .option-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.option-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--background);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.option-card:hover {
  border-color: var(--primary-color);
  background: var(--surface);
}

.option-card input {
  display: none;
}

.option-card:has(input:checked) {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.option-card:has(input:checked)::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
}

.option-card:has(input:checked) .option-label {
  color: var(--primary-color);
}

.option-label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.option-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.comparison-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.comparison-card h4 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.comparison-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

.comparison-card .preserved-chars {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.comparison-card .preserved-chars code {
  background: var(--background);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
}

.comparison-card .example {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.comparison-card .example-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.comparison-card .example code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--background);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.encoding-table {
  overflow-x: auto;
  margin: 1rem 0;
}

.encoding-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.encoding-table th,
.encoding-table td {
  padding: 0.625rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.encoding-table th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.encoding-table td {
  color: var(--text-secondary);
}

.encoding-table td:first-child {
  font-family: var(--font-mono);
}

.encoding-table td:nth-child(2) {
  font-family: var(--font-mono);
  color: var(--primary-color);
}

.encoding-table tr:hover td {
  background: var(--surface);
}

.safe-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.safe-chars code {
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--primary-color);
}

.jsonpath-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  max-height: 300px;
  overflow: auto;
}

.jsonpath-output {
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
}

.jsonpath-error {
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  border-radius: var(--radius);
  color: var(--error);
  font-size: 0.875rem;
}

.history-section {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.history-header h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-item:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.history-input {
  font-size: 0.8125rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-output {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.25rem;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
}

.history-mode {
  color: var(--primary-color);
  font-weight: 500;
}

.history-time {
  color: var(--text-muted);
}

.encoding-example {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin: 1rem 0;
  flex-wrap: wrap;
}

.encoding-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.encoding-step .step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.encoding-step code {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  background: var(--background);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.encoding-arrow {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.code-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.code-example {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-example h4 {
  padding: 0.75rem 1rem;
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.code-example pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

.code-example code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .comparison-cards {
    grid-template-columns: 1fr;
  }
  
  .encoding-example {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .encoding-arrow {
    transform: rotate(90deg);
  }
}

.image-compressor-tool .upload-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.image-compressor-tool .options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.image-compressor-tool .option-card {
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.image-compressor-tool .option-card h4 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.image-compressor-tool .quality-presets {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.image-compressor-tool .preset-btn {
  flex: 1;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.image-compressor-tool .preset-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.image-compressor-tool .preset-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.image-compressor-tool .quality-slider-wrapper {
  margin-bottom: 0.75rem;
}

.image-compressor-tool .quality-slider-wrapper label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.image-compressor-tool .quality-slider-wrapper input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.image-compressor-tool .quality-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.image-compressor-tool .quality-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.image-compressor-tool .quality-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.image-compressor-tool .estimated-size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.image-compressor-tool .estimated-size .label {
  color: var(--text-muted);
}

.image-compressor-tool .estimated-size .value {
  font-weight: 600;
  color: var(--primary-color);
}

.image-compressor-tool .format-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.image-compressor-tool .format-option {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.image-compressor-tool .format-option:hover {
  border-color: var(--primary-color);
}

.image-compressor-tool .format-option:has(input:checked) {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.image-compressor-tool .format-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.image-compressor-tool .format-option input:checked + .format-label {
  color: var(--primary-color);
}

.image-compressor-tool .format-option input:checked + .format-label .format-name {
  font-weight: 600;
}

.image-compressor-tool .format-label {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.image-compressor-tool .format-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.image-compressor-tool .format-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.image-compressor-tool .resize-options .dimension-inputs {
  margin-top: 1rem;
}

.image-compressor-tool .action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.image-compressor-tool .file-list-section {
  margin-top: 1.5rem;
}

.image-compressor-tool .file-list-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.image-compressor-tool .file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.image-compressor-tool .file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.image-compressor-tool .file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.image-compressor-tool .file-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.image-compressor-tool .file-size {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.image-compressor-tool .file-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.image-compressor-tool .file-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.image-compressor-tool .results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.image-compressor-tool .results-header h3 {
  margin: 0;
}

.image-compressor-tool .total-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.image-compressor-tool .results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.image-compressor-tool .result-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.image-compressor-tool .result-preview {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--background);
}

.image-compressor-tool .result-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-compressor-tool .result-info {
  flex: 1;
  min-width: 200px;
}

.image-compressor-tool .result-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.image-compressor-tool .result-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.image-compressor-tool .result-stats .stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
}

.image-compressor-tool .result-stats .stat-label {
  color: var(--text-muted);
}

.image-compressor-tool .result-stats .stat-value {
  font-weight: 500;
  color: var(--text-primary);
}

.image-compressor-tool .result-stats .savings.positive .stat-value {
  color: var(--success);
}

.image-compressor-tool .result-stats .savings.negative .stat-value {
  color: var(--error);
}

.image-compressor-tool .result-dimensions {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.image-compressor-tool .result-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.image-compressor-tool .preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.image-compressor-tool .preview-modal-content {
  position: relative;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.image-compressor-tool .preview-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.image-compressor-tool .preview-close:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.image-compressor-tool .preview-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.image-compressor-tool .preview-side {
  text-align: center;
}

.image-compressor-tool .preview-side h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.image-compressor-tool .preview-side img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.image-compressor-tool .preview-size {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-color);
}

.image-compressor-tool .spinner {
  animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
  .image-compressor-tool .options-grid {
    grid-template-columns: 1fr;
  }
  
  .image-compressor-tool .total-stats {
    grid-template-columns: 1fr;
  }
  
  .image-compressor-tool .result-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .image-compressor-tool .result-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  
  .image-compressor-tool .preview-comparison {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Static Pages Styles
   ======================================== */

.static-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-hero {
  text-align: center;
  padding: 3rem 0 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  opacity: 0.5;
  z-index: -1;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.page-hero .hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.page-content {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.content-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.content-section h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.5rem;
  background: linear-gradient(180deg, var(--primary-color), var(--primary-hover));
  border-radius: 2px;
}

.content-section h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
}

.content-section p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.content-section li {
  margin-bottom: 0.5rem;
}

.content-section a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.content-section a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

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

.feature-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.feature-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  color: var(--primary-color);
}

.feature-item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.tool-categories {
  list-style: none;
  padding: 0;
}

.tool-categories li {
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: all var(--transition-fast);
}

.tool-categories li:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.tool-categories li strong {
  color: var(--text-primary);
}

.contact-section {
  background: linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

.contact-form-wrapper {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--background);
  transition: all var(--transition-fast);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .tool-button {
  width: 100%;
  justify-content: center;
}

.form-success {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--success);
}

.form-success svg {
  margin-bottom: 1rem;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--text-secondary);
  margin: 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.info-card:hover {
  border-color: var(--primary-color);
  transform: translateX(4px);
}

.info-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius);
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.info-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--primary-color);
}

.faq-item.open {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  transition: all var(--transition-fast);
}

.faq-question:hover {
  background: var(--background);
}

.faq-question svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.faq-item.open .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 1.25rem 1rem;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.content-section strong {
  color: var(--text-primary);
}

.content-section p strong:first-child {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  border-radius: var(--radius);
  color: var(--primary-color);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .static-page {
    padding: 1rem;
  }
  
  .page-hero {
    padding: 2rem 0 1.5rem;
  }
  
  .page-content {
    padding: 1.5rem;
  }
  
  .content-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-section {
    padding: 1.5rem;
  }
  
  .contact-form-wrapper {
    padding: 1.5rem;
  }
}
