/* PDF Pastor - Premium Styling Sheet */

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette - Vibrant Dark Theme */
  --bg-deep: #080c14;
  --bg-card: rgba(13, 20, 35, 0.55);
  --bg-card-hover: rgba(20, 30, 52, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-focused: rgba(99, 102, 241, 0.4);
  
  --primary-start: #6366f1; /* Indigo */
  --primary-end: #8b5cf6;   /* Violet */
  --accent: #ec4899;        /* Rose pink */
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
  --shadow-glow-large: 0 0 50px rgba(99, 102, 241, 0.25);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Background Glowing Blobs */
.glass-bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  mix-blend-mode: screen;
  animation: float-around 25s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-start);
  top: -10%;
  right: 10%;
  animation-duration: 20s;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: var(--primary-end);
  bottom: -5%;
  left: 5%;
  animation-duration: 25s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: var(--accent);
  top: 40%;
  left: 30%;
  animation-duration: 18s;
}

@keyframes float-around {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -50px) scale(1.1);
  }
  100% {
    transform: translate(-30px, 40px) scale(0.9);
  }
}

/* Container */
.app-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
}

/* Header styling */
.app-header {
  margin-bottom: 40px;
  text-align: center;
}

.logo-area {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: var(--shadow-glow);
  transform: rotate(-5deg);
  transition: var(--transition-normal);
}

.logo-icon:hover {
  transform: rotate(0deg) scale(1.08);
  box-shadow: var(--shadow-glow-large);
}

.logo-text h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.tagline {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
  font-weight: 400;
}

/* Glass Card */
.card {
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 40px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-glass-focused), transparent);
  opacity: 0;
  transition: var(--transition-normal);
}

.card:hover::before {
  opacity: 1;
}

.card.hidden {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.card.active {
  display: block;
  animation: fade-in-up 0.5s var(--transition-normal) forwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Drag & Drop Zone */
.drop-zone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: 18px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background: rgba(99, 102, 241, 0.02);
  position: relative;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary-start);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.05);
}

.drop-zone.dragover {
  transform: scale(0.99);
}

.file-input-hidden {
  display: none;
}

.upload-icon-container {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: var(--transition-normal);
  color: var(--text-secondary);
}

.drop-zone:hover .upload-icon-container {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--text-primary);
  transform: translateY(-4px);
}

.upload-icon {
  font-size: 26px;
  background: linear-gradient(135deg, #a5b4fc, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.drop-zone h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.drop-zone p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* Buttons */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6c6ef4, #9365f7);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-large {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: 16px;
}

.btn-browse {
  pointer-events: none; /* Let parent click handle trigger */
}

/* File List & Selection */
.selected-files-container {
  margin-top: 35px;
  animation: fade-in 0.4s ease-out forwards;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.section-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i {
  color: var(--primary-start);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Scrollbar styles for list */
.file-list::-webkit-scrollbar {
  width: 6px;
}
.file-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
  border-radius: 10px;
}
.file-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.file-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition-fast);
  animation: slide-in-item 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes slide-in-item {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  flex-grow: 1;
}

.file-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* File extension styles */
.file-icon.pdf {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}
.file-icon.doc, .file-icon.docx, .file-icon.odt {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}
.file-icon.xls, .file-icon.xlsx, .file-icon.ods {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.file-icon.ppt, .file-icon.pptx, .file-icon.odp {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}
.file-icon.image {
  background: rgba(236, 72, 153, 0.1);
  color: var(--accent);
}
.file-icon.text {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-primary);
}

.file-meta {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-name {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.file-size {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-remove-file {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-remove-file:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  transform: rotate(90deg);
}

/* Options Section */
.conversion-options-container {
  margin-top: 35px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 30px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  user-select: none;
}

.option-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.option-checkbox {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-start);
  cursor: pointer;
}

.option-card:has(.option-checkbox:checked) {
  background: rgba(99, 102, 241, 0.06);
  border-color: var(--border-glass-focused);
}

.option-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.option-checkbox:checked + .option-icon {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-start);
}

.option-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 20px;
}

.option-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.option-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.action-bar {
  display: flex;
  justify-content: center;
}

.btn-convert {
  width: 100%;
  max-width: 320px;
}

/* Animations pulse for core CTA button */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(99, 102, 241, 0.6);
  }
  100% {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  }
}
.animate-pulse {
  animation: pulse-glow 2s infinite ease-in-out;
}

/* Processing State */
.processing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  text-align: center;
}

.spinner-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(99, 102, 241, 0.1);
  border-top-color: var(--primary-start);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.spinner-ring-inner {
  position: absolute;
  width: 80%;
  height: 80%;
  border: 4px solid rgba(236, 72, 153, 0.05);
  border-bottom-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.5s infinite linear reverse;
}

.processing-logo {
  font-size: 32px;
  color: var(--text-primary);
  animation: pulse-soft 2s infinite ease-in-out;
  z-index: 1;
}

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

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.processing-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.processing-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 30px;
}

.progress-bar-container {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.progress-percentage {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-start);
}

/* Result Screen */
.result-header {
  text-align: center;
  margin-bottom: 35px;
}

.success-icon-container {
  width: 72px;
  height: 72px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.2);
}

.success-icon {
  font-size: 36px;
  color: var(--success);
}

.animate-bounce-subtle {
  animation: bounce-subtle 2s infinite ease-in-out;
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.result-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.result-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.result-action-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 35px;
}

.result-file-info {
  display: flex;
  align-items: center;
  gap: 18px;
}

.file-icon-large {
  width: 56px;
  height: 56px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary-start);
  flex-shrink: 0;
}

.result-file-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.result-file-details h3 {
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-file-details p {
  font-size: 13px;
  color: var(--text-secondary);
}

.badge-container {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.result-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-download {
  flex-grow: 1;
}



/* Errors Info Panel */
.errors-warning-container {
  margin-top: 25px;
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
  text-align: left;
}

.errors-warning-container h3 {
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.errors-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.errors-list li {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Footer */
.app-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.app-footer p {
  color: var(--text-muted);
  font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .app-container {
    padding: 20px 10px;
  }
  .card {
    padding: 24px;
  }
  .logo-text h1 {
    font-size: 28px;
  }
  .result-buttons {
    flex-direction: column;
  }
  .preview-viewport {
    max-width: 250px;
  }
}

/* Individual downloads list in results page */
.individual-downloads-container {
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 25px;
  text-align: left;
}

.individual-files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 6px;
}

.individual-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition-fast);
}

.individual-file-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.individual-file-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.btn-download-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* Privacy Banner styling */
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fade-in-up 0.5s ease-out;
}

.privacy-icon {
  font-size: 20px;
  color: var(--success);
  flex-shrink: 0;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.privacy-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

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

/* Pulse animation helper for banner icon */
@keyframes pulse-slow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.animate-pulse-slow {
  animation: pulse-slow 3s infinite ease-in-out;
}


