/* ══════════════════════════════════════════
   NEXORA DOWNLOADS — downloads.css
   Extends style.css — do not modify style.css
══════════════════════════════════════════ */

/* ── HERO ── */
.dl-hero {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 55%, #0d0d0d 100%);
  padding: 120px 0 56px;
  overflow: hidden;
  text-align: center;
}
.dl-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.dl-hero-glow {
  position: absolute;
  top: -10%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(229,57,53,0.2), transparent 70%);
}
.dl-hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}
.dl-hero-inner { position: relative; z-index: 1; }
.dl-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(229,57,53,0.12);
  border: 1px solid rgba(229,57,53,0.3);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.dl-hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.dl-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  max-width: 600px;
  margin: 0 auto 38px;
  line-height: 1.65;
}
.dl-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.dl-hstat { text-align: center; }
.dl-hstat-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1;
}
.dl-hstat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 7px;
  font-weight: 500;
}

/* ── MAIN ── */
.dl-main { background: var(--bg); }

/* TOOLBAR */
.dl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.dl-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
  transition: border-color .2s;
}
.dl-search:focus-within { border-color: var(--red); }
.dl-search i { color: var(--gray); font-size: 0.9rem; }
.dl-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 0;
  font-size: 0.88rem;
  font-family: var(--font);
  color: var(--dark);
  background: transparent;
}
.dl-search input::placeholder { color: #aaa; }

.dl-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-filter {
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray);
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s;
  white-space: nowrap;
}
.dl-filter:hover { border-color: var(--red); color: var(--red); }
.dl-filter.active { background: var(--red); border-color: var(--red); color: #fff; }

/* GRID */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.dl-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .25s;
  display: flex;
  flex-direction: column;
  animation: dlFade .4s ease both;
}
.dl-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
@keyframes dlFade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.dl-card-img {
  position: relative;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.dl-card-img-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  text-align: center;
  padding: 0 10px;
}
.dl-status-badge {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16,185,129,0.9);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  backdrop-filter: blur(4px);
}
.dl-update-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.dl-card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.dl-card-cat {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  width: fit-content;
}
.cat-forex  { background: rgba(45,108,223,0.1); color: #2d6cdf; }
.cat-crypto { background: rgba(229,57,53,0.1);  color: #E53935; }
.cat-ai     { background: rgba(139,92,246,0.1); color: #8b5cf6; }

.dl-card-name { font-size: 1rem; font-weight: 700; color: var(--dark); cursor: pointer; }
.dl-card-name:hover { color: var(--red); }
.dl-card-seller { font-size: 0.78rem; color: var(--gray); display: flex; align-items: center; gap: 5px; }
.verified-tick { color: var(--red); font-size: 0.72rem; }

.dl-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dl-meta-item { display: flex; flex-direction: column; gap: 2px; }
.dl-meta-lbl { font-size: 0.64rem; color: var(--gray); }
.dl-meta-val { font-size: 0.78rem; font-weight: 600; color: var(--dark); }

.dl-card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.dl-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s;
}
.dl-download-btn:hover { background: var(--red-dark); }
.dl-download-btn:disabled { opacity: 0.7; cursor: default; }
.dl-sub-actions { display: flex; gap: 8px; }
.dl-sub-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s;
}
.dl-sub-btn:hover { border-color: var(--red); color: var(--red); }

/* EMPTY + NO RESULTS */
.dl-empty, .dl-no-results {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 70px 20px;
  background: #fff;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 36px;
}
.dl-empty.show, .dl-no-results.show { display: flex; }
.dl-empty-icon {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(229,57,53,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--red);
  animation: dlPulse 2s ease-in-out infinite;
}
@keyframes dlPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.dl-empty h2 { font-size: 1.4rem; font-weight: 800; color: var(--dark); }
.dl-empty p { font-size: 0.9rem; color: var(--gray); max-width: 380px; line-height: 1.6; }
.dl-no-results i { font-size: 2rem; color: var(--border); }
.dl-no-results p { font-size: 0.9rem; color: var(--gray); }

/* ── TRADER JOE HELP ── */
.dl-joe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, #111 0%, #1a0505 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  flex-wrap: wrap;
}
.dl-joe-left { display: flex; align-items: center; gap: 18px; }
.dl-joe-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #333, #111);
  border: 2px solid rgba(229,57,53,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--red);
  flex-shrink: 0;
}
.dl-joe-left h3 { font-size: 1.15rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.dl-joe-left p { font-size: 0.85rem; color: rgba(255,255,255,0.6); line-height: 1.5; }
.dl-joe-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── DRAWER ── */
.dl-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 4000;
}
.dl-drawer-backdrop.show { display: block; animation: dlFadeIn .25s ease; }
@keyframes dlFadeIn { from { opacity: 0; } to { opacity: 1; } }

