/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #6a11cb, #1a1a2e);
  color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center vertically */
  align-items: center;
  padding: 20px;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
}

.headline {
  font-family: 'Pacifico', cursive;
  font-size: 2.4rem;
  font-weight: bold;
  line-height: 1.4;
  background: linear-gradient(90deg, #ff7eb3, #ff758c, #ffb199);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 1s ease-out;
}

/* Container */
.container {
  max-width: 600px;
  width: 100%;
  background: rgba(43, 43, 61, 0.9);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  animation: fadeIn 1.2s ease-out;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 25px;
}

header h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: #ffffff;
}

header p {
  font-size: 0.95rem;
  color: #b0b0c3;
}

/* Drop Area */
.drop-area {
  border: 2px dashed #777;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  background: #1f1f2e;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.drop-area p {
  margin-bottom: 15px;
  color: #ccc;
}

.drop-area.dragover {
  border-color: #ff7eb3;
  background: #25253a;
}

/* Buttons */
button,
.btn-primary,
.btn-success {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary {
  background: linear-gradient(90deg, #ff7eb3, #ff758c);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #ff758c, #ff7eb3);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(90deg, #4caf50, #3e9e44);
  color: #fff;
  text-decoration: none;
}

.btn-success:hover {
  background: linear-gradient(90deg, #3e9e44, #4caf50);
  transform: translateY(-1px);
}

/* Progress Bar */
.progress-container {
  margin-top: 20px;
  background: #1f1f2e;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}

.progress-bar {
  height: 8px;
  background: linear-gradient(90deg, #ff7eb3, #ff758c);
  width: 0%;
  border-radius: 4px;
  transition: width 0.4s ease;
  margin-bottom: 8px;
}

/* Preview Section */
.preview-container {
  margin-top: 25px;
  text-align: center;
}

.preview-container h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #fff;
}

/* Status Message */
.status-message {
  margin-top: 15px;
  text-align: center;
  font-size: 0.9rem;
}

.status-message.success {
  color: #4caf50;
}

.status-message.error {
  color: #f44336;
}

/* Bottom Copy */
.bottom-copy {
  margin-top: 25px;
  max-width: 800px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #e0e0e0;
  line-height: 1.5;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ---------------- PREVIEW PAGE STYLES ---------------- */
/* The global body centers content vertically; the preview page needs to flow
   from the top so its tall side-by-side panels are fully visible. */
body.preview-page {
  justify-content: flex-start;
}

.preview-page .page-wrapper {
  width: 100%;
  max-width: 1400px;
}

.pdf-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  align-items: stretch;
  max-width: 1400px;
  margin: 0 auto 50px auto;
}

.pdf-column {
  flex: 1 1 45%;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  background: rgba(43, 43, 61, 0.9);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.pdf-column h2 {
  margin-bottom: 6px;
  font-size: 1.4rem;
  color: #ff7eb3;
}

.column-sub {
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: #b0b0c3;
}

/* Scrollable wrapper so a tall page render stays readable without squashing. */
.canvas-scroll {
  flex: 1;
  max-height: 55vh;
  overflow: auto;
  border-radius: 6px;
  background: #fff;
}

.pdf-column canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #fff;
}

/* PDF-to-text screener panel showing what an AI/ATS parser reads. */
.screener-text {
  flex: 1;
  max-height: 55vh;
  overflow: auto;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #e6e6f0;
  background: #15151f;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 18px;
}

/* The injected prompt, surfaced in the extracted text. */
.injected-highlight {
  background: rgba(255, 126, 179, 0.22);
  color: #ffd1e3;
  border-bottom: 1px solid #ff7eb3;
  border-radius: 2px;
  padding: 1px 2px;
}

/* Pinned callout that brings the injected prompt to the top of the panel so it
   is visible without scrolling. */
.injected-callout {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(255, 126, 179, 0.1);
  border: 1px solid rgba(255, 126, 179, 0.5);
  border-radius: 8px;
}

.injected-callout .injected-highlight {
  display: block;
}

/* Separator label above the full extracted text, below the callout. */
.screener-heading {
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8aa3;
  border-top: 1px solid #333;
  padding-top: 14px;
}

.pay-download {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 60px;
}

.pay-download .btn-success {
  font-size: 1.2rem;
  padding: 14px 30px;
}

/* ---------------- ANIMATIONS ---------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
