/**
 * SMMpro Video Downloader - Frontend Stylesheet
 * Brand Identity & Elementor / Active Theme Integration
 */

:root {
  /* SMMpro identity */
  --smm-primary: #6552E6;
  --smm-primary-hover: #5743D1;
  --smm-primary-active: #4936BA;
  --smm-lavender: #E9E5FF;

  /* Light theme */
  --smm-page: #F7F5FF;
  --smm-surface: #FFFFFF;
  --smm-text: #17152B;
  --smm-text-muted: #6B6880;
  --smm-placeholder: #858198;
  --smm-border: #E5E1F2;
  --smm-focus: rgba(101, 82, 230, 0.12);

  /* Corner system */
  --radius-badge: 8px;
  --radius-control: 14px;
  --radius-input: 16px;
  --radius-card: 20px;
  --radius-container: 24px;

  /* Dimensions */
  --input-height: 60px;
  --button-height: 56px;
  --icon-box-size: 48px;
  --page-max-width: 1200px;

  /* Elevation */
  --shadow-card:
    0 8px 30px rgba(35, 24, 90, 0.06);

  --shadow-dropdown:
    0 12px 32px rgba(35, 24, 90, 0.10);

  /* Dynamic & Legacy Aliases */
  --smmvd-accent: var(--smm-primary);
  --smmvd-gradient: linear-gradient(135deg, #6552E6 0%, #4936BA 100%);
  --smmvd-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.smmvd-container .downloader-card {
  padding: 32px;
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
}

.smmvd-container .url-input {
  width: 100%;
  min-height: var(--input-height);
  padding: 0 18px;
  border: 1px solid var(--smm-border);
  border-radius: var(--radius-input);
  background: #FFFFFF;
  color: var(--smm-text);
  font: inherit;
  font-size: 16px;
  transition: border-color 180ms ease,
              box-shadow 180ms ease;
}

.smmvd-container .url-input::placeholder {
  color: var(--smm-placeholder);
}

.smmvd-container .url-input:focus-visible {
  outline: none;
  border-color: var(--smm-primary);
  box-shadow: 0 0 0 4px var(--smm-focus);
}

.smmvd-container .download-button {
  min-height: var(--button-height);
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-control);
  background: var(--smm-primary);
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease,
              transform 180ms ease;
}

.smmvd-container .download-button:hover {
  background: var(--smm-primary-hover);
}

.smmvd-container .download-button:active {
  background: var(--smm-primary-active);
}

@media (max-width: 640px) {
  .smmvd-container .downloader-card {
    padding: 20px;
    border-radius: 20px;
  }
}

/* ──────────────────────────────────────────────────────────
   ELEMENTOR & WEBSITE THEME AUTO-INHERITANCE
   ────────────────────────────────────────────────────────── */
.smmvd-theme-elementor,
.smmvd-inherit-theme,
.elementor-widget-container .smmvd-container {
  --smm-primary: var(--e-global-color-primary, var(--wp--preset--color--primary, #6552E6));
  --smm-primary-hover: var(--e-global-color-accent, var(--e-global-color-primary, #5743D1));
  --smm-primary-active: var(--e-global-color-primary, #4936BA);
  --smm-text: var(--e-global-color-text, var(--wp--preset--color--contrast, #17152B));
  --smmvd-font: var(--e-global-typography-primary-font-family, inherit);
  --radius-control: var(--elementor-button-border-radius, 14px);
  --smmvd-accent: var(--smm-primary);
  --smmvd-gradient: linear-gradient(135deg, var(--smm-primary) 0%, var(--smm-primary-hover) 100%);
}

.smmvd-theme-elementor .download-button,
.smmvd-inherit-theme .download-button,
.elementor-widget-container .download-button {
  font-family: var(--smmvd-font);
  border-radius: var(--radius-control);
  background: var(--smm-primary);
}

.smmvd-theme-elementor .download-button:hover,
.smmvd-inherit-theme .download-button:hover,
.elementor-widget-container .download-button:hover {
  background: var(--smm-primary-hover);
}

.smmvd-theme-elementor .smmvd-fmt-btn-download,
.smmvd-inherit-theme .smmvd-fmt-btn-download,
.elementor-widget-container .smmvd-fmt-btn-download {
  border-radius: var(--radius-control);
  background: var(--smm-primary);
}

.smmvd-theme-elementor .smmvd-fmt-btn-download:hover,
.smmvd-inherit-theme .smmvd-fmt-btn-download:hover,
.elementor-widget-container .smmvd-fmt-btn-download:hover {
  background: var(--smm-primary-hover);
}

/* ──────────────────────────────────────────────────────────
   MAIN CONTAINER & CARD SHELL
   ────────────────────────────────────────────────────────── */
.smmvd-container {
  font-family: var(--smmvd-font);
  width: 100%;
  max-width: 920px;
  margin: 32px auto;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  color: var(--smm-text);
  -webkit-font-smoothing: antialiased;
}

.smmvd-container *,
.smmvd-container *::before,
.smmvd-container *::after {
  box-sizing: border-box;
}

.smmvd-card {
  position: relative;
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

/* ──────────────────────────────────────────────────────────
   HEADER SECTION
   ────────────────────────────────────────────────────────── */
.smmvd-header {
  text-align: center;
  margin-bottom: 30px;
}

.smmvd-platform-icon-wrap {
  width: var(--icon-box-size);
  height: var(--icon-box-size);
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--smm-lavender);
  color: var(--smm-primary);
  box-shadow: 0 4px 14px rgba(101, 82, 230, 0.18);
  transition: transform 220ms ease;
}

.smmvd-platform-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.smmvd-platform-icon-wrap:hover {
  transform: scale(1.08) rotate(2deg);
}

.smmvd-icon-universal {
  background: var(--smm-primary);
  color: #FFFFFF;
}

.smmvd-title {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.25;
  color: var(--smm-text);
  font-family: inherit;
}

.smmvd-subtitle {
  margin: 0 auto;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--smm-text-muted);
  font-family: inherit;
}

/* Platform Quick Badges */
.smmvd-platform-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.smmvd-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-badge);
  background: var(--smm-page);
  border: 1px solid var(--smm-border);
  color: var(--smm-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: default;
  transition: all 180ms ease;
}

.smmvd-pill-icon {
  display: inline-flex;
  align-items: center;
}

.smmvd-pill-icon svg {
  width: 14px;
  height: 14px;
}

.smmvd-pill:hover {
  background: var(--smm-lavender);
  color: var(--smm-primary);
  border-color: rgba(101, 82, 230, 0.35);
  transform: translateY(-1px);
}

.smmvd-pill-more {
  opacity: 0.85;
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────
   INPUT FORM & CONTROLS
   ────────────────────────────────────────────────────────── */
.smmvd-form {
  margin-bottom: 24px;
}

.smmvd-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.smmvd-input-field-group {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.smmvd-input-field-group .smmvd-input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--smm-placeholder);
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 2;
  transition: color 180ms ease;
}

.smmvd-input-field-group:focus-within .smmvd-input-icon {
  color: var(--smm-primary);
}

.smmvd-input-field-group .url-input {
  padding-left: 48px;
  padding-right: 110px;
}

.smmvd-input-actions {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.smmvd-btn-clear {
  background: transparent;
  border: none;
  color: var(--smm-placeholder);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: color 180ms ease, background 180ms ease;
}

.smmvd-btn-clear:hover {
  color: #EF4444;
  background: #FEE2E2;
}

.smmvd-btn-paste {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-badge);
  background: var(--smm-lavender);
  color: var(--smm-primary);
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.smmvd-btn-paste:hover {
  background: rgba(101, 82, 230, 0.22);
  transform: scale(1.02);
}

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

.smmvd-btn-paste.smmvd-pasted {
  background: #DCFCE7 !important;
  color: #15803D !important;
}

.smmvd-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(101, 82, 230, 0.25);
}

.smmvd-btn-submit:hover {
  box-shadow: 0 6px 18px rgba(101, 82, 230, 0.35);
  transform: translateY(-1px);
}

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

.smmvd-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner */
.smmvd-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: smmvd-spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Detected Platform Indicator */
.smmvd-detected-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: var(--radius-badge);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--smm-lavender);
  color: var(--smm-primary);
  border: 1px solid rgba(101, 82, 230, 0.2);
  animation: smmvd-fade-in 200ms ease;
}

.smmvd-detected-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--smm-primary);
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────
   LOADING PROGRESS & SKELETON
   ────────────────────────────────────────────────────────── */
.smmvd-loading {
  margin: 24px 0;
  text-align: center;
  animation: smmvd-fade-in 200ms ease;
}

.smmvd-pulse-bar {
  width: 100%;
  height: 6px;
  background: var(--smm-border);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.smmvd-pulse-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(90deg, var(--smm-primary), #8B7AFF);
  border-radius: 8px;
  animation: smmvd-indeterminate 1.5s infinite ease-in-out;
}

@keyframes smmvd-indeterminate {
  0% { left: -40%; width: 40%; }
  50% { left: 40%; width: 50%; }
  100% { left: 100%; width: 30%; }
}

/* Step Progress Indicator */
.smmvd-loading-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px auto 10px auto;
  max-width: 500px;
}

.smmvd-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--smm-text-muted);
  transition: all 250ms ease;
}

.smmvd-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--smm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #FFFFFF;
  transition: all 250ms ease;
  flex-shrink: 0;
}

