/* ── Download Screen ─────────────────────────────────── */

/* Filter bar */
.download-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 1rem;
}

/* Hero banner for download section */
.download-hero {
  background: linear-gradient(135deg, #1D9E75 0%, #0F6E56 100%);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  color: #fff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 6px 24px rgba(29,158,117,.35);
}

.download-hero-icon {
  font-size: 48px;
  flex-shrink: 0;
  line-height: 1;
}

.download-hero h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.download-hero p {
  font-size: 13px;
  opacity: .85;
}

/* Grid of file cards */
.files-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 1rem;
}

/* Individual file card */
.file-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.file-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: transform 0.2s;
  transform: scaleX(0);
  transform-origin: left;
}

.file-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.file-card:hover::before { transform: scaleX(1); }

.file-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.file-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.file-card-icon.kat-pdf    { background: #FEF3C7; }
.file-card-icon.kat-audio  { background: #EDE9FE; }
.file-card-icon.kat-video  { background: #DBEAFE; }
.file-card-icon.kat-zip    { background: #D1FAE5; }
.file-card-icon.kat-apk    { background: #E0E7FF; }
.file-card-icon.kat-lainnya { background: var(--gray-100); }

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

.file-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-card-desc {
  font-size: 11px;
  color: var(--gray-400);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-card-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* File type / level badges in card */
.fc-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .04em;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.fc-badge.kat-pdf    { background: #FEF3C7; color: #92400E; }
.fc-badge.kat-audio  { background: #EDE9FE; color: #5B21B6; }
.fc-badge.kat-video  { background: #DBEAFE; color: #1E40AF; }
.fc-badge.kat-zip    { background: #D1FAE5; color: #065F46; }
.fc-badge.kat-apk    { background: #E0E7FF; color: #3730A3; }
.fc-badge.kat-lainnya { background: var(--gray-100); color: var(--gray-600); }

.file-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
}

.file-card-info {
  font-size: 11px;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-jp);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}

.btn-download:hover { background: var(--green-dark); }

/* No files state */
.download-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-400);
}

.download-empty-icon { font-size: 48px; margin-bottom: 0.75rem; }
.download-empty p    { font-size: 13px; }

/* Download stats highlight */
.download-stat-row {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}

.dl-stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--gray-100);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--gray-600);
}

.dl-stat-pill strong {
  font-family: var(--font-mono);
  color: var(--gray-900);
}

/* Responsive for download */
@media (max-width: 480px) {
  .files-grid      { grid-template-columns: 1fr; }
  .download-filters { grid-template-columns: 1fr 1fr; }
  .download-hero   { flex-direction: column; text-align: center; }
}

/* Dark mode adjustments */
html.dark-mode .download-hero  { box-shadow: 0 6px 24px rgba(29,158,117,.2); }
html.dark-mode .file-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.4); }
html.dark-mode .file-card-icon.kat-pdf    { background: #3a2403; }
html.dark-mode .file-card-icon.kat-audio  { background: #2e1b5c; }
html.dark-mode .file-card-icon.kat-video  { background: #0d2340; }
html.dark-mode .file-card-icon.kat-zip    { background: #0d3320; }
html.dark-mode .file-card-icon.kat-apk    { background: #1e1b4b; }
html.dark-mode .fc-badge.kat-pdf    { background: #3a2403; color: #fbbf24; }
html.dark-mode .fc-badge.kat-audio  { background: #2e1b5c; color: #a78bfa; }
html.dark-mode .fc-badge.kat-video  { background: #0d2340; color: #60a5fa; }
html.dark-mode .fc-badge.kat-zip    { background: #0d3320; color: #34d399; }
html.dark-mode .fc-badge.kat-apk    { background: #1e1b4b; color: #818cf8; }
html.dark-mode .dl-stat-pill { background: var(--gray-100); }

html.dark-mode .file-card,
html.dark-mode .file-card-footer,
html.dark-mode .file-card-top {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
