@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/poppins-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/poppins-500.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/poppins-600.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/poppins-700.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --surface: #0E0E11;
  --surface-card: #141418;
  --surface-hover: #1E1E24;
  --surface-active: #282832;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-focus: rgba(255, 255, 255, 0.35);
  --text: #ffffff;
  --text-muted: #888894;
  --text-dim: #71717a;
  --accent: #FFFFFF;
  --accent-hover: #E2E2E6;
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 1.25rem 5rem;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Top Micro Loading Bar ── */
#topProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), #FFFFFF, rgba(255, 255, 255, 0.2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  z-index: 9999;
}
#topProgressBar.active {
  opacity: 1;
  transform: scaleX(0.9);
}

/* ── Wider Container (Responsive Desktop Width) ── */
.container {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Clean Header ── */
.brand-kicker {
  margin-bottom: 0.65rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.brand-title {
  font-size: 2.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-align: center;
  line-height: 1;
}
.brand-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 400;
}
.brand-guidance {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  text-align: center;
}

/* ── Minimal Input Bar ── */
.input-wrapper {
  position: relative;
  width: 100%;
  height: 58px;
  background: #000000;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.input-wrapper:focus-within {
  border-color: var(--border-focus);
  background: var(--surface);
}
:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}
.input-wrapper:focus-within {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.service-badge {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 12px;
  flex-shrink: 0;
}
.service-badge.active {
  display: flex;
}
.service-badge svg {
  width: 100%;
  height: 100%;
}

.url-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 400;
}
.url-input::placeholder {
  color: var(--text-dim);
}

.btn-download {
  height: 42px;
  padding: 0 20px;
  background: #FFFFFF;
  border: 1px solid #FFFFFF;
  border-radius: 10px;
  color: #000000;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.btn-download:hover {
  background: #E2E2E6;
  border-color: #E2E2E6;
  color: #000000;
}
.btn-download:active {
  transform: scale(0.97);
}
.btn-download svg {
  width: 15px;
  height: 15px;
  stroke: #000000;
}
.btn-download:disabled,
.dl-main-btn:disabled,
.custom-select-trigger:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* ── Stage Progress Indicator ── */
.extract-bar {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  animation: fadeIn 0.2s ease;
}
.extract-bar.active {
  display: flex;
}
.extract-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mini-spin {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Alert Banner ── */
.alert-banner {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 0.84rem;
  color: #e4e4e7;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  animation: fadeIn 0.2s ease;
}
.alert-msg-text {
  flex: 1;
  min-width: min(100%, 240px);
  text-align: left;
}
.alert-report-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.alert-report-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* ── Supported Platforms Row ── */
.platforms-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}
.platform-icon {
  width: 20px;
  height: 20px;
  fill: #71717a;
  color: #71717a;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform-icon svg {
  width: 100%;
  height: 100%;
}
.platform-icon:hover {
  fill: #ffffff;
  color: #ffffff;
  transform: translateY(-1px);
}
.platform-icon.tt { fill: none; }
.platform-icon.tt:hover { filter: brightness(1.2); }

.more-link {
  font-size: 0.78rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s ease;
  background: transparent;
  border: 0;
  padding: 0.25rem;
  font-family: inherit;
}
.more-link:hover {
  color: #ffffff;
}

/* ── Compact media preview ── */
.media-hero-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #000;
}
.media-hero-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.media-duration {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
}
.media-info-row {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.media-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.media-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  min-width: 0;
}
.media-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.media-platform-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

/* ── Format Selector Row ── */
.format-selector-row {
  grid-column: 2;
  min-width: 0;
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
  position: relative;
}
.custom-select-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  user-select: none;
}
.custom-select-trigger {
  width: 100%;
  height: 48px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.custom-select-trigger:hover,
.custom-select-wrap.open .custom-select-trigger {
  border-color: var(--border-focus);
  background: var(--surface-hover);
}
.custom-select-trigger:focus-visible,
.custom-select-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}
.custom-select-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  flex: 1;
}
.custom-select-arrow {
  flex-shrink: 0;
  color: #888894;
  display: flex;
  align-items: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}
.custom-select-wrap.open .custom-select-arrow {
  transform: rotate(180deg);
  color: #ffffff;
}
.custom-select-arrow svg {
  width: 15px;
  height: 15px;
}
.custom-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #101017;
  border: 1px solid #2a2a38;
  border-radius: 10px;
  padding: 5px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.custom-select-wrap.open .custom-select-menu {
  display: block;
}
.custom-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.86rem;
  color: #cccccc;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.custom-select-item:hover {
  background: var(--surface-hover);
  color: #ffffff;
}
.custom-select-item.selected {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
}
.custom-select-item .item-check {
  display: none;
  color: #ffffff;
  flex-shrink: 0;
}
.custom-select-item.selected .item-check {
  display: flex;
}
.dl-main-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  border-radius: 10px;
  padding: 0 1.4rem;
  height: 48px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}