.smmvd-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94A3B8;
}

.smmvd-step.smmvd-step-active {
  color: var(--smm-primary);
}

.smmvd-step.smmvd-step-active .smmvd-step-icon {
  background: var(--smm-primary);
  box-shadow: 0 0 0 3px rgba(101, 82, 230, 0.2);
}

.smmvd-step-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: smmvd-spin 0.8s linear infinite;
  display: inline-block;
}

.smmvd-step.smmvd-step-done {
  color: #10B981;
}

.smmvd-step.smmvd-step-done .smmvd-step-icon {
  background: #10B981;
  color: #FFFFFF;
}

.smmvd-step-divider {
  flex: 1;
  height: 2px;
  background: var(--smm-border);
  min-width: 14px;
  max-width: 38px;
}

.smmvd-loading-text {
  font-size: 14px;
  color: var(--smm-text-muted);
  margin-top: 10px;
  font-weight: 500;
  min-height: 22px;
}

/* Skeleton Placeholder */
.smmvd-skeleton-wrap {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  border-radius: var(--radius-card);
  text-align: left;
}

.smmvd-skeleton-thumb {
  width: 140px;
  height: 90px;
  border-radius: var(--radius-control);
  flex-shrink: 0;
}

.smmvd-skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.smmvd-skeleton-line {
  height: 14px;
  border-radius: 6px;
}

