@import url(global.css);

.container {
  max-width: 100%;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 5rem;
}

h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.subtitle {
  font-size: 1.2rem;
}

.card {
  background: var(--darkred);
  padding: 1.5rem;
  border: 2px dashed var(--yellow);
}

.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3rem;
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0;

  /* Hide scrollbar */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

.carousel-track::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
  width: 0;
  height: 0;
  background: transparent;
  -webkit-appearance: none;
}

.carousel-track.dragging {
  cursor: grabbing;
  user-select: none;
  /* prevents text selection */
  -webkit-user-select: none;
  -ms-user-select: none;
}

.carousel-track {
  cursor: grab;
  user-select: none;
  /* optional: prevents selection by default */
  -webkit-user-select: none;
  -ms-user-select: none;
}

.carousel-slide {
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.5;

  /* Keep slide square */
  width: 200px;
  height: 200px;

  /* Visual improvements */
  border: 2px dashed var(--darkred);
  padding: 8px;

  /* Center preview + text */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  /* Ensure nothing spills out */
  overflow: hidden;
}


.carousel-slide:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1.1);
}

.carousel-slide p {
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.grid-preview {
  display: grid;
  gap: 2px;
  padding: 6px;
  border-radius: 8px;
  width: 120px;
  /* fixed width */

  /* Preview becomes taller/shorter automatically to keep cells square */
  grid-template-columns: repeat(var(--cols), 1fr);

  
}



/* SQUARE CELLS */
.preview-cell {
  background: var(--darkred);
  border-radius: 2px;
  aspect-ratio: 1 / 1;
  /* <-- Forces perfect squares */
}

.search-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#searchInput {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.986);
  border-radius: 0.5rem;
  color: rgb(0, 0, 0);
  font-size: 1.5rem;
}

#searchInput::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
  font-weight: bold;
}

.btn-search {
  background: var(--yellow);
  color: var(--darkred);
}

