:root {
  --radius: 16px;
  --accent: #4da3ff;
}

/* ===== THEME ===== */

html[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-card: #15181c;
  --text: #e6e6e6;
  --muted: #9aa0a6;
}

html[data-theme="light"] {
  --bg: #f5f6fa;
  --bg-card: #ffffff;
  --text: #111;
  --muted: #555;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Poppins, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: 78px;
}

/* ===== PARTICLES BACKGROUND ===== */

#particles-js {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
}

html[data-theme="dark"] #particles-js::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 16, 0.85);
}

html[data-theme="light"] #particles-js::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(245, 246, 250, 0.6);
}

/* ===== CARD ===== */

.card {
  background: var(--bg-card);
  max-width: 520px;
  width: 100%;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: fadeUp 0.6s ease;
  margin: 0 auto;
}

h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ===== FILE UPLOAD ===== */

.file-box {
  border: 2px dashed #2a2f36;
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  transition: 0.25s;
  cursor: pointer;
}

.file-box:hover {
  border-color: var(--accent);
  background: rgba(77, 163, 255, 0.05);
}

.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.pdf-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  pointer-events: none;
}

input[type="file"] {
  display: none;
}

/* ===== INPUT CONTROLS ===== */

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

input,
select {
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #dddee0;
  color: #000;
  outline: none;
}

input:focus,
select:focus {
  box-shadow: 0 0 0 2px #4da3ff;
}

/* ===== EXTRACTION TYPE ===== */

.extraction-type {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.extraction-type label {
  font-size: 15px;
  color: var(--muted);
}

.extraction-type select {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: #dddee0;
  color: #000;
  font-size: 14px;
  min-width: 180px;
}

/* ===== METHOD BUTTON GRID ===== */

.mode-buttons {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  row-gap: 14px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
}

.button-row + .button-row {
  margin-top: 14px;
}

.method-btn {
  width: 100%;
  height: 44px;
  margin: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.method-btn.active {
  background: #4da3ff;
  color: #fff;
  border: none;
  box-shadow: 0 8px 18px rgba(77, 163, 255, 0.35);
}

.method-btn:hover {
  transform: translateY(-2px);
}

/* ===== BUTTON ===== */

.btn {
  margin-top: 22px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4da3ff, #7b61ff);
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
  width: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(77, 163, 255, 0.35);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(40%);
}

/* ===== STATUS ===== */

.status {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
  text-align: center;
}

/* ===== DOWNLOAD ===== */

.download {
  display: none;
  margin-top: 15px;
  text-align: center;
}

/* ===== SELECTED METHOD ===== */

.selected-method {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.selected-method span {
  color: #4da3ff;
  font-weight: 600;
}

/* ===== FOOTER ===== */

.footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ===== ANIMATION ===== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
