/* GUI Assets Page Styling */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-image: url("../../images/bg/faqcloset.webp");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: #ffffff;
  overflow-y: auto;
}

/* Dark overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

main {
  padding: 80px 20px;
}

/* Main Container */
#gui-container {
  max-width: 1400px;
  margin: 60px auto;
  padding: 45px 35px;
  background: linear-gradient(145deg, rgba(30, 30, 40, 0.92), rgba(45, 45, 60, 0.92));
  border-radius: 20px;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: fadeIn 1s ease;
}

/* Header Section */
.gui-header {
  text-align: center;
  margin-bottom: 50px;
}

.gui-header h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff, #ff69b4, #ff1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 105, 180, 0.7);
  letter-spacing: 1px;
  font-weight: 800;
}

.gui-tagline {
  max-width: 850px;
  margin: 0 auto;
  font-size: 1.25rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* Subcategory Navigation */
.subcategory-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.subcategory-btn {
  padding: 12px 25px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 25px;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

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

.subcategory-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  border-color: rgba(255, 105, 180, 0.5);
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

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

.subcategory-btn.active {
  background: linear-gradient(135deg, #ff69b4, #ff1493);
  border: 2px solid rgba(255, 105, 180, 0.7);
  box-shadow: 
    0 6px 25px rgba(255, 105, 180, 0.5),
    0 0 30px rgba(255, 20, 147, 0.3);
  transform: translateY(-2px);
}

/* Section Styling */
.asset-section {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  margin-bottom: 60px;
}

.asset-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  margin-bottom: 30px;
  position: relative;
  text-align: center;
}

.section-header h2 {
  font-size: 2.2rem;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 105, 180, 0.5);
  margin-bottom: 15px;
}

.section-line {
  height: 3px;
  width: 100px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 105, 180, 0.7),
    rgba(255, 255, 255, 0)
  );
  margin: 0 auto;
}

/* Search and Filter */
.search-filter-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 0 auto 35px;
  width: 100%;
  max-width: 900px;
  align-items: stretch;
}

.search-box {
  display: flex;
  gap: 12px;
  width: 100%;
}

.search-box input {
  flex: 1;
  padding: 14px 22px;
  border: 2px solid rgba(255, 105, 180, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.05rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.search-box input:focus {
  outline: none;
  border-color: #ff69b4;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 
    0 0 20px rgba(255, 105, 180, 0.6),
    0 4px 15px rgba(255, 105, 180, 0.3);
  transform: translateY(-2px);
}

.search-box button {
  padding: 14px 32px;
  background: linear-gradient(135deg, #ff69b4, #ff1493);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-width: fit-content;
}

.search-box button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.search-box button:hover {
  background: linear-gradient(135deg, #ff83c3, #ff359a);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 25px rgba(255, 105, 180, 0.6),
    0 0 30px rgba(255, 20, 147, 0.4);
}

.search-box button:hover::before {
  left: 100%;
}

.search-box button:active {
  transform: translateY(-1px);
}

.filter-container {
  display: flex;
  gap: 16px;
  width: 100%;
}

.filter-container select {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid rgba(255, 105, 180, 0.4);
  background-color: rgba(30, 30, 40, 0.9);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095.1c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.9z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 18px top 50%;
  background-size: 13px auto;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.filter-container select option {
  background-color: #1e1e28;
  color: white;
}

.filter-container select:hover {
  background-color: rgba(255, 105, 180, 0.15);
  border-color: #ff69b4;
  transform: translateY(-2px);
}

.filter-container select:focus {
  outline: none;
  border-color: #ff69b4;
  box-shadow: 
    0 0 15px rgba(255, 105, 180, 0.5),
    0 4px 12px rgba(255, 105, 180, 0.3);
}

/* GUI Grid */
.gui-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  position: relative;
}

/* Grid refreshing animation */
.gui-grid.refreshing {
  opacity: 0.6;
  transition: opacity 0.2s ease;
  position: relative;
  animation: flash-highlight 0.5s ease-out;
}

.gui-grid.refreshing::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 105, 180, 0.3);
  border-radius: 50%;
  border-top-color: rgba(255, 105, 180, 0.8);
  animation: spin 0.8s linear infinite;
}

@keyframes flash-highlight {
  0% {
    background-color: rgba(255, 105, 180, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* GUI Card Styling */
.gui-card {
  background: rgba(30, 30, 40, 0.85);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: fadeIn 0.8s ease;
  backdrop-filter: blur(8px);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 105, 180, 0.3);
}

.gui-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 105, 180, 0.6);
}

/* GUI preview area at the top of each card */
.gui-preview {
  height: 200px;
  background: linear-gradient(
    to bottom,
    rgba(255, 105, 180, 0.2),
    rgba(30, 30, 40, 0.2)
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gui-card:hover .gui-preview {
  background: linear-gradient(
    to bottom,
    rgba(255, 105, 180, 0.3),
    rgba(30, 30, 40, 0.3)
  );
}

.gui-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Default, will be dynamically adjusted by JS */
  object-position: center;
  transition: transform 0.3s ease;
}

.gui-card:hover .gui-preview img {
  transform: scale(1.05);
}

.gui-details {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.gui-card h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  color: #ffffff;
  line-height: 1.3;
}

.gui-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.gui-author,
.gui-category,
.gui-resolution {
  color: #e0e0e0;
  font-size: 0.9rem;
  background: rgba(255, 105, 180, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

.art-controls {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.preview-button,
.download-button {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.preview-button {
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 0.9),
    rgba(255, 20, 147, 0.9)
  );
  border: none;
}

.preview-button:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 1),
    rgba(255, 20, 147, 1)
  );
  transform: translateY(-2px);
}

.download-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* No results message */
.no-results {
  text-align: center;
  padding: 40px;
  background: rgba(30, 30, 40, 0.7);
  border-radius: 12px;
  margin: 20px auto;
  max-width: 500px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 50px 0 30px;
  gap: 20px;
}

.pagination-button {
  padding: 10px 20px;
  border-radius: 5px;
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 0.8),
    rgba(255, 20, 147, 0.8)
  );
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.pagination-button:not([disabled]):hover {
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 1),
    rgba(255, 20, 147, 1)
  );
  transform: translateY(-2px);
}