.smmvd-skeleton-title {
  width: 75%;
  height: 18px;
}

.smmvd-skeleton-meta {
  width: 45%;
}

.smmvd-skeleton-buttons {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.smmvd-skeleton-btn {
  width: 110px;
  height: 32px;
  border-radius: var(--radius-badge);
}

.smmvd-shimmer {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: smmvd-shimmer 1.8s infinite ease-in-out;
}

@keyframes smmvd-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ──────────────────────────────────────────────────────────
   ERROR ALERT
   ────────────────────────────────────────────────────────── */
.smmvd-error-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  border-radius: var(--radius-control);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
  animation: smmvd-fade-in 250ms ease;
}

.smmvd-error-icon {
  color: #DC2626;
  flex-shrink: 0;
  margin-top: 2px;
}

.smmvd-error-content {
  flex: 1;
}

.smmvd-error-title {
  margin: 0 0 4px 0;
  font-size: 14.5px;
  font-weight: 700;
}

.smmvd-error-message {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.smmvd-error-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.smmvd-btn-error-retry {
  background: #DC2626;
  color: #FFFFFF;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms ease;
}

.smmvd-btn-error-retry:hover {
  background: #B91C1C;
  transform: translateY(-1px);
}

.smmvd-error-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #991B1B;
  line-height: 1;
  padding: 0 4px;
}


/* ──────────────────────────────────────────────────────────
   RESULT CARD
   ────────────────────────────────────────────────────────── */
