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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
  color: #fff;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 50px;
  padding: 80px 0 30px 0;
  border-bottom: 2px solid #333;
  position: relative;
}

.home-link {
  position: absolute;
  top: 30px;
  left: 0;
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  background: #111;
  border: 2px solid #333;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.home-link:hover {
  background: #222;
  border-color: #555;
  transform: translateY(-2px);
}

h1 {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 8px;
  margin-bottom: 30px;
  text-transform: uppercase;
  color: #fff;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.filter-group label {
  font-size: 0.9rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.filter-buttons {
  display: flex;
  gap: 10px;
}

.filter-btn {
  padding: 10px 25px;
  background: #111;
  color: #fff;
  border: 2px solid #333;
  cursor: pointer;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover {
  background: #222;
  border-color: #555;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.filter-btn.active:hover {
  background: #f0f0f0;
}

main {
  padding: 20px 0;
}

.patches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.patch-card {
  background: #0a0a0a;
  border: 2px solid #222;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.patch-card:hover {
  transform: translateY(-5px);
  border-color: #555;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}

.patch-card.hidden {
  display: none;
}

.patch-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #111;
  display: block;
}

.patch-info {
  padding: 20px;
  overflow-x: visible;
}

.patch-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.4;
}

.patch-description {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 15px;
  line-height: 1.6;
  white-space: pre-line;
}

.patch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #222;
}

.meta-tag {
  font-size: 0.8rem;
  padding: 5px 12px;
  background: #1a1a1a;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.patch-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.patch-card.expanded .patch-details {
  max-height: 500px;
  padding: 20px;
}

.download-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.download-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: #111;
  border: 2px solid #333;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.download-option::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
  transition: width 0.3s ease;
}

.download-option:hover::before {
  width: 100%;
}

.download-option:hover {
  background: #1a1a1a;
  border-color: #555;
  transform: translateX(5px);
}

.download-option span {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.download-option .option-icon {
  font-size: 1rem;
  opacity: 0.8;
  font-weight: 300;
}

.download-option .icon {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.7;
}

.loading {
  text-align: center;
  padding: 50px;
  color: #888;
  font-size: 1.2rem;
}

.language-selector {
  position: absolute;
  top: 30px;
  right: 0;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.language-selector button {
  background: #111;
  color: #fff;
  border: 2px solid #333;
  padding: 10px 15px;
  cursor: pointer;
  font-size: rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.language-selector button:hover {
  background: #222;
  border-color: #555;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
    letter-spacing: 4px;
  }

  .patches-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .filters {
    gap: 20px;
  }

  .filter-buttons {
    flex-direction: column;
    width: 100%;
  }
}
