.archive-header {
  text-align: center;
  margin: 1.5rem 0 2rem;
}
.archive-header h1 {
  font-family: "HTCD", var(--font-main);
  font-size: 2.2rem;
  background: linear-gradient(135deg, #fff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.5px;
}
.archive-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.filters-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0.6rem 1.2rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.filter-group label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-tertiary);
  margin-left: 0.3rem;
}
.filter-select,
.search-input {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  min-width: 130px;
}
.search-input {
  min-width: 180px;
}

.files-grid {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 1rem 0;
}

.file-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  transition: all 0.15s ease;
  min-height: 48px;
}
.file-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}

.file-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
  border: none;
}
.file-icon img {
  width: 28px;
  height: 28px;
  filter: none;
}
.file-icon i {
  font-size: 1.4rem;
  color: var(--accent-primary);
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 0;
  background: transparent;
}

.file-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  min-width: 140px;
  color: var(--text-primary);
}

.file-meta {
  display: flex;
  gap: 0.8rem;
  font-size: 0.65rem;
  color: var(--text-tertiary);
  border: none;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}
.file-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.file-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
  min-width: 120px;
  line-height: 1.3;
}

.file-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  flex-shrink: 0;
}
.badge {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--text-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.download-btn {
  flex: 0 0 auto;
  width: auto;
  background: var(--accent-primary);
  color: #000;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 0;
  transition: opacity 0.15s;
}
.download-btn:hover {
  opacity: 0.8;
  transform: none;
}

.sort-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.3rem;
}
.sort-header span {
  cursor: pointer;
  transition: color 0.2s;
}
.sort-header span:hover {
  color: var(--text-primary);
}
.sort-header .active {
  color: var(--accent-primary);
}

.loading,
.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem;
  }
  .filter-select,
  .search-input {
    width: 100%;
  }
  .file-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    gap: 0.2rem;
  }
  .file-info {
    flex-direction: column;
    align-items: flex-start;
  }
  .file-meta {
    flex-wrap: wrap;
  }
  .download-btn {
    width: 100%;
    text-align: center;
    padding: 0.3rem;
  }
  .sort-header {
    display: none;
  }
}