.smmvd-result {
  border-radius: var(--radius-card);
  padding: 24px;
  margin-top: 20px;
  background: var(--smm-page);
  border: 1px solid var(--smm-border);
  box-shadow: var(--shadow-card);
  animation: smmvd-fade-up 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.smmvd-media-header {
  display: flex;
  gap: 20px;
  margin-bottom: 22px;
}

.smmvd-media-thumb-wrap {
  width: 190px;
  height: 115px;
  border-radius: var(--radius-control);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #17152B;
  box-shadow: 0 4px 14px rgba(35, 24, 90, 0.12);
}

.smmvd-media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 250ms ease;
}

.smmvd-media-thumb-wrap:hover .smmvd-media-thumb {
  transform: scale(1.05);
}

.smmvd-media-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(23, 21, 43, 0.85);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--radius-badge);
}

.smmvd-play-preview-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.85);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 200ms ease;
}

.smmvd-play-preview-btn:hover {
  background: var(--smm-primary);
  border-color: var(--smm-primary);
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 6px 20px rgba(101, 82, 230, 0.45);
}

.smmvd-media-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.smmvd-media-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.smmvd-media-platform-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: var(--radius-badge);
  background: var(--smm-primary);
  color: #FFFFFF;
}

.smmvd-media-author-badge {
  font-size: 12.5px;
  color: var(--smm-text-muted);
  font-weight: 500;
}

