/* ============================================
   Fluxora — iPhone Dark Mode Styles
   ============================================ */

/* ----- Three.js Background Canvas ----- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ----- Body: pure black ----- */
body {
  background-color: #000000 !important;
  color: #ffffff;
}

/* ----- Page containers: very transparent, ~80% Three.js visible ----- */
#dashboard-page,
#tool-pages > div[id$="-page"] {
  background-color: rgba(28, 28, 30, 0.42) !important;
}

#dashboard-page,
#tool-pages {
  position: relative;
  z-index: 1;
}

/* ----- Navigation & bottom bars: keep usable opacity ----- */
nav.fixed,
footer.fixed,
.fixed.bottom-0 {
  background-color: rgba(28, 28, 30, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.glass-card {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  /* Fallback: solid dark bg for browsers without backdrop-filter */
  background-color: rgba(28, 28, 30, 0.92);
}
@supports (backdrop-filter: blur(24px)) or (-webkit-backdrop-filter: blur(24px)) {
  .glass-card {
    background-color: rgba(28, 28, 30, 0.65);
  }
}

/* ----- Hero section: fully transparent, shows Three.js bg ----- */
section.bg-gradient-to-br.from-blue-50.to-indigo-50 {
  background: transparent !important;
}

/* Keep hero text visible (already uses text-black which we override) */

/* ----- Feature grid cards: dark glass, very transparent ----- */
.bg-gradient-to-br.from-blue-100.to-blue-50,
.bg-gradient-to-br.from-red-100.to-red-50,
.bg-gradient-to-br.from-orange-100.to-orange-50,
.bg-gradient-to-br.from-purple-100.to-purple-50,
.bg-gradient-to-br.from-green-100.to-green-50,
.bg-gradient-to-br.from-teal-100.to-teal-50 {
  background: rgba(44, 44, 46, 0.32) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Tool card icon containers keep their colors */
section .w-16.h-16.rounded-2xl {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ----- Pricing section ----- */
section.bg-gray-50 {
  background-color: rgba(28, 28, 30, 0.3) !important;
}

/* Pricing cards */
.bg-white {
  background-color: rgba(44, 44, 46, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* All-access plan card - keep gradient */
.bg-gradient-to-br.from-blue-500.to-purple-600 {
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

/* ----- Text overrides: dark bg → light text + shadow for readability ----- */
.text-black,
h1.text-black, h2.text-black, h3.text-black,
.text-xl.font-semibold.text-black,
.text-lg.font-semibold.text-black,
.text-3xl.font-bold.text-black,
.text-4xl.font-bold.text-black {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.text-gray-600,
p.text-gray-600 {
  color: rgba(235, 235, 245, 0.65) !important;
}

.text-gray-500 {
  color: rgba(235, 235, 245, 0.55) !important;
}

.text-gray-400 {
  color: rgba(235, 235, 245, 0.4) !important;
}

/* Hero badge */
.hero-badge {
  background: rgba(10, 132, 255, 0.2) !important;
  color: #0A84FF !important;
}

/* Nav license badge */
.license-badge {
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.license-badge.premium {
  background: rgba(10, 132, 255, 0.25) !important;
  color: #0A84FF !important;
}

/* Feature list text in cards */
.space-y-2 .text-sm.text-gray-500 {
  color: rgba(235, 235, 245, 0.55) !important;
}

/* ----- Format Checkbox List ----- */
.format-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: rgba(44, 44, 46, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  color: rgba(235, 235, 245, 0.65);
  min-width: 100px;
}

.format-check-item:hover:not(.disabled) {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(60, 60, 64, 0.6);
  color: #fff;
}

.format-check-item.checked {
  border-color: var(--seg-accent);
  background: color-mix(in srgb, var(--seg-accent) 15%, transparent);
  color: #fff;
}

.format-check-item.disabled {
  opacity: 0.22;
  pointer-events: none;
}

/* Checkbox square */
.format-check-box {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.format-check-item.checked .format-check-box {
  background: var(--seg-accent);
  border-color: var(--seg-accent);
}

.format-check-box i {
  color: #fff;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.15s;
}

.format-check-item.checked .format-check-box i {
  opacity: 1;
}

/* Label */
.format-check-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Detected format tag */
.detected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.18);
  color: #0A84FF;
  letter-spacing: 0.02em;
}

/* ----- Language Switcher ----- */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(44, 44, 46, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(235, 235, 245, 0.75);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(60, 60, 64, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lang-btn .fa-globe {
  font-size: 0.85rem;
  color: #0A84FF;
}

.lang-arrow {
  font-size: 0.6rem;
  opacity: 0.5;
  transition: transform 0.2s;
}

.lang-btn.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: rgba(44, 44, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.lang-dropdown.open {
  display: block;
  animation: langFadeIn 0.2s ease;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(235, 235, 245, 0.75);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.lang-option.active {
  background: rgba(10, 132, 255, 0.18);
  color: #0A84FF;
}

@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Cookie Consent Banner (iPhone-style, JS-driven) ----- */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 680px;
  background: rgba(30, 30, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 0;
  z-index: 9999;
  display: none;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
}

.cookie-banner-text {
  flex: 1;
  min-width: 0;
}

.cookie-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.cookie-banner-desc {
  font-size: 0.8rem;
  color: rgba(235, 235, 245, 0.6);
  line-height: 1.55;
  margin: 0;
}

.cookie-banner-desc a {
  color: #0A84FF;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1px solid transparent;
}

.cookie-btn--reject {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(235, 235, 245, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
}

.cookie-btn--reject:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.cookie-btn--accept {
  background: #0A84FF;
  color: #fff;
}

.cookie-btn--accept:hover {
  background: #0070E0;
}

.cookie-banner-gpc {
  font-size: 0.7rem;
  color: rgba(10, 132, 255, 0.7);
  text-align: center;
  padding: 0 24px 16px;
  margin: 0;
}

@media (max-width: 640px) {
  .cookie-banner-content {
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}

/* ----- Upload Area ----- */
.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background-color: rgba(44, 44, 46, 0.5) !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-area:hover {
  border-color: #0A84FF;
  background-color: rgba(10, 132, 255, 0.06) !important;
}

.upload-area.drag-over {
  border-color: #0A84FF;
  background-color: rgba(10, 132, 255, 0.1) !important;
  border-style: solid;
}

/* Upload area icon color */
.upload-area .fa-cloud-upload-alt {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Upload area text */
.upload-area h3 {
  color: #ffffff !important;
}

/* ----- Result section ----- */
.bg-gray-50.rounded-2xl.p-6 {
  background-color: rgba(44, 44, 46, 0.6) !important;
}

.bg-white.rounded-lg.p-4 {
  background-color: rgba(60, 60, 64, 0.5) !important;
}

/* ----- Progress Ring ----- */
.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.35s ease;
  transform-origin: 50% 50%;
}

.progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

/* ----- Buttons ----- */
.btn-primary,
button.bg-primary,
.bg-primary {
  background-color: #0A84FF !important;
}

.bg-gray-200,
button.bg-gray-200 {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

/* ----- Rounded Button Override ----- */
.\!rounded-button,
.rounded-button {
  border-radius: 10px !important;
}

/* ----- License Modal ----- */
#license-modal .bg-white {
  background-color: rgba(44, 44, 46, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
}

#license-modal input {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

#license-modal input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ----- Toast ----- */
#toast {
  background: rgba(44, 44, 46, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

/* ----- Page Transitions ----- */
#tool-pages > div {
  animation: fadeSlideIn 0.25s ease;
}

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

/* ----- Toast Animations ----- */
#toast.show {
  display: block;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, 8px); }
}

/* ----- Scrollbar (dark) ----- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* ----- File Queue (batch upload list) ----- */
.file-queue {
  max-width: 720px;
  margin: 0 auto 0;
  display: none;
}

.file-queue.has-files {
  display: block;
}

.file-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 10px 0;
}

.file-queue-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(235, 235, 245, 0.5);
}

.file-queue-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: #0A84FF;
}

.file-queue-clear {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.4);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.file-queue-clear:hover {
  color: #FF453A;
  background: rgba(255, 69, 58, 0.1);
}

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

.file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(44, 44, 46, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.18s ease;
}

.file-card:hover {
  background: rgba(60, 60, 64, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
}

.file-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.file-card-icon.image { background: rgba(10, 132, 255, 0.18); color: #0A84FF; }
.file-card-icon.audio { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.file-card-icon.video { background: rgba(139, 92, 246, 0.18); color: #8b5cf6; }
.file-card-icon.pdf   { background: rgba(239, 68, 68, 0.18); color: #ef4444; }
.file-card-icon.other { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); }

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

.file-card-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.file-card-meta {
  font-size: 0.6875rem;
  color: rgba(235, 235, 245, 0.4);
  margin-top: 1px;
}

.file-card-remove {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.65rem;
  transition: all 0.15s;
  font-family: inherit;
}

.file-card-remove:hover {
  background: rgba(255, 69, 58, 0.2);
  color: #FF453A;
}

/* Batch progress bar */
.batch-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.batch-progress-fill {
  height: 100%;
  background: #0A84FF;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.batch-progress-label {
  font-size: 0.6875rem;
  color: rgba(235, 235, 245, 0.45);
  text-align: center;
  margin-top: 4px;
}

/* ----- Result List (converted files display) ----- */
.result-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(60, 60, 64, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.18s ease;
}

.result-card:hover {
  background: rgba(60, 60, 64, 0.65);
  border-color: rgba(255, 255, 255, 0.14);
}

.result-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.result-card-icon.image { background: rgba(10, 132, 255, 0.2); color: #0A84FF; }
.result-card-icon.audio { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.result-card-icon.video { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.result-card-icon.pdf   { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.result-card-icon.other { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); }

.result-card-info {
  flex: 1;
  min-width: 0;
}

.result-card-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

.result-card-meta {
  font-size: 0.6875rem;
  color: rgba(235, 235, 245, 0.45);
  margin-top: 1px;
}

.result-card-meta .fmt-arrow {
  color: #0A84FF;
  margin: 0 3px;
}

.result-card-meta .is-new {
  display: inline-block;
  background: rgba(48, 209, 88, 0.18);
  color: #30D158;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-card-dl {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.15);
  border: none;
  color: #0A84FF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: all 0.15s;
}

.result-card-dl:hover {
  background: #0A84FF;
  color: #fff;
}

/* Batch download all button */
.result-dl-all {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.25);
  color: #0A84FF;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: none;
}

.result-dl-all.has-multi {
  display: block;
}

.result-dl-all:hover {
  background: #0A84FF;
  color: #fff;
}

/* ----- PDF Mode Toggle (segmented control) ----- */
.mode-toggle {
  display: inline-flex;
  background: rgba(44, 44, 46, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 16px;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: rgba(235, 235, 245, 0.5);
  font-family: inherit;
  font-size: 0.7875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mode-option i {
  font-size: 0.7rem;
}

.mode-option:hover {
  color: rgba(235, 235, 245, 0.75);
}

.mode-option.active {
  background: rgba(10, 132, 255, 0.2);
  color: #0A84FF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.mode-option.active i {
  color: #0A84FF;
}

/* File queue inside upload area — compact mode */
.upload-area .file-queue {
  margin-top: 16px;
}

/* ----- Welcome Surprise Popup ----- */
#welcome-popup {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
}

#welcome-popup.show {
  display: flex;
}

.welcome-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.welcome-card {
  position: relative;
  background: rgba(30, 30, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px 32px 32px;
  max-width: 400px;
  width: calc(100% - 48px);
  text-align: center;
  animation: welcomeIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0A84FF, #5E5CE6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 8px 32px rgba(10, 132, 255, 0.35);
}

.welcome-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.4;
}

.welcome-subtitle {
  font-size: 0.85rem;
  color: rgba(235, 235, 245, 0.55);
  margin-bottom: 28px;
  line-height: 1.55;
}

.welcome-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: #0A84FF;
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.welcome-btn:hover {
  background: #0070E0;
  transform: scale(1.02);
}

.welcome-btn:active {
  transform: scale(0.98);
}

@keyframes welcomeIn {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ----- Free user: hide all HD/premium-only buttons ----- */
body.free-user .hd-only-btn,
body.free-user .result-dl-all {
  display: none !important;
}

/* Show upgrade hint in place of hidden buttons */
body.free-user .upgrade-hint {
  display: block !important;
}
.upgrade-hint {
  display: none;
  text-align: center;
  padding: 12px;
  margin-top: 12px;
  background: rgba(10,132,255,0.08);
  border: 1px solid rgba(10,132,255,0.2);
  border-radius: 12px;
  color: #0A84FF;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.upgrade-hint:hover {
  background: rgba(10,132,255,0.15);
}

/* ----- Upgrade prompt (free users) ----- */
.upgrade-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(10,132,255,0.1), rgba(94,92,230,0.1));
  border: 1px solid rgba(10,132,255,0.2);
  border-radius: 14px;
}
.upgrade-prompt-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0A84FF, #5E5CE6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.9rem; flex-shrink: 0;
}
.upgrade-prompt-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.upgrade-prompt-text strong {
  font-size: 0.8rem; color: #fff;
}
.upgrade-prompt-text span {
  font-size: 0.7rem; color: rgba(235,235,245,0.5);
}
.upgrade-prompt-btn {
  padding: 8px 16px; border-radius: 10px;
  background: #0A84FF; color: #fff; border: none;
  font-family: inherit; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.upgrade-prompt-btn:hover { background: #0070E0; }

/* ----- Pricing flash highlight ----- */
@keyframes pricingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0); }
  25%  { box-shadow: 0 0 0 8px rgba(10, 132, 255, 0.25); }
  50%  { box-shadow: 0 0 0 16px rgba(10, 132, 255, 0.15); }
  75%  { box-shadow: 0 0 0 8px rgba(10, 132, 255, 0.25); }
}
.pricing-flash {
  animation: pricingPulse 0.8s ease-in-out 2;
  border-radius: 16px;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .file-card-name { max-width: 180px; }
  .result-card-name { max-width: 160px; }

  .mode-toggle { width: 100%; }
  .mode-option { flex: 1; justify-content: center; font-size: 0.75rem; }

  .format-check-list { gap: 6px; }
  .format-check-item { padding: 9px 12px; min-width: auto; font-size: 0.75rem; }
  .format-check-label { font-size: 0.7rem; }

  .upload-area { padding: 24px 16px !important; }

  .welcome-card { padding: 28px 20px 24px; }
  .welcome-title { font-size: 1.1rem; }

  .pricing-card { padding: 20px 16px; }
  .pricing-price { font-size: 2rem; }

  nav.fixed h1 { font-size: 1rem; }
  nav.fixed .text-sm { font-size: 0.7rem; }
}