.dl-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 480px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  z-index: 4001;
  box-shadow: -8px 0 40px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
}
.dl-drawer.open { transform: translateX(0); }
.dl-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dl-drawer-head h2 { font-size: 1.2rem; font-weight: 800; color: var(--dark); }
.dl-drawer-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--gray);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all .2s;
}
.dl-drawer-close:hover { background: var(--red); color: #fff; }
.dl-drawer-body { padding: 26px; overflow-y: auto; flex: 1; }

.dl-drawer-section { margin-bottom: 26px; }
.dl-drawer-section:last-child { margin-bottom: 0; }
.dl-drawer-section h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-drawer-section h3 i { color: var(--red); font-size: 0.9rem; }
.dl-drawer-section p { font-size: 0.86rem; color: var(--gray); line-height: 1.7; }

/* license box */
.dl-license-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dl-license-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-license-lbl { font-size: 0.78rem; color: var(--gray); }
.dl-license-val { font-size: 0.82rem; font-weight: 700; color: var(--dark); }
.dl-license-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.dl-license-key code {
  font-size: 0.8rem;
  font-family: 'Courier New', monospace;
  color: var(--dark);
  word-break: break-all;
}
.dl-license-copy {
  background: var(--red);
  color: #fff;
  border: none;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: background .2s;
}
.dl-license-copy:hover { background: var(--red-dark); }
.dl-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 3px 10px;
  border-radius: 20px;
}

/* version history */
.dl-version-list { display: flex; flex-direction: column; gap: 12px; }
.dl-version-item {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.dl-version-item:last-child { border-bottom: none; padding-bottom: 0; }
.dl-version-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(229,57,53,0.08);
  padding: 3px 9px;
  border-radius: 4px;
  height: fit-content;
  flex-shrink: 0;
}
.dl-version-note { font-size: 0.82rem; color: var(--gray); line-height: 1.5; }
.dl-version-note strong { color: var(--dark); display: block; margin-bottom: 2px; }

/* install steps */
.dl-install-steps { display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.dl-install-step {
  display: flex;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--gray);
  line-height: 1.5;
}
.dl-install-step::before {
  counter-increment: step;
  content: counter(step);
  width: 24px; height: 24px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dl-drawer-download {
  width: 100%;
  justify-content: center;
  padding: 13px;
  margin-top: 4px;
}

/* ── TOAST ── */
.dl-toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all .35s cubic-bezier(0.175,0.885,0.32,1.275);
  pointer-events: none;
  font-family: var(--font);
}
.dl-toast.show { transform: translateY(0); opacity: 1; }
.dl-toast i { color: var(--success); }

/* ── RESPONSIVE ── */
@media(max-width:1100px) {
  .dl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:768px) {
  .dl-hero-title { font-size: 2.1rem; }
  .dl-hero { padding: 100px 0 48px; }
  .dl-hero-stats { grid-template-columns: 1fr 1fr; gap: 28px; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-toolbar { flex-direction: column; align-items: stretch; }
  .dl-search { max-width: none; }
  .dl-joe { flex-direction: column; align-items: flex-start; text-align: left; }
  .dl-joe-actions { width: 100%; }
  .dl-joe-actions a { flex: 1; justify-content: center; }
}
@media(max-width:480px) {
  .dl-hero-title { font-size: 1.8rem; }
  .dl-hero-stats { grid-template-columns: 1fr 1fr; }
  .dl-hstat-num { font-size: 1.8rem; }
}