/* ========================================
   MaxMultiTool – Tool Page Styles
   ======================================== */

/* ── Tool Hero ── */
.tool-hero {
  position: relative;
  padding: calc(var(--nav-height) + 60px) 0 70px;
  background: linear-gradient(135deg, #0d1a35 0%, #0a0f1e 100%);
  overflow: hidden;
}

.tool-hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.25) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 40%, transparent 100%);
}

.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}
.tool-breadcrumb a { color: var(--accent-blue); }
.tool-breadcrumb a:hover { text-decoration: underline; }
.tool-breadcrumb i { font-size: 0.65rem; }

.tool-hero-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.tool-hero-icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 24px;
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.25);
}
.tool-hero-icon.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }

.tool-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.tool-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 24px;
  line-height: 1.75;
}

.tool-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-card);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.tool-badge i { color: var(--accent-teal); font-size: 0.75rem; }

/* ── Upload Zone ── */
.upload-section {
  padding: 60px 0 80px;
  background: var(--bg-secondary);
}

.upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  overflow: hidden;
  background: var(--bg-card);
}
.upload-zone:hover { border-color: var(--border-hover); }
.upload-zone.drag-over {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.04);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.upload-zone-bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0;
  transition: opacity var(--transition);
}
.upload-zone:hover .upload-zone-bg-dots,
.upload-zone.drag-over .upload-zone-bg-dots { opacity: 1; }

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.upload-icon {
  width: 80px; height: 80px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-blue);
  margin-bottom: 20px;
  animation: bounce 3s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.upload-content h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.upload-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.upload-btn {
  cursor: pointer;
  margin-bottom: 16px;
}

.upload-alts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.upload-alt-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.upload-alt-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.upload-note {
  font-size: 0.78rem;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
}

/* Upload ready state */
.upload-ready {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px 32px;
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 2;
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.file-icon {
  font-size: 2rem;
  color: #ef4444;
  flex-shrink: 0;
}
.file-details {
  flex: 1;
  text-align: left;
}
.file-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 3px;
  word-break: break-all;
}
.file-size {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.file-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  flex-shrink: 0;
}
.file-remove:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

.tool-options {
  width: 100%;
  text-align: left;
}
.tool-options h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.option-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.option-toggle:hover { background: rgba(255,255,255,0.04); }
.option-toggle input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 14px; height: 14px;
}

.process-btn { min-width: 220px; }

/* Processing overlay */
.processing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-xl);
}

.processing-box {
  text-align: center;
  padding: 40px;
}

.processing-spinner {
  width: 56px; height: 56px;
  border: 3px solid rgba(59, 130, 246, 0.15);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.processing-box h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.processing-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.processing-bar {
  width: 280px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}
.processing-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s ease;
}

/* ── Tool Features ── */
.tool-features-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.tool-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
/* Remove the spacer hack */
.tool-features-grid > .tf-icon:not(.tool-feature-item .tf-icon) { display: none; }

.tool-feature-item {
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.tool-feature-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.tf-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 14px;
}
.tool-feature-item h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.tool-feature-item p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Tool Guide ── */
.tool-guide-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.tool-guide-inner {
  max-width: 680px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.guide-step-num {
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.guide-step-content h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.guide-step-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Related Tools ── */
.related-tools-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .tool-features-grid { grid-template-columns: repeat(2, 1fr); }
  .related-tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .tool-features-grid { grid-template-columns: 1fr; }
  .related-tools-grid { grid-template-columns: 1fr; }
  .options-grid { grid-template-columns: 1fr; }
  .upload-ready { padding: 24px 16px; }
  .processing-bar { width: 220px; }
}
