/* ==========================================================================
   PDF to Image Converter — Premium Upscaled & Fully Responsive Stylesheet
   Theme: Royal Blue (#1a3566), Amber Gold (#d97706), Slate, Glassmorphism
   Supported Breakpoints: 320px, 375px, 430px, 768px, 1024px, 1280px+
   ========================================================================== */

/* --- Tool Header & Badges --- */
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(26, 53, 102, 0.12);
  box-shadow: 0 4px 16px rgba(26, 53, 102, 0.05);
  font-size: 13px;
  font-weight: 600;
  color: var(--royal-dark, #122549);
  margin-bottom: 18px;
  max-width: 100%;
  text-align: center;
}

.tool-badge i {
  font-size: 15px;
  color: #059669;
  flex-shrink: 0;
}

/* --- Dropzone Base & Responsive Ergonomics --- */
.dropzone {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px dashed rgba(26, 53, 102, 0.22);
  border-radius: 24px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-sizing: border-box;
}

.dropzone:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--royal, #1a3566);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(26, 53, 102, 0.08);
}

.dropzone.dragover,
.dropzone.drag-active {
  background: rgba(238, 246, 255, 0.95);
  border-color: #2563eb;
  border-style: solid;
  transform: scale(1.01);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.15), 0 20px 40px rgba(37, 99, 235, 0.12);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.dz-content {
  position: relative;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dz-icon-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, #1a3566 0%, #2563eb 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 12px 24px rgba(26, 53, 102, 0.22);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.dropzone:hover .dz-icon-wrapper {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.35);
}

.dz-icon-wrapper svg {
  width: 38px;
  height: 38px;
}

.dropzone h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--royal-dark, #122549);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.dropzone p {
  font-size: 15px;
  color: var(--slate-600, #475569);
  margin-bottom: 18px;
  line-height: 1.5;
  max-width: 480px;
}

.dz-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  max-width: 100%;
}

.dz-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(26, 53, 102, 0.06);
  border: 1px solid rgba(26, 53, 102, 0.1);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--royal, #1a3566);
  white-space: nowrap;
}

.dz-chip i {
  font-size: 12px;
  flex-shrink: 0;
}

.dz-btn {
  pointer-events: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(26, 53, 102, 0.22);
}

/* --- Processing Panel & File Bar --- */
.process-panel {
  animation: slideFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.03);
  margin-bottom: 22px;
}

.file-icon-box {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.25);
  flex-shrink: 0;
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-details h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-800, #1e293b);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-details p {
  font-size: 13px;
  color: var(--slate-500, #64748b);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.btn-icon {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
  transform: rotate(90deg);
}

/* --- Settings Grid Layout --- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.6);
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.2s ease;
}

.settings-group:focus-within {
  background: #ffffff;
  border-color: #bfdbfe;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.05);
}

.settings-group label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--royal-dark, #122549);
  display: flex;
  align-items: center;
  gap: 7px;
}

.settings-group label i {
  font-size: 14px;
}

.form-select,
.form-input {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

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

/* --- Progress Container --- */
.progress-container {
  margin: 20px 0;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--royal-dark, #122549);
  margin-bottom: 10px;
}

.progress-bar {
  height: 9px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #d97706 100%);
  width: 0%;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  transition: width 0.25s ease;
}