.smmvd-media-title {
  margin: 0 0 10px 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--smm-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.smmvd-media-meta-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.smmvd-media-formats-count {
  font-size: 13px;
  color: var(--smm-text-muted);
  font-weight: 500;
}

.smmvd-btn-reset {
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  color: var(--smm-text);
  padding: 6px 14px;
  border-radius: var(--radius-badge);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 180ms ease;
}

.smmvd-btn-reset:hover {
  background: var(--smm-lavender);
  color: var(--smm-primary);
  border-color: rgba(101, 82, 230, 0.3);
}

/* Integrated Video Preview Player */
.smmvd-preview-player-wrap {
  margin-bottom: 22px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #0F172A;
  border: 1px solid var(--smm-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.smmvd-preview-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #1E293B;
  color: #CBD5E1;
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.smmvd-btn-close-preview {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #CBD5E1;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 180ms ease;
}

.smmvd-btn-close-preview:hover {
  background: #EF4444;
  border-color: #EF4444;
  color: #FFFFFF;
}

.smmvd-preview-player {
  width: 100%;
  max-height: 420px;
  display: block;
}

/* Format Tabs */
.smmvd-format-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--smm-border);
  padding-bottom: 14px;
}

.smmvd-tab-btn {
  border: 1px solid var(--smm-border);
  background: var(--smm-surface);
  color: var(--smm-text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 180ms ease;
}

.smmvd-tab-btn:hover {
  background: var(--smm-lavender);
  color: var(--smm-primary);
  border-color: rgba(101, 82, 230, 0.25);
}

.smmvd-tab-active {
  background: var(--smm-primary) !important;
  border-color: var(--smm-primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(101, 82, 230, 0.25);
}

/* Formats Container / Grid */
.smmvd-formats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.smmvd-no-formats-box {
  text-align: center;
  padding: 30px;
  color: var(--smm-text-muted);
  background: var(--smm-surface);
  border: 1px dashed var(--smm-border);
  border-radius: var(--radius-control);
}

.smmvd-format-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  border-radius: var(--radius-control);
  transition: all 180ms ease;
}

.smmvd-format-item:hover {
  transform: translateY(-1px);
  border-color: rgba(101, 82, 230, 0.4);
  box-shadow: var(--shadow-dropdown);
}

.smmvd-fmt-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.smmvd-fmt-quality-badge {
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-badge);
  min-width: 78px;
  text-align: center;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #6552E6, #4F46E5);
  box-shadow: 0 2px 6px rgba(101, 82, 230, 0.25);
}

.smmvd-fmt-quality-4k {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.smmvd-fmt-quality-1080p {
  background: linear-gradient(135deg, #6552E6, #4F46E5);
  box-shadow: 0 2px 8px rgba(101, 82, 230, 0.3);
}

.smmvd-fmt-quality-720p {
  background: linear-gradient(135deg, #0EA5E9, #0284C7);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.smmvd-fmt-quality-badge-audio {
  background: linear-gradient(135deg, #10B981, #059669);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}



.smmvd-fmt-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.smmvd-fmt-ext {
  font-size: 14px;
  font-weight: 600;
  color: var(--smm-text);
}

.smmvd-fmt-size {
  font-size: 12px;
  color: var(--smm-text-muted);
}

.smmvd-fmt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.smmvd-fmt-btn-download {
  background: var(--smm-primary);
  color: #FFFFFF !important;
  text-decoration: none !important;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-control);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 2px 8px rgba(101, 82, 230, 0.2);
}

.smmvd-fmt-btn-download:hover {
  background: var(--smm-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(101, 82, 230, 0.32);
}

.smmvd-fmt-btn-download:active {
  background: var(--smm-primary-active);
  transform: translateY(0);
}

.smmvd-fmt-btn-copy {
  background: var(--smm-lavender);
  border: 1px solid rgba(101, 82, 230, 0.15);
  color: var(--smm-primary);
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 180ms ease;
}

.smmvd-fmt-btn-copy:hover {
  background: rgba(101, 82, 230, 0.22);
}

.smmvd-fmt-btn-copy.smmvd-copied {
  background: #DCFCE7 !important;
  color: #15803D !important;
  border-color: #86EFAC !important;
}

/* ──────────────────────────────────────────────────────────
   THEME ADAPTERS (FOR SHORTCODE THEME OVERRIDES)
   ────────────────────────────────────────────────────────── */
/* 1. Glass Dark */
.smmvd-theme-glass_dark .smmvd-card {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
}
.smmvd-theme-glass_dark .smmvd-title { color: #FFFFFF; }
.smmvd-theme-glass_dark .smmvd-subtitle { color: #94A3B8; }
.smmvd-theme-glass_dark .url-input {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}
.smmvd-theme-glass_dark .url-input::placeholder { color: #64748B; }
.smmvd-theme-glass_dark .smmvd-btn-paste {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
}
.smmvd-theme-glass_dark .smmvd-btn-paste:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}
.smmvd-theme-glass_dark .smmvd-result {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}
.smmvd-theme-glass_dark .smmvd-media-title { color: #FFFFFF; }
.smmvd-theme-glass_dark .smmvd-format-item {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
}
.smmvd-theme-glass_dark .smmvd-fmt-ext { color: #FFFFFF; }
.smmvd-theme-glass_dark .smmvd-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94A3B8;
}

/* 2. Glass Light */
.smmvd-theme-glass_light .smmvd-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.07);
}

/* 3. Modern Gradient */
.smmvd-theme-modern_gradient .smmvd-card {
  background: linear-gradient(145deg, #181824 0%, #101018 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
}
.smmvd-theme-modern_gradient .smmvd-title { color: #FFFFFF; }
.smmvd-theme-modern_gradient .smmvd-subtitle { color: #A1A1AA; }
.smmvd-theme-modern_gradient .url-input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}
.smmvd-theme-modern_gradient .url-input::placeholder { color: #71717A; }
.smmvd-theme-modern_gradient .smmvd-result {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.smmvd-theme-modern_gradient .smmvd-media-title { color: #FFFFFF; }
.smmvd-theme-modern_gradient .smmvd-format-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}
.smmvd-theme-modern_gradient .smmvd-fmt-ext { color: #FFFFFF; }

/* 4. Clean Minimal */
.smmvd-theme-clean_minimal .smmvd-card {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* 5. Auto Theme (System Preference) */
@media (prefers-color-scheme: dark) {
  .smmvd-theme-auto .smmvd-card {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    color: #F8FAFC;
  }
  .smmvd-theme-auto .smmvd-title { color: #FFFFFF; }
  .smmvd-theme-auto .smmvd-subtitle { color: #94A3B8; }
  .smmvd-theme-auto .url-input {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
  }
  .smmvd-theme-auto .url-input::placeholder { color: #64748B; }
  .smmvd-theme-auto .smmvd-result {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
  }
  .smmvd-theme-auto .smmvd-media-title { color: #FFFFFF; }
  .smmvd-theme-auto .smmvd-format-item {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
  }
  .smmvd-theme-auto .smmvd-fmt-ext { color: #FFFFFF; }
  .smmvd-theme-auto .smmvd-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: #94A3B8;
  }
}

/* Thumbnail Button & Actions Group */
.smmvd-media-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.smmvd-btn-download-thumb {
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  color: var(--smm-text);
  padding: 6px 14px;
  border-radius: var(--radius-badge);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 180ms ease;
}

.smmvd-btn-download-thumb:hover {
  background: var(--smm-lavender);
  color: var(--smm-primary);
  border-color: rgba(101, 82, 230, 0.3);
}

/* Format QR Code Button */
.smmvd-fmt-btn-qr {
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  color: var(--smm-text-muted);
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 180ms ease;
}

.smmvd-fmt-btn-qr:hover {
  background: var(--smm-lavender);
  color: var(--smm-primary);
  border-color: rgba(101, 82, 230, 0.3);
}

/* QR Code Modal Overlay */
.smmvd-qr-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smmvd-qr-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.smmvd-qr-modal-content {
  position: relative;
  z-index: 101;
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  border-radius: var(--radius-card);
  padding: 28px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: smmvd-pop-in 220ms ease;
}

@keyframes smmvd-pop-in {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.smmvd-qr-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--smm-text-muted);
  transition: color 150ms ease;
}

.smmvd-qr-modal-close:hover {
  color: #EF4444;
}

.smmvd-qr-title {
  margin: 0 0 6px 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--smm-text);
}

.smmvd-qr-desc {
  margin: 0 0 16px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--smm-text-muted);
}

.smmvd-qr-code-box {
  background: #FFFFFF;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  border: 1px solid #E2E8F0;
  margin-bottom: 8px;
}

.smmvd-qr-image {
  display: block;
  border-radius: 6px;
}

.smmvd-qr-file-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--smm-primary);
  text-transform: uppercase;
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .downloader-card {
    padding: 20px;
    border-radius: 20px;
  }

  .smmvd-title {
    font-size: 22px;
  }

  .smmvd-subtitle {
    font-size: 14px;
  }

  .smmvd-input-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .download-button {
    width: 100%;
    justify-content: center;
  }

  .smmvd-media-header {
    flex-direction: column;
  }

  .smmvd-media-thumb-wrap {
    width: 100%;
    height: 190px;
  }

  .smmvd-format-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .smmvd-fmt-actions {
    width: 100%;
  }

  .smmvd-fmt-btn-download {
    flex: 1;
    justify-content: center;
  }

  .smmvd-format-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
  }
}

/* ──────────────────────────────────────────────────────────
   QUICK DOWNLOAD SHORTCUTS & FORMAT BADGES (API GUIDE WORKFLOWS)
   ────────────────────────────────────────────────────────── */
.smmvd-quick-downloads-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 16px 0;
}

.smmvd-btn-quick-best,
.smmvd-btn-quick-audio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 180ms ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.smmvd-btn-quick-best {
  background: linear-gradient(135deg, var(--smm-primary) 0%, #4F46E5 100%);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(101, 82, 230, 0.28);
}

.smmvd-btn-quick-best:hover {
  background: linear-gradient(135deg, var(--smm-primary-hover) 0%, #4338CA 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(101, 82, 230, 0.38);
}

.smmvd-btn-quick-best:active {
  transform: translateY(0);
}

.smmvd-btn-quick-best svg {
  transition: transform 180ms ease;
}

.smmvd-btn-quick-best:hover svg {
  transform: translateY(2px);
}

.smmvd-btn-quick-audio {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.smmvd-btn-quick-audio:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38);
}

.smmvd-btn-quick-audio:active {
  transform: translateY(0);
}

.smmvd-fmt-btn-download svg {
  transition: transform 180ms ease;
}

.smmvd-fmt-btn-download:hover svg {
  transform: translateY(2px);
}

.smmvd-fmt-btn-download.smmvd-downloading {
  background: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35) !important;
  pointer-events: none;
}

.smmvd-media-views-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--smm-text-muted);
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  padding: 3px 9px;
  border-radius: var(--radius-badge);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.smmvd-fmt-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.smmvd-fmt-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.smmvd-fmt-badge-merged {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.smmvd-fmt-badge-sound {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

.smmvd-fmt-badge-audio {
  background: #E0E7FF;
  color: #3730A3;
  border: 1px solid #C7D2FE;
}

.smmvd-error-code-badge {
  font-size: 11px;
  font-family: monospace;
  background: rgba(185, 28, 28, 0.1);
  color: #991B1B;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

/* Mode Navigation (Single / Batch / Audio) */
.smmvd-mode-nav {
  display: inline-flex;
  gap: 6px;
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  padding: 4px;
  border-radius: var(--radius-control);
  margin-bottom: 16px;
}

.smmvd-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--smm-text-muted);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-control) - 2px);
  cursor: pointer;
  transition: all 180ms ease;
}

.smmvd-mode-tab:hover {
  color: var(--smm-primary);
  background: var(--smm-lavender);
}

.smmvd-mode-tab-active {
  background: var(--smm-primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(101, 82, 230, 0.25);
}

.smmvd-mode-audio {
  color: #059669;
}
.smmvd-mode-audio:hover {
  background: #ECFDF5;
  color: #047857;
}

/* Batch Input Wrap */
.smmvd-batch-wrap {
  width: 100%;
  animation: smmvdFadeIn 200ms ease;
}

.smmvd-batch-field-group {
  background: var(--smm-surface);
  border: 2px solid var(--smm-border);
  border-radius: var(--radius-control);
  padding: 14px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.smmvd-batch-field-group:focus-within {
  border-color: var(--smm-primary);
  box-shadow: 0 0 0 4px rgba(101, 82, 230, 0.12);
}

.smmvd-batch-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--smm-text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  padding: 4px;
}

.smmvd-batch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--smm-border);
  flex-wrap: wrap;
  gap: 10px;
}

.smmvd-batch-hint {
  font-size: 12px;
  color: var(--smm-text-muted);
}

.smmvd-batch-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.smmvd-btn-paste-batch,
.smmvd-btn-clear-batch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--smm-border);
  background: var(--smm-card-bg);
  color: var(--smm-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
}

.smmvd-btn-paste-batch:hover,
.smmvd-btn-clear-batch:hover {
  border-color: var(--smm-primary);
  color: var(--smm-primary);
}

/* Batch Results Queue */
.smmvd-batch-results {
  margin-top: 24px;
  background: var(--smm-card-bg);
  border: 1px solid var(--smm-border);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
  animation: smmvdSlideUp 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.smmvd-batch-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--smm-border);
  margin-bottom: 16px;
}

.smmvd-batch-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--smm-primary);
}

.smmvd-batch-title-group h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--smm-text);
}

.smmvd-batch-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.smmvd-batch-count-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--smm-lavender);
  color: var(--smm-primary);
}

.smmvd-btn-reset-batch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  background: transparent;
  border: 1px solid var(--smm-border);
  border-radius: var(--radius-badge);
  color: var(--smm-text-muted);
  cursor: pointer;
}
.smmvd-btn-reset-batch:hover {
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.smmvd-batch-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smmvd-batch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--smm-surface);
  border: 1px solid var(--smm-border);
  border-radius: var(--radius-control);
  gap: 14px;
  transition: all 180ms ease;
}

.smmvd-batch-card:hover {
  border-color: rgba(101, 82, 230, 0.3);
}

.smmvd-batch-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.smmvd-batch-thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: #E2E8F0;
  flex-shrink: 0;
}

.smmvd-batch-info {
  min-width: 0;
}

.smmvd-batch-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--smm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 4px 0;
}

.smmvd-batch-url-sub {
  font-size: 11.5px;
  color: var(--smm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smmvd-batch-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.smmvd-batch-status-ready {
  color: #10B981;
  font-weight: 600;
  font-size: 12px;
}

.smmvd-batch-status-error {
  color: #EF4444;
  font-weight: 600;
  font-size: 12px;
}


