/* ==========================================================================
   AN1-INSPIRED STRUCTURAL ADDITIONS
   ========================================================================== */

/* --- APP GRID SYSTEM (AN1 Style) --- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.app-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition-bounce);
  text-decoration: none;
  color: inherit;
  
  &:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(var(--tr), 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
}

/* --- APP ICON & METADATA --- */
.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  overflow: hidden;
  
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.app-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.app-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #a1a1aa;
}

.app-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fbbf24; /* Gold star color */
  font-weight: 600;
}

/* --- BADGES (Version, Size, Mod) --- */
.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-mod {
  background: rgba(var(--tr), 0.15);
  color: var(--tc);
  border: 1px solid rgba(var(--tr), 0.3);
}

.badge-update {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* --- AN1 STYLE DOWNLOAD BOX --- */
.download-portal {
  background: var(--bg-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  margin: 32px 0;
}

.download-portal-header {
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  
  h3 { margin: 0; font-size: 1.2rem; }
}

.download-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
  
  &:last-child { border-bottom: none; }
  &:hover { background: rgba(255, 255, 255, 0.02); }
}

.file-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  
  .file-name {
    font-weight: 600;
    color: #e4e4e7;
  }
  .file-size {
    font-size: 0.8rem;
    color: #a1a1aa;
  }
}

.btn-download-classic {
  background: #16a34a;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  text-decoration: none;
  
  &:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
  }
}

/* Responsive adjustments for the portal */
@media (max-width: 600px) {
  .download-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .btn-download-classic {
    width: 100%;
    justify-content: center;
  }
}