.btn-download {
  background: var(--yellow);
  color: var(--darkred);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#searchResults {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 1rem;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

.album-result {
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

.album-result:hover {
  transform: scale(1.05);
}

.album-result img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.album-result p {
  color: white;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.grid-header h2 {
  color: white;
  font-size: 1.5rem;
}

#albumGrid {
  display: grid;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.grid-slot {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-slot.empty {
  color: rgba(255, 255, 255, 0.3);
  font-size: 2rem;
}

.grid-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #80221c;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding: 0;
}

.grid-slot:hover .remove-btn {
  display: flex;
}

.remove-btn:hover {
  background: #a82a2a;
}

.hidden {
  display: none;
}


.vinyl-box {
  position: relative;
  width: 450px;
  height: 450px;
}

.square {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #630437 0%, var(--darkred) 100%);
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  cursor: pointer;
  z-index: 3;

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.rectangle {
  position: absolute;
  top: 0;
  left: 450px;
  width: 0;
  height: 450px;
  background-color: var(--yellow);
  border-radius: 0 20px 20px 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
  z-index: 2;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding-top: 5px;
  padding-bottom: 5px;
}

.vinyl-box:hover .rectangle {
  width: 150px;
}

.slide-image {
  position: absolute;
  top: 0;
  left: 450px;
  width: 450px;
  height: 450px;

  border-radius: 0 20px 20px 0;

  transform: translateX(-90%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
  z-index: 1;
}

.vinyl-box:hover .slide-image {
  transform: translateX(0);
}

.vinyl-spin {
  width: 100%;
  height: 100%;
  background: url('images/vinyl-final.svg') center/cover no-repeat;
  border-radius: 0 20px 20px 0;

 
  animation: spin 12s linear infinite;
}

/* Spin animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.icon {
  width: 100px;
  height: 100px;
  background: yellow;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: filter 0.25s, box-shadow 0.25s;
}

.twitter-icon {
  background:
    rgba(255, 255, 0, 0) url("data:image/svg+xml;utf8,\
        <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' id='Logo-Social-Media-Twitter-Circle--Streamline-Pixel' height='64' width='64'>\
        <g>\
        <path d='M3.04 45.72h3.04v6.08h3.06v3.06h3.04v3.04h6.1v3.06h6.1V64h15.24v-3.04h6.08v-3.06h6.1v-3.04h3.04V51.8h3.06v-6.08h3.04v-6.1H64v-15.24h-3.06V18.28h-3.04V12.18h-3.06V9.14H51.8V6.1h-6.1V3.04h-6.08V0h-15.24v3.04H18.28v3.06H12.18v3.04H9.14v3.04H6.08v6.1H3.04v6.1H0v15.24h3.04ZM15.22 18.28h3.06v3.06h3.04v3.04h3.06v3.04h6.08V18.28h3.06V15.24h12.18v3.04h3.06v6.1h6.08v3.04H51.8v3.06h-3.04v9.14h-3.06v6.1h-3.04v3.04h-3.04v3.04H18.28v-3.04h3.04v-3.04h3.06v-3.06h3.04v-3.04h-6.1v-3.04H18.28v-3.06H15.22Z' fill='%238e1606'></path>\
        <path d='M39.62 21.34h6.08v6.08h-6.08Z' fill='%238e1606'></path>\
        </g>\
        </svg>") center/80% no-repeat;
}

.discord-icon {
  background:
    rgba(255, 255, 0, 0) url("data:image/svg+xml;utf8,\
        <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' id='Logo-Discord--Streamline-Pixel' height='64' width='64'>\
        <g>\
        <path d='M60.94 18.28h-3.04V12.18h-3.06V9.14H51.8V6.1h-6.1V3.04h-6.08V0h-15.24v3.04H18.28v3.06H12.18v3.04H9.14v3.04H6.08v6.1H3.04v6.1H0v15.24h3.04v6.1h3.04v6.08h3.06v3.06h3.04v3.04h6.1v3.06h6.1V64h15.24v-3.04h6.08v-3.06h6.1v-3.04h3.04V51.8h3.06v-6.08h3.04v-6.1H64v-15.24h-3.06Zm-3.04 24.38h-3.06v3.06H51.8v3.04h-3.04v3.04h-12.2v-3.04h9.14v-6.1H18.28v6.1h9.14v3.04h-12.2v-3.04H12.18v-3.04H9.14v-3.06H6.08v-15.24h3.06v-6.08h3.04V18.28h3.04V15.24h12.2v3.04h9.14V15.24h12.2v3.04h3.04v3.06h3.04v6.08h3.06Z' fill='%238e1606' stroke-width='2'></path>\
        <path d='M36.56 27.42h6.1v6.1h-6.1Z' fill='%238e1606' stroke-width='2'></path>\
        <path d='M21.32 27.42h6.1v6.1h-6.1Z' fill='%238e1606' stroke-width='2'></path>\
        </g>\
        </svg>") center/80% no-repeat;
}

.facebook-icon {
  background:
    rgba(255, 255, 0, 0) url("data:image/svg+xml;utf8,\
        <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' id='Logo-Social-Media-Facebook-Circle--Streamline-Pixel' height='64' width='64'>\
        <path d='m60.94 19.81 -3.04 0 0 -6.1 -3.06 0 0 -3.04 -3.04 0 0 -3.06 -6.1 0 0 -3.04 -6.08 0 0 -3.04 -15.24 0 0 3.04 -6.1 0 0 3.04 -6.1 0 0 3.06 -3.04 0 0 3.04 -3.06 0 0 6.1 -3.04 0 0 6.1 -3.04 0 0 15.22 3.04 0 0 6.1 3.04 0 0 6.1 3.06 0 0 3.04 3.04 0 0 3.06 6.1 0 0 3.04 9.14 0 0 -21.34 -9.14 0 0 -9.14 9.14 0 0 -12.18 3.04 0 0 -3.06 15.24 0 0 9.16 -9.14 0 0 6.08 12.2 0 0 3.06 -3.06 0 0 3.04 -3.04 0 0 3.04 -6.1 0 0 21.34 9.14 0 0 -3.04 6.1 0 0 -3.06 3.04 0 0 -3.04 3.06 0 0 -6.1 3.04 0 0 -6.1 3.06 0 0 -15.22 -3.06 0 0 -6.1z' fill='%238e1606'/>\
        </svg>") center/80% no-repeat;
}

.instagram-icon {
  background:
    rgba(255, 255, 0, 0) url("data:image/svg+xml;utf8,\
        <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' id='Logo-Social-Media-Instagram-Circle--Streamline-Pixel' height='64' width='64'>\
        <g>\
        <path d='M3.04 45.72h3.04v6.08h3.06v3.06h3.04v3.04h6.1v3.06h6.1V64h15.24v-3.04h6.08v-3.06h6.1v-3.04h3.04V51.8h3.06v-6.08h3.04v-6.1H64v-15.24h-3.06V18.28h-3.04V12.18h-3.06V9.14H51.8V6.1h-6.1V3.04h-6.08V0h-15.24v3.04H18.28v3.06H12.18v3.04H9.14v3.04H6.08v6.1H3.04v6.1H0v15.24h3.04Zm3.04-21.34h3.06V18.28h3.04V15.24h3.04V12.18h3.06V9.14h6.1V6.1h15.24v3.04h6.08v3.04h3.06v3.06h3.04v3.04h3.04v6.1h3.06v15.24h-3.06v6.1H51.8v3.04h-3.04v3.04h-3.06v3.06h-6.08v3.04h-15.24v-3.04H18.28V51.8H15.22v-3.04H12.18v-3.04H9.14v-6.1H6.08Z' fill='%238e1606' stroke-width='2'></path>\
        <path d='m54.84 30.48 -9.14 0 0 9.14 -3.04 0 0 3.04 -3.04 0 0 3.06 -3.06 0 0 3.04 -9.14 0 0 -3.04 -3.04 0 0 -3.06 -3.06 0 0 -3.04 -3.04 0 0 -9.14 -9.14 0 0 9.14 3.04 0 0 6.1 3.04 0 0 3.04 3.06 0 0 3.04 6.1 0 0 3.06 15.24 0 0 -3.06 6.08 0 0 -3.04 3.06 0 0 -3.04 3.04 0 0 -6.1 3.04 0 0 -9.14z' fill='%238e1606' stroke-width='2'></path>\
        <path d='m27.42 42.66 9.14 0 0 -3.04 3.06 0 0 -9.14 -3.06 0 0 6.1 -6.1 0 0 -6.1 6.1 0 0 -3.06 -9.14 0 0 3.06 -3.04 0 0 9.14 3.04 0 0 3.04z' fill='%238e1606' stroke-width='2'></path>\
        <path d='m24.38 27.42 0 -3.04 3.04 0 0 -3.04 9.14 0 0 3.04 3.06 0 0 3.04 15.22 0 0 -3.04 -3.04 0 0 -6.1 -3.04 0 0 -3.04 -3.06 0 0 6.1 -6.08 0 0 -6.1 6.08 0 0 -3.06 -6.08 0 0 -3.04 -15.24 0 0 3.04 -6.1 0 0 3.06 -3.06 0 0 3.04 -3.04 0 0 6.1 -3.04 0 0 3.04 15.24 0z' fill='%238e1606' stroke-width='2'></path>\
        </g>\
        </svg>") center/80% no-repeat;
}

.tiktok-icon {
  background:
    rgba(255, 255, 0, 0) url("data:image/svg+xml;utf8,\
        <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' id='Logo-Social-Media-Tiktok-Circle--Streamline-Pixel' height='64' width='64'>\
        <g>\
        <path d='M60.94 18.28h-3.04V12.18h-3.06V9.14H51.8V6.1h-6.1V3.04h-6.08V0h-15.24v3.04H18.28v3.06H12.18v3.04H9.14v3.04H6.08v6.1H3.04v6.1H0v15.24h3.04v6.1h3.04v6.08h3.06v3.06h3.04v3.04h6.1v3.06h6.1V64h15.24v-3.04h6.08v-3.06h6.1v-3.04h3.04V51.8h3.06v-6.08h3.04v-6.1H64v-15.24h-3.06Zm-3.04 12.2h-3.06v3.04h-9.14v15.24h-3.04v3.04h-3.04v3.06h-3.06v3.04h-15.24v-3.04H18.28V51.8H15.22v-3.04H12.18v-6.1H9.14v-12.18h3.04v-3.06h3.04v-3.04h12.2v9.14h-3.04v9.14h6.08V9.14h3.06V6.1h6.1v3.04h3.04v3.04h3.04v3.06h3.06v3.04h6.08v3.06h3.06Z' fill='%238e1606' stroke-width='2'></path>\
        <path d='m18.28 27.42 0 3.06 -3.06 0 0 12.18 3.06 0 0 6.1 3.04 0 0 3.04 15.24 0 0 -3.04 3.06 0 0 -24.38 6.08 0 0 3.04 9.14 0 0 -6.08 -6.08 0 0 -3.06 -3.06 0 0 -3.04 -3.04 0 0 -3.06 -3.04 0 0 -3.04 -6.1 0 0 33.52 -3.06 0 0 3.06 -6.08 0 0 -3.06 -3.06 0 0 -9.14 3.06 0 0 -6.1 -6.1 0z' fill='%238e1606' stroke-width='2'></path>\
        </g>\
        </svg>") center/80% no-repeat;
}