/* ============================================================
   TOOL PAGE STYLES
   ============================================================ */

/* ─── TOOL PAGE LAYOUT ───────────────────────────────────── */
.tool-page {
  min-height: calc(100vh - var(--header-h));
  padding: var(--space-10) 0 var(--space-16);
}

/* ─── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep {
  color: var(--text-light);
  font-size: var(--text-xs);
}
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* ─── TOOL HEADER ────────────────────────────────────────── */
.tool-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.tool-header-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.tool-header-info { flex: 1; }
.tool-header-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}
.tool-header-desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: var(--space-4);
}
.tool-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.tool-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── TOOL WORKSPACE ─────────────────────────────────────── */
.tool-workspace {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.tool-workspace-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: var(--bg-muted);
}
.tool-workspace-title { font-weight: 700; font-size: var(--text-base); }
.tool-workspace-body  { padding: var(--space-8); }

/* ─── FILE LIST ──────────────────────────────────────────── */
.file-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.file-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}
.file-item:hover { border-color: var(--primary); }
.file-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.file-item-info { flex: 1; min-width: 0; }
.file-item-name {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-item-size {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.file-item-actions {
  display: flex;
  gap: var(--space-2);
}
.file-item-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
}
.file-item-btn:hover { background: var(--border); color: var(--text); }
.file-item-btn.danger:hover { background: rgba(239,68,68,0.1); color: var(--danger); }

/* ─── PROGRESS STATE ─────────────────────────────────────── */
.processing-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}
.processing-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  display: block;
}
.processing-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.processing-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}
.processing-progress {
  max-width: 400px;
  margin: 0 auto var(--space-4);
}
.processing-pct {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── RESULT STATE ───────────────────────────────────────── */
.result-state {
  text-align: center;
  padding: var(--space-10) var(--space-6);
}
.result-icon {
  width: 72px;
  height: 72px;
  background: rgba(34,197,94,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto var(--space-5);
  animation: scaleIn 0.5s var(--transition-bounce);
}
.result-title   { font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--space-2); }
.result-subtitle{ font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-8); }
.result-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ─── OPTIONS PANEL ──────────────────────────────────────── */
.options-panel {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-5);
  border: 1px solid var(--border);
}
.options-panel-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
}
.option-row + .option-row {
  border-top: 1px solid var(--border);
}
.option-label {
  font-size: var(--text-sm);
  font-weight: 500;
}
.option-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.option-control { flex-shrink: 0; }

/* Toggle switch */
.toggle {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast);
}
.toggle.active { background: var(--primary); }
.toggle::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.active::after { transform: translateX(20px); }

/* Range slider */
.range-control {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
input[type="range"] {
  -webkit-appearance: none;
  width: 140px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.range-value {
  min-width: 36px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
}

/* Select */
.option-select {
  padding: 5px 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.option-select:focus { border-color: var(--primary); }

/* ─── PRIVACY NOTICE ─────────────────────────────────────── */
.privacy-notice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-lg);
  margin-top: var(--space-5);
}
.privacy-icon { font-size: 20px; flex-shrink: 0; }
.privacy-text { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
.privacy-text strong { color: var(--success); font-weight: 600; }

/* ─── TOOL INFO SECTION ──────────────────────────────────── */
.tool-info {
  margin-top: var(--space-12);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-8);
  align-items: start;
}
.tool-info-main {}
.tool-info-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
}
.tool-info-body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.8;
}
.tool-info-body h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin: var(--space-5) 0 var(--space-3);
}
.tool-info-body p   { margin-bottom: var(--space-3); }
.tool-info-body ul  { padding-left: var(--space-5); margin-bottom: var(--space-3); }
.tool-info-body li  { margin-bottom: var(--space-1); }

.tool-sidebar {}
.related-tools {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}
.related-tools-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.related-tool-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.related-tool-link:hover { background: var(--bg-muted); color: var(--text); }
.related-tool-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tool-info { grid-template-columns: 1fr; }
  .tool-workspace-body { padding: var(--space-5); }
}
@media (max-width: 768px) {
  .tool-header { flex-direction: column; }
  .tool-header-icon { width: 52px; height: 52px; font-size: 24px; }
  .tool-workspace-body { padding: var(--space-4); }
  .option-row { flex-direction: column; align-items: flex-start; }
}