.dl-main-btn svg {
  width: 17px;
  height: 17px;
  stroke: #000000;
}
.dl-main-btn:hover {
  background: #e2e2e6;
  border-color: #e2e2e6;
  transform: translateY(-1px);
}
.dl-main-btn:active {
  transform: translateY(0);
}
.dl-main-btn.downloading {
  background: #141418;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}
.dl-main-btn.downloaded {
  background: #1E1E24;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

/* ── Result Container ── */
.result-container {
  width: 100%;
  margin-top: 1.75rem;
  display: none;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  gap: 1rem;
  animation: fadeIn 0.25s ease;
}
.result-container.visible {
  display: grid;
}
@media (max-width: 740px) {
  .result-container {
    grid-template-columns: 120px minmax(0, 1fr);
  }
  .media-hero-wrap {
    grid-row: 1;
  }
  .format-selector-row {
    grid-column: 1 / -1;
  }
}


.playlist-card {
  width: 100%;
  margin-top: 1.75rem;
  display: none;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  gap: 1rem;
  animation: fadeIn 0.25s ease;
  text-align: left;
}
.playlist-card.visible {
  display: flex;
}
.playlist-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.pl-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}
.pl-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.pl-zip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  border-radius: 9px;
  padding: 0.6rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pl-zip-btn:hover {
  background: #e2e2e6;
  border-color: #e2e2e6;
}
.pl-zip-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.playlist-items {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 4px;
}
.playlist-items::-webkit-scrollbar {
  width: 4px;
}
.playlist-items::-webkit-scrollbar-thumb {
  background: #222230;
  border-radius: 4px;
}
.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.playlist-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}
.pl-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}
.pl-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-hover);
  border: 1px solid var(--border);
}
.pl-header-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.pl-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  width: 22px;
  flex-shrink: 0;
  text-align: right;
}
.pl-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.pl-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
  font-size: 0.82rem;
}
.pl-dur {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.pl-single-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.pl-single-btn:hover {
  background: var(--surface-active);
  border-color: var(--border-hover);
  color: #ffffff;
}
.pl-single-btn.downloading {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-dim);
  pointer-events: none;
}
.pl-single-btn.success {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.pl-single-btn.pl-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

    /* ── Services Modal ── */
.services-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.services-overlay.active {
  display: flex;
  opacity: 1;
}
.services-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem 1.6rem 1.4rem;
  max-width: 640px;
  width: 100%;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.services-overlay.active .services-box {
  transform: scale(1);
}
.services-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.services-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.services-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.services-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  background: #14141d;
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
  border-radius: 999px;
}
.services-close-btn {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.services-close-btn:hover {
  background: var(--surface-hover);
  color: #ffffff;
  border-color: var(--border-hover);
}
.services-search-wrap {
  margin-bottom: 1.1rem;
  position: relative;
}
.services-search-input {
  width: 100%;
  height: 44px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 1rem 0 2.5rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.services-search-input:focus {
  border-color: #333342;
  background: #0f0f15;
}
.services-search-input::placeholder {
  color: var(--text-dim);
}
.services-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.services-box-body {
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  flex: 1;
}
.services-box-body::-webkit-scrollbar {
  width: 5px;
}
.services-box-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.svc-category-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.svc-category-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}
.svc-pill {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  user-select: none;
  color: #ffffff;
  outline: none;
  text-align: left;
}
.svc-pill:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.svc-glyph-wrap {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.svc-glyph-wrap svg {
  width: 18px;
  height: 18px;
  display: block;
}
.svc-tag-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 22px;
  text-align: center;
  background: #181822;
  border: 1px solid #282836;
  color: var(--text-muted);
}
.svc-pill:hover .svc-tag-badge {
  border-color: #38384a;
  color: #ffffff;
}
.svc-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: #e5e5eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svc-footer-note {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

/* ── Minimal Trust Footer ── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.02em;
  pointer-events: auto;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85) 30%, #000000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  z-index: 50;
}
.footer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s ease;
}
.footer a:hover {
  text-decoration: underline;
  opacity: 0.85;
}
.footer-sep {
  color: #ffffff;
  opacity: 0.55;
}

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

/* ── Feedback & Suggestion Modal ── */
.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.feedback-overlay.active {
  display: flex;
  opacity: 1;
}
.feedback-box,
.privacy-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.6rem;
  max-width: 520px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.feedback-overlay.active .feedback-box,
.services-overlay.active .privacy-box {
  transform: scale(1);
}
.feedback-box::-webkit-scrollbar,
.privacy-box::-webkit-scrollbar {
  width: 4px;
}
.feedback-box::-webkit-scrollbar-thumb,
.privacy-box::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.feedback-notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1.1rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.notice-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #ffffff;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.feedback-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  padding: 0.25rem;
  border-radius: 10px;
  margin-bottom: 1.15rem;
}
.feedback-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}
.feedback-tab:hover {
  color: #ffffff;
}
.feedback-tab.active {
  background: #15151e;
  border-color: var(--border-hover);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.feedback-body {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.feedback-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.feedback-field label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.feedback-input,
.feedback-select,
.feedback-textarea {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.feedback-input:focus,
.feedback-select:focus,
.feedback-textarea:focus {
  border-color: var(--accent);
  background: #111119;
}
.feedback-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888894' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}
.feedback-select option {
  background: #0e0e14;
  color: #ffffff;
}
.feedback-textarea {
  resize: vertical;
  min-height: 74px;
  line-height: 1.45;
}
.feedback-submit-btn {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  border-radius: 9px;
  height: 44px;
  padding: 0 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s ease, transform 0.1s ease;
  margin-top: 0.2rem;
}
.feedback-submit-btn:hover {
  background: #e2e2e6;
  border-color: #e2e2e6;
  transform: translateY(-1px);
}
.feedback-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.feedback-zero-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: -0.25rem;
}
.feedback-zero-note svg {
  color: #71717a;
  flex-shrink: 0;
}
.feedback-status {
  font-size: 0.8rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  text-align: center;
}
.feedback-status.success {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.feedback-status.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ── Privacy Policy Modal ── */
.privacy-box {
  max-width: 580px;
}
.privacy-content {
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
}
.privacy-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.privacy-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.privacy-card-title svg {
  color: var(--accent);
  flex-shrink: 0;
}
.privacy-card-text {
  font-size: 0.79rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.privacy-badge-pill {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4d8;
  margin-left: auto;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  body {
    padding: 2.5rem 0.85rem 6.5rem;
  }
  .brand-title {
    font-size: 2.2rem;
  }
  .brand-desc {
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
  }
  .input-wrapper {
    height: 52px;
    padding: 0 6px 0 12px;
  }
  .url-input {
    font-size: 1rem;
  }
  .btn-download {
    height: 44px;
    padding: 0 12px;
    font-size: 0.8rem;
    gap: 4px;
  }
  .btn-download span {
    font-size: 0.8rem;
  }
  .result-container {
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 0.85rem;
    gap: 0.8rem;
  }
  .media-hero-wrap {
    aspect-ratio: 4 / 3;
  }
  .format-selector-row {
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
  }
  .custom-select-wrap {
    width: 100%;
  }
  .custom-select-trigger {
    width: 100%;
    height: 46px;
  }
  .dl-main-btn {
    width: 100%;
    justify-content: center;
    height: 46px;
  }
  .format-grid {
    grid-template-columns: 1fr;
  }
  .media-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .media-thumb-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .playlist-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .pl-zip-btn {
    width: 100%;
    justify-content: center;
  }
  .footer {
    padding: 0.85rem 0.75rem 1rem;
    font-size: 0.76rem;
    gap: 0.45rem;
  }
  .services-box {
    padding: 1.15rem 1rem;
    max-height: 88vh;
  }
  .svc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }
  .svc-pill {
    padding: 0.45rem 0.6rem;
  }
  .svc-pill-name {
    font-size: 0.76rem;
  }
}

@media (max-width: 400px) {
  body {
    padding: 2rem 0.65rem 6.5rem;
  }
  .brand-title {
    font-size: 1.9rem;
  }
  .btn-download svg {
    display: none;
  }
  .btn-download {
    padding: 0 12px;
  }
}

/* ── Compact cream support note ── */
.support-note {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: #a1a1aa;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}
.support-note button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.support-note button:hover {
  color: #e2e2e6;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.site-admin-notice{padding:14px 18px;margin:0 0 22px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.05);border-radius:12px;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;color:inherit}.site-admin-notice[hidden]{display:none}

/* Real server-side ZIP progress; no per-track animations. */
.zip-progress {
  width: 100%; margin-top: 1.75rem; padding: 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  text-align: left; font-size: 0.82rem; color: var(--text-muted);
}
.zip-progress-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.zip-progress-head > div { min-width: 0; flex: 1 1 200px; }
.zip-progress-title { margin-bottom: 0.35rem; overflow-wrap: anywhere; }
#zipProgressStatus { color: var(--text); font-weight: 600; }
.zip-stop-btn { padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: transparent; cursor: pointer; font: inherit; }
.zip-stop-btn:disabled { opacity: 0.55; cursor: default; }
#zipProgressSummary { display: block; line-height: 1.5; }
#zipProgressBar { display: block; width: 100%; height: 10px; margin: 0.75rem 0; accent-color: var(--accent); }
.zip-progress-metrics { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.zip-progress-note, .zip-progress-connection { margin-top: 0.8rem; line-height: 1.6; }
.zip-progress-connection:empty { display: none; }
.zip-progress details { margin-top: 1rem; }
.zip-progress summary { cursor: pointer; color: var(--text); }
#zipProgressTracks { max-height: 240px; overflow-y: auto; margin: 0.8rem 0 0; padding-left: 1.5rem; }
#zipProgressTracks li { padding: 0.4rem 0; overflow-wrap: anywhere; }
#zipProgressTracks li strong { display: block; font-size: 0.75rem; font-weight: 500; }
#zipProgressTracks [data-state="packaged"] strong, #zipProgressTracks [data-state="ready"] strong { color: #ffffff; }
#zipProgressTracks [data-state="unavailable"] strong { color: #a1a1aa; }

