/* ==========================================
   Global Reset & Layout
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
/* ==========================================
   Disable Text Selection & Focus Highlights
   ========================================== */
  -webkit-user-select: none; /* Chrome, Safari, Edge */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* Standard */
  -webkit-tap-highlight-color: transparent; /* Remove mobile tap highlight */
}

html, body {
  background: var(--main-bg);
  color: var(--text-color);
  height: 100%;
  display: flex;
  flex-direction: column;
  background-image: var(--main-bg);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 1365px auto;
}

/* ==========================================
   Links
   ========================================== */
a, a:visited {
  color: var(--link-color);
  text-decoration: none;
}
a:focus { outline: none; }

/* ==========================================
   Header & Navigation
   ========================================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--header-bg);
  padding: 10px 20px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

header a, footer a {
  margin: 0 10px;
  color: var(--link-color);
  font-family: monospace;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s, text-decoration 0.3s;
}
header a:hover, footer a:hover {
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
}

header img {
  width: 28px;
  height: 28px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================
   Page Controls
   ========================================== */
.pages-anchor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.pages-anchor button {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pages-anchor button img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.pages-anchor button:hover img {
  transform: scale(1.2);
}

.pages-anchor .page-indicator {
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--link-color);
  font-family: monospace;
  user-select: none;
}

/* ==========================================
   Profile & Dashboard
   ========================================== */
#pfp {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.25s ease;
  object-fit: cover;
}
#pfp:hover { transform: scale(1.1); }

#dashboardBtn {
  width: 36px;
  background: none;
  border: none;
  color: var(--link-color);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.25s ease;
}
#dashboardBtn:hover { transform: scale(1.1); }

.dashboard-menu {
  position: fixed;
  top: 60px;
  right: 20px;
  background: var(--menu-bg);
  border-radius: 10px;
  display: none;
  flex-direction: column;
  min-width: 200px;
  padding: 10px 0;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.dashboard-menu a {
  padding: 10px 16px;
  color: var(--link-color);
  font-family: monospace;
  text-decoration: none;
  display: block;
  transition: color 0.3s, background 0.3s;
}
.dashboard-menu a:hover {
  color: var(--accent-color);
  background: rgba(255,255,255,0.1);
}
.dashboard-menu p {
  padding: 10px 16px;
  font-family: monospace;
  color: var(--link-color);
  font-weight: bold;
  text-decoration: none;
  display: block;
  cursor: default;
  transition: color 0.3s, text-decoration 0.3s, background 0.3s;
}

.dashboard-menu p:hover {
  color: var(--accent-color);
  background: rgba(255,255,255,0.1);
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
}


/* ==========================================
   Search Bar
   ========================================== */
.search-box {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--input-bg);
  border-radius: 25px;
  padding: 4px 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: box-shadow 0.2s;
}
.search-box:focus-within { box-shadow: 0 4px 12px rgba(0,0,0,0.25); }

.search-box input {
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--input-text);
  font-family: monospace;
  font-size: 14px;
  flex: 1;
}
.search-box input::placeholder { color: var(--input-placeholder); }

.search-box button {
  padding: 6px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: var(--search-btn-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, filter 0.2s;
}
.search-box button:hover { transform: scale(1.1); filter: brightness(1.2); }
.search-box button img { width: 14px; height: 14px; }

.search-error {
  display: none;
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff4d4d;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
}

#searchFeedback {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  text-align: center;
}
#searchFeedback img {
  max-height: 120px;
  border-radius: 8px;
}
.search-box input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

/* ==========================================
   Grid Layout (Fixed Single Row Stretch)
   ========================================== */
#container,
#container-discov {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  justify-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--main-bg);
  flex-grow: 1;
  min-height: 0;
  align-content: start;
}

/* ==========================================
   Asset Cards
   ========================================== */
#container div,
#container-discov div {
  width: 180px;
  min-height: 160px;
  background: var(--card-bg);
  text-align: center;
  border-radius: 20px;
  padding-top: 8px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

#container div:hover,
#container-discov div:hover {
  transform: scale(1.05);
}

#container div img,
#container-discov div img {
  width: 130px;       /* control size without forcing width */
  height: auto;
  display: block;
  margin: 0 auto 0px; 
  border-radius: 14px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

#container div img:hover,
#container-discov div img:hover {
  transform: scale(1.05);
}

@media (max-width: 600px) {
  #container div img,
  #container-discov div img {
    max-width: 75%;      /* scales cleanly on small screens */
  }
}

/* ==========================================
   Card Text
   ========================================== */
#container div h3,
#container div p,
#container-discov div h3,
#container-discov div p {
  color: var(--link-color);
  font-family: monospace;
  font-size: 0.9rem;
  transition: color 0.3s, text-decoration 0.3s;
}
#container div h3:hover,
#container div p:hover,
#container-discov div h3:hover,
#container-discov div p:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* ==========================================
   SOON Status (Classic)
   ========================================== */
.soon {
  position: relative;
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(100%);
}
.soon::after {
  content: "COMING SOON";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 4px #000;
  z-index: 3;
}
.soon:hover {
  border: 2px solid #ff0000;
  box-shadow: 0 0 10px #ff0000;
}
.soon img {
  filter: grayscale(100%);
  opacity: 0.7;
}

/* ==========================================
   Utility Elements
   ========================================== */
embed {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}

