/* ==========================================================================
   WebSansay Hub - Универсальный загрузчик видео (/download)
   Dark OLED + Acid Lime #BFFF00
   ========================================================================== */

.dl-hero {
  text-align: center;
  padding: 80px 20px 40px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.dl-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(191, 255, 0, 0.08);
  border: 1px solid rgba(191, 255, 0, 0.25);
  color: var(--lime);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.dl-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text-strong);
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}

.dl-title span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dl-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

/* Форма ввода */
.dl-form-wrapper {
  max-width: 780px;
  margin: 0 auto 40px;
  position: relative;
  z-index: 2;
}

.dl-input-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.dl-input-box:focus-within {
  border-color: var(--lime);
  box-shadow: var(--glow);
}

.dl-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-strong);
  padding: 12px 16px;
  min-width: 0;
}

.dl-input-field::placeholder {
  color: var(--text-dim);
}

.dl-btn-paste {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dl-btn-paste:hover {
  background: #222626;
  color: var(--text-strong);
  border-color: var(--line-bright);
}

.dl-btn-submit {
  background: var(--grad);
  border: none;
  color: #080909;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.dl-btn-submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 20px rgba(191, 255, 0, 0.4);
}

.dl-btn-submit:active {
  transform: scale(0.98);
}

.dl-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Бейджи платформ */
.dl-platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 800px;
  margin: 0 auto 50px;
}

.dl-plat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.dl-plat-item svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.dl-plat-item.active {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(191, 255, 0, 0.08);
  box-shadow: 0 0 12px rgba(191, 255, 0, 0.2);
}

/* Статус / Загрузка */
.dl-status {
  text-align: center;
  padding: 24px;
  margin: 0 auto 30px;
  max-width: 600px;
  display: none;
}

.dl-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(191, 255, 0, 0.15);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: dl-spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes dl-spin {
  to { transform: rotate(360deg); }
}

.dl-status-text {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--lime);
}

.dl-error {
  background: rgba(255, 90, 90, 0.1);
  border: 1px solid var(--danger);
  color: #ff9999;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  max-width: 640px;
  margin: 0 auto 30px;
  display: none;
  text-align: center;
}

/* Карточка результата */
.dl-result {
  max-width: 780px;
  margin: 0 auto 60px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: none;
}

.dl-result-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.dl-thumb-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 16/9;
}

.dl-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.dl-thumb-link:hover .dl-thumb-img {
  transform: scale(1.03);
  filter: brightness(1.08);
}

.dl-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.dl-thumb-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.dl-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dl-info-platform {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.dl-info-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-strong);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dl-info-author {
  font-size: 14px;
  color: var(--text-muted);
}

.dl-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
}

.dl-btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-strong);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: center;
}

.dl-btn-download:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: #080909;
  box-shadow: 0 0 16px rgba(191, 255, 0, 0.3);
}

.dl-btn-download.primary {
  background: var(--grad);
  border-color: transparent;
  color: #080909;
}

.dl-btn-download.primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 20px rgba(191, 255, 0, 0.4);
}

.dl-btn-download.tg-bot {
  background: #24A1DE;
  border-color: #24A1DE;
  color: #ffffff;
}

.dl-btn-download.tg-bot:hover {
  background: #1e8dc4;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(36, 161, 222, 0.4);
}

/* Секция преимуществ и FAQ */
.dl-features {
  max-width: 1000px;
  margin: 40px auto 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.dl-feat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.2s ease;
}

.dl-feat-card:hover {
  border-color: var(--line-bright);
}

.dl-feat-icon {
  font-size: 24px;
  margin-bottom: 12px;
  display: inline-block;
}

.dl-feat-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 8px;
}

.dl-feat-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Мобильная адаптация */
@media (max-width: 680px) {
  .dl-hero {
    padding: 40px 16px 24px;
  }
  .dl-input-box {
    flex-direction: column;
    padding: 10px;
  }
  .dl-input-field {
    width: 100%;
    padding: 8px 10px;
  }
  .dl-input-box > div {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .dl-btn-paste, .dl-btn-submit {
    flex: 1;
    justify-content: center;
  }
  .dl-result-header {
    grid-template-columns: 1fr;
  }
  .dl-thumb-wrap {
    aspect-ratio: 16/9;
  }
  .dl-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Download Progress Overlay
   ========================================================================== */

.dl-download-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: dl-fade-in 0.2s ease;
}

@keyframes dl-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dl-download-progress {
  background: #111;
  border: 1px solid rgba(191, 255, 0, 0.2);
  border-radius: 16px;
  padding: 32px 40px;
  text-align: center;
  min-width: 300px;
  max-width: 400px;
}

.dl-download-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(191, 255, 0, 0.15);
  border-top-color: #BFFF00;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: dl-spin 0.8s linear infinite;
}

@keyframes dl-spin {
  to { transform: rotate(360deg); }
}

.dl-download-label {
  color: #eee;
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 16px;
}

.dl-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.dl-progress-bar-fill {
  height: 100%;
  background: #BFFF00;
  border-radius: 3px;
  transition: width 0.15s ease;
}

.dl-download-percent {
  color: #BFFF00;
  font-size: 14px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  margin: 10px 0 0;
}

/* Промо-баннер Google AI Pro в карточке */
.dl-promo-banner {
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.dl-promo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(200, 255, 0, 0.08) 0%, rgba(20, 24, 20, 0.7) 100%);
  border: 1px solid rgba(200, 255, 0, 0.25);
  border-radius: var(--radius-sm, 8px);
  text-decoration: none;
  transition: all 0.2s ease;
}

.dl-promo-card:hover {
  background: linear-gradient(135deg, rgba(200, 255, 0, 0.15) 0%, rgba(20, 24, 20, 0.85) 100%);
  border-color: var(--lime, #c8ff00);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(200, 255, 0, 0.15);
}

.dl-promo-badge {
  background: var(--lime, #c8ff00);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.dl-promo-info {
  flex-grow: 1;
}

.dl-promo-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}

.dl-promo-sub {
  font-size: 12px;
  color: var(--text-muted, #888);
  line-height: 1.3;
}

.dl-promo-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--lime, #c8ff00);
  white-space: nowrap;
}
