* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navigation */
header {
  background-color: #0a0a0a;
  border-bottom: 1px solid #222;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

nav a:hover {
  color: #ff0043;
}

/* Search Form */
.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1rem;
}

.search-input {
  padding: 0.5rem 1rem;
  background-color: #111;
  border: 1px solid #333;
  border-radius: 4px;
  color: #fff;
  font-size: 0.9rem;
  width: 200px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #555;
}

.search-input::placeholder {
  color: #666;
}

.search-btn {
  padding: 0.5rem 1rem;
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-btn:hover {
  background-color: #ff0043;
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }

  .search-form {
    order: 3;
    width: 100%;
    margin: 1rem 0 0 0;
  }

  .search-input {
    flex: 1;
    width: auto;
  }
}

/* Main Container */
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
}

.page-title {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-title p {
  color: #b3b3b3;
  font-size: 0.95rem;
  line-height: 1.6;
}

.page-title p a {
  color: #ff0043;
  text-decoration: none;
  font-weight: 500;
}

.page-title p a:hover {
  text-decoration: underline;
}


/* Grid Layout */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.download-item {
  background-color: #111;
  border: 1px solid #222;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.download-item:hover {
  border-color: #ff0043;
  transform: translateY(-4px);
}

.item-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #222 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.9rem;
  overflow: hidden;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.item-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.item-description {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.item-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
}

.download-btn {
  display: inline-block;
  background-color: #ff0043;
  color: #fff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s;
  text-align: center;
  width: 100%;
}

.download-btn:hover {
  background-color: #c0392b;
}

.download-btn:active {
  background-color: #a93226;
}

/* pagination container styling */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination-btn {
  background-color: #111;
  color: #fff;
  border: 1px solid #222;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #ff0043;
  color: #ff0043;
}

.pagination-btn.active {
  background-color: #ff0043;
  border-color: #ff0043;
  color: #fff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading {
  color: #666;
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
}

/* Footer */
footer {
  background-color: #0a0a0a;
  border-top: 1px solid #222;
  padding: 2rem;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }

  main {
    padding: 2rem 1rem;
  }

  .page-title h1 {
    font-size: 1.5rem;
  }

  .downloads-grid {
    grid-template-columns: 1fr;
  }
}
