/* Downloads Header */
.downloads-hero {
  padding: 160px 0 60px 0;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
}

.downloads-hero h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 16px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.downloads-hero p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Search and Filters Area */
.search-filter-area {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 20px;
  margin-bottom: 50px;
  backdrop-filter: blur(10px);
}

.search-box-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.search-box-wrapper svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: var(--color-text-muted);
  transition: var(--transition);
}

.search-input {
  width: 100%;
  background: rgba(10, 12, 16, 0.6);
  border: 1px solid var(--border-color);
  padding: 18px 20px 18px 56px;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: var(--shadow-neon);
}

.search-input:focus + svg {
  fill: var(--secondary);
}

/* Category Filters */
.filters-wrapper {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--color-text-secondary);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-neon-primary);
}

/* Files Grid & Sections */
.files-grid {
  display: block;
  margin-bottom: 80px;
}

.category-section {
  margin-bottom: 60px;
  width: 100%;
}

.category-section-title {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
}

.category-section-title span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.category-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

.file-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.file-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(79, 70, 229, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.file-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.file-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(6, 182, 212, 0.1);
  color: var(--secondary);
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: 0.05em;
}

/* File category color variations */
.file-category.drivers {
  background: rgba(79, 70, 229, 0.1);
  color: #818cf8;
}
.file-category.utilitários {
  background: rgba(6, 182, 212, 0.1);
  color: var(--secondary);
}
.file-category.manuais {
  background: rgba(217, 70, 239, 0.1);
  color: #f472b6;
}
.file-category.softwares {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.file-size {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.file-title {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.4;
  font-weight: 600;
}

.file-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1; /* Pushes the download button down to align them card by card */
}

.file-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  margin-top: auto;
}

.file-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.btn-download {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.file-card:hover .btn-download {
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 20px;
  color: var(--color-text-secondary);
}

.empty-state svg {
  width: 60px;
  height: 60px;
  fill: var(--color-text-muted);
  margin-bottom: 20px;
}

.empty-state h3 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

/* Loading Spinner */
.loader {
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top: 4px solid var(--secondary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 40px auto;
  grid-column: 1 / -1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .downloads-hero h1 {
    font-size: 2.2rem;
  }
  .search-filter-area {
    padding: 20px 15px;
  }
}