/* Back to Top */
#toTopBtn {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  padding: 10px 16px;
  font-size: 14px;
  font-family: monospace;
  border: none;
  border-radius: 8px;
  background: var(--header-bg);
  color: var(--link-color);
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  opacity: 0.6;
  transition: opacity 0.3s, color 0.3s;
}
#toTopBtn:hover {
  opacity: 0.8;
  color: var(--accent-color);
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: auto;
  background: var(--footer-bg);
  text-align: center;
  padding: 30px;
  width: 100%;
  font-family: monospace;
  color: var(--link-color);
  box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
}

/* ==========================================
   Preloader Progress Bar
   ========================================== */
.load-progress-text {
  font-family: monospace;
  color: white;
  text-align: center;
  margin-top: 10px;
}
.load-progress-bar {
  width: 80%;
  height: 8px;
  margin: 10px auto;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
}
.load-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  transition: width 0.3s ease;
}

/* ==========================================
   Sort Mode Buttons
   ========================================== */
.theme-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.theme-btn {
  padding: 10px 16px;
  border: 2px solid var(--accent-color);
  background: var(--header-bg);
  color: var(--text-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.theme-btn:hover {
  transform: scale(1.05);
  background: var(--accent-color);
  color: #fff;
}
.theme-btn.active {
  background: var(--accent-color);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-color);
}

/* ==========================================
   FIX Status (Grey Base + Transparent Overlay)
   ========================================== */
.fix {
  position: relative;
  pointer-events: none;
  filter: grayscale(100%);
  opacity: 0.8;
}

.fix img {
  filter: grayscale(100%);
  opacity: 0.9;
  background: #808080; /* grey base */
  mix-blend-mode: multiply;  /* makes the grey blend smoothly */
}

/* Transparent overlay */
.fix::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(128, 128, 128, 0.2); /* ~20% transparent grey overlay */
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
}

/* Optional hover feedback (red border for visibility) */
.fix:hover {
  border: 2px solid #ff0000;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

input, textarea {
  -webkit-user-select: text; /* Allow typing and selecting inside inputs */
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

a, button, input, textarea {
  outline: none !important;
}
/* ==========================================
   Status Overlays: Featured / New / Fixed
   ========================================== */
.asset-link img.status-overlay {
  position: absolute;
  top: 0;
  padding-left: 20px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 1; /* full 100% */
  transition: opacity 0.25s ease; /* remove transform scaling */
  border-radius: 20px;
}

.asset-link:hover img.status-overlay {
  opacity: 0.55; /* slightly less visible on hover */
  transform: none; /* ensure it doesn't scale */
}

/* Optional: fix new/fixed/featured overlay z-index if needed */
.asset-link img.status-overlay.overlay-featured,
.asset-link img.status-overlay.overlay-new,
.asset-link img.status-overlay.overlay-fixed {
  z-index: 2;
}

/* ==========================================
   SOON Status Centering Fix
   ========================================== */
.soon::after {
  content: "COMING SOON";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* exact center */
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 4px #000;
  z-index: 3;
  pointer-events: none;
}

/* Keep overlay image grayscale & opacity for 'soon' assets */
.soon img {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

.soon:hover img {
  opacity: 0.55; /* fade more when hovered */
}

    #topBar {
      display: flex;
      flex-direction: column;
      position: relative;
      z-index: 20;
      background: #1d201f;
      color: #fff;
    }

    #topBar header {
      z-index: 21;
    }

    #quoteWrapper {
      position: relative;
      width: 100vw;
      height: 30px;
      overflow: hidden;
      background: var(--quote-bg);
      color: var(--quote-text);
      display: flex;
      align-items: center;
    }

    #quoteBox {
      position: absolute;
      white-space: nowrap;
      font-weight: bold;
      background: var(--quote-bg);
      color: var(--quote-text);
      transform: translateX(100%);
      user-select: none;
      cursor: default;
      font-size: 1.0em;
      font-family: monospace;
    }
/* Show Back to Top Button */
#toTopBtn.show {
  display: block !important;
  opacity: 0.75 !important;
  pointer-events: auto !important;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  background-image: var(--main-bg);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: min(1365px, 100vw) auto;
}

#quoteBox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quote-sticker {
  width: 26px;
  height: 26px;
  object-fit: contain;
  vertical-align: middle;
  pointer-events: none;
}


html {
  height: 100%;
  background-image: var(--main-bg);
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
}

body {
  min-height: 100%;
  background: transparent;
}
/* ==========================================
   Grid Layout (Locked to 5 Columns)
   ========================================== */
#container,
#container-discov {
  display: grid;
  /* Forces exactly 5 columns regardless of screen width */
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
  gap: 15px; /* Slightly reduced gap to fit 5 items comfortably */
  padding: 20px;
  background: var(--main-bg);
  flex-grow: 1;
  min-height: 0;
  align-content: start;
}

/* ==========================================
   Asset Cards
   ========================================== */
#container div,
#container-discov div {
  width: 100%;        /* Allows card to fill the 1/5th grid column */
  max-width: 220px;   /* Keeps cards from getting too wide */
  padding: 15px 10px; /* Even padding all around */
  background: var(--card-bg);
  text-align: center;
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.2s ease;
  
  /* Flexbox keeps image and text centered vertically */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;           /* Standard gap between image, name, and author */
}

#container div:hover,
#container-discov div:hover {
  transform: scale(1.03);
}

#container div img,
#container-discov div img {
  width: 120px;       /* Slightly smaller to ensure room for text */
  height: 120px;      /* Fixed height prevents layout shifts */
  display: block;
  border-radius: 14px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

#container div img:hover,
#container-discov div img:hover {
  transform: scale(1.05);
}

/* Responsive: Switch to 2 columns on mobile so it doesn't look cramped */
@media (max-width: 800px) {
  #container, #container-discov {
    grid-template-columns: repeat(2, 1fr);
  }
}