.pagination-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  color: #ffffff;
  font-size: 1rem;
}

/* Modal for full-size image preview */
.preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.preview-modal.active {
  display: flex;
}

.modal-content {
  max-width: 90%;
  max-height: 80%;
  position: relative;
  animation: zoomIn 0.3s ease;
}

.modal-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 2px solid rgba(255, 105, 180, 0.5);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  background: rgba(20, 20, 30, 0.6);
}

.modal-caption {
  color: white;
  margin-top: 15px;
  font-size: 1.1rem;
  text-align: center;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  background: rgba(255, 105, 180, 0.6);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: rgba(255, 105, 180, 0.9);
  transform: rotate(90deg);
}

/* Footer Section */
.gui-footer {
  background: rgba(30, 30, 40, 0.85);
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.gui-footer h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 105, 180, 0.4);
}

.gui-footer p {
  max-width: 700px;
  margin: 0 auto 25px;
  font-size: 1.1rem;
  color: #e0e0e0;
}

.contribute-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 0.8),
    rgba(255, 20, 147, 0.8)
  );
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contribute-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 1),
    rgba(255, 20, 147, 1)
  );
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .gui-header h1 {
    font-size: 2.2rem;
  }

  .gui-tagline {
    font-size: 1rem;
  }

  .subcategory-nav {
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    margin: 0 auto 30px;
  }

  .subcategory-btn {
    width: 100%;
    padding: 10px;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .search-filter-container {
    flex-direction: column;
    gap: 15px;
  }

  .search-box,
  .filter-container {
    width: 100%;
  }

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

  .gui-card h3 {
    font-size: 1.2rem;
  }

  .gui-preview {
    height: 150px;
  }

  .gui-footer {
    padding: 30px 20px;
  }

  .gui-footer h2 {
    font-size: 1.8rem;
  }

  .gui-footer p {
    font-size: 1rem;
  }

  .contribute-button {
    width: 100%;
    padding: 12px 20px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .gui-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 2560px) {
  #gui-container {
    max-width: 1800px;
  }

  .gui-header h1 {
    font-size: 4rem;
  }

  .gui-tagline {
    font-size: 1.5rem;
    max-width: 1000px;
  }

  .subcategory-btn {
    font-size: 1.3rem;
    padding: 15px 30px;
  }

  .section-header h2 {
    font-size: 2.6rem;
  }

  .gui-grid {
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  }

  .gui-card h3 {
    font-size: 1.6rem;
  }
}