/* --- Action Buttons --- */
.action-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.btn-convert-primary {
  background: linear-gradient(135deg, #1a3566 0%, #1e4080 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(26, 53, 102, 0.25);
  font-size: 15px;
  min-height: 48px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-convert-primary:hover {
  background: linear-gradient(135deg, #122549 0%, #1a3566 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(26, 53, 102, 0.35);
}

.btn-download-gold {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.3);
  font-size: 15px;
  min-height: 48px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-download-gold:hover {
  background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.4);
}

.credit-clarity-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  text-align: center;
  margin-top: 4px;
  line-height: 1.4;
}

.credit-clarity-pill i {
  font-size: 14px;
  color: #10b981;
  flex-shrink: 0;
}

/* --- Password Modal --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  animation: slideFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 28px 24px;
  box-sizing: border-box;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(217, 119, 6, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-header-icon i {
  font-size: 20px;
  color: #d97706;
}

.modal-header h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--royal-dark, #122549);
  margin: 0;
}

.modal-body {
  margin-bottom: 24px;
}

.modal-body p {
  font-size: 14px;
  color: var(--slate-600, #475569);
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-footer .btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
}

/* --- Section Headlines & Content Blocks --- */
.section-headline {
  font-size: 26px;
  font-weight: 900;
  color: var(--royal-dark, #122549);
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 15px;
  color: var(--slate-600, #475569);
  text-align: center;
  max-width: 680px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* --- Steps & Guidelines --- */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3566, #2563eb);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(26, 53, 102, 0.2);
}

.step-text h5 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--slate-800, #1e293b);
  margin-bottom: 3px;
}

.step-text p {
  font-size: 13.5px;
  color: var(--slate-600, #475569);
  line-height: 1.5;
  margin: 0;
}

.guidelines-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guideline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.guideline-icon {
  font-size: 18px;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 1px;
}

.guideline-text {
  font-size: 13.5px;
  color: var(--slate-700, #334155);
  line-height: 1.5;
}

.guideline-text strong {
  color: var(--slate-900, #0f172a);
}

/* --- SEO Article Highlight Box --- */
.article-highlight-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 20px;
  margin: 20px 0;
}

.article-highlight-box h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--royal-dark, #122549);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-highlight-box p {
  font-size: 13.5px;
  color: var(--slate-700, #334155);
  line-height: 1.55;
  margin: 0;
}

/* ==========================================================================
   Comprehensive Responsive Breakpoints (Mobile, Tablet, Desktop)
   ========================================================================== */

/* --- Tablet (max-width: 768px) --- */
@media (max-width: 768px) {
  .section-headline {
    font-size: 22px;
  }

  .section-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* --- Mobile Devices (max-width: 480px) --- */
@media (max-width: 480px) {
  .tool-badge {
    font-size: 11px;
    padding: 5px 12px;
    gap: 6px;
    margin-bottom: 12px;
  }

  .dropzone {
    padding: 24px 14px 20px;
    border-radius: 16px;
  }

  .dz-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    margin-bottom: 12px;
  }

  .dz-icon-wrapper svg {
    width: 28px;
    height: 28px;
  }

  .dropzone h3 {
    font-size: 17px;
    margin-bottom: 4px;
  }

  .dropzone p {
    font-size: 12.5px;
    margin-bottom: 12px;
  }

  .dz-chips {
    gap: 6px;
    margin-bottom: 14px;
  }

  .dz-chip {
    font-size: 10.5px;
    padding: 3px 8px;
    gap: 4px;
  }

  .dz-btn {
    width: 100%;
    max-width: 260px;
    font-size: 14px;
    padding: 11px 18px;
    border-radius: 12px;
  }

  .file-info {
    padding: 12px 14px;
    gap: 10px;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .file-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .file-details h4 {
    font-size: 13.5px;
  }

  .file-details p {
    font-size: 11.5px;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-group {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .settings-group label {
    font-size: 12.5px;
  }

  .form-select {
    padding: 11px 13px;
    font-size: 13.5px;
    border-radius: 10px;
  }

  .progress-container {
    padding: 14px 16px;
    margin: 16px 0;
    border-radius: 14px;
  }

  .progress-text {
    font-size: 13px;
  }

  .btn-convert-primary,
  .btn-download-gold {
    font-size: 14px;
    padding: 12px 18px;
    border-radius: 12px;
    min-height: 44px;
  }

  .credit-clarity-pill {
    font-size: 11px;
  }

  .modal-content {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .modal-header h3 {
    font-size: 17px;
  }
}

/* --- Accessibility & Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .dropzone,
  .btn-convert-primary,
  .btn-download-gold,
  .progress-fill {
    transition: none !important;
    animation: none !important;
  }
}
