body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image: url('ressources/website_bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: 'Raleway', sans-serif;

}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 200px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 1rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  z-index: 999;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 1rem;
}

.sidebar a {
  color: #fff;
  text-decoration: none;
}

.sidebar:not(.collapsed) {
  transform: translateX(0);
}

.sidebar-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.8);
  border: none;
  color: #fff;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  z-index: 1000;
}


main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

/* User profile button */
.user-profile {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  background-color: #2e8eff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s;
  z-index: 1100;
  border: none;
}

.user-profile:hover,
.user-profile:focus {
  background-color: #1a6ed8;
  box-shadow: 0 0 10px rgba(46, 142, 255, 0.5);
  transform: scale(1.05);
  outline: none;
}

.user-profile i {
  font-size: 1.5rem;
}

.user-profile img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 600px) {
  .user-profile {
    width: 40px;
    height: 40px;
  }
}

/* From Uiverse.io by e-coders */
button {
  appearance: none;
  background-color: #fafbfc;
  border: 1px solid rgba(27, 31, 35, 0.15);
  border-radius: 6px;
  box-shadow:
    rgba(27, 31, 35, 0.04) 0 1px 0,
    rgba(255, 255, 255, 0.25) 0 1px 0 inset;
  box-sizing: border-box;
  color: #24292e;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  list-style: none;
  padding: 6px 16px;
  position: relative;
  transition: background-color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  white-space: nowrap;
  word-wrap: break-word;
}

button:hover {
  background-color: #f3f4f6;
  text-decoration: none;
  transition-duration: 0.1s;
}

button:disabled {
  background-color: #fafbfc;
  border-color: rgba(27, 31, 35, 0.15);
  color: #959da5;
  cursor: default;
}

button:active {
  background-color: #edeff2;
  box-shadow: rgba(225, 228, 232, 0.2) 0 1px 0 inset;
  transition: none 0s;
}

button:focus {
  outline: 1px transparent;
}

button:before {
  display: none;
}

button:-webkit-details-marker {
  display: none;
}


.content-box {
  width: 100%;
  max-width: 400px;
  background-color: rgba(211, 211, 211, 0.2);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.app-banner {
  width: 100%;
  max-width: 800px;
  background-color: rgba(211, 211, 211, 0.2);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  overflow: hidden;
  max-height: 1000px;
  opacity: 1;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.app-banner.collapsed {
  max-height: 0;
  opacity: 0;
}


.app-banner .banner-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.item-details {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 8px;
  max-width: 300px;
  z-index: 1000;
}

.item-details.show {
  display: block;
}

.app-banner .timeline {
  width: 100%;
  max-width: 100%;
  height: auto;
}


.app-banner .timeline rect {
  fill: rgba(50, 50, 50, 0.8);
  stroke: #241d47;
  stroke-width: 2;
  rx: 8;
  ry: 8;
}

.app-banner .timeline text {
  fill: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);

}

.app-banner .timeline line {
  stroke: #241d47;
  stroke-width: 2;

}

.skin-container {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  max-height: 1000px;
  opacity: 1;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.skin-container.collapsed {
  max-height: 0;
  opacity: 0;
  flex: 0;
}

.social-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.social-links a {
  font-size: 2rem;
  text-decoration: none;
}

.social-links a.spotify {
  color: #1DB954;
}

.social-links a.discord {
  color: #5865F2;
}

.social-links a.github {

  color: #fff;

}

/* Minecraft Skin Viewer */
.mc-skin-viewer {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 0.5rem;
  width: 100%;
  justify-items: center;
  align-items: center;
}

.mc-skin-viewer .mcsv-toolbar {
  display: flex;
  justify-content: flex-end;
}

.mc-skin-viewer .mcsv-toolbar button {
  padding: 0.25rem 0.5rem;
}

.mc-skin-viewer .mcsv-canvas-wrap {
  position: relative;
  width: 200px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mc-skin-viewer .mcsv-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.mc-skin-viewer .mcsv-error {
  color: #b00020;
  font-size: 0.9rem;
  text-align: center;
}

.mc-skin-viewer .mcsv-error[hidden] {
  display: none;
}

/* Item database search */
.item-search {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  position: relative;
}

.item-results {
  display: none;
  width: 100%;
  padding: 0 1rem 1rem;
  box-sizing: border-box;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;

}

.item-results .item {
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;

}

.item-search .search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #241d47;
  pointer-events: none;
}

.item-search .search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;

  border: none;
  border-radius: 25px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
}

.item-search .search-input:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(36, 29, 71, 0.8);
}

.item-search .filter-button {
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #241d47;
}

.item-search .filter-hover {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 1rem;
  margin-left: 0.5rem;
  display: none;
  flex-direction: row;
  gap: 0.5rem;
  color: #241d47;
}

.item-search .filter-hover.show {
  display: flex;
}

.item-search .filter-hover .filter-category {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.item-search .filter-hover .filter-category + .filter-category {
  margin-left: 1rem;
}

.item-search .filter-hover .filter-category legend {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.item-search .filter-hover .filter-category label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.item-search .filter-hover .filter-category label input {
  display: none;
}

.item-search .filter-hover .filter-category label.selected {
  background: rgba(0, 255, 255, 0.25);
}

/* Add Item Overlay */
.add-item-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.add-item-overlay.show {
  display: flex;
}

.add-item-popup {
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  border-radius: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #241d47;
}

.add-item-popup .close-popup {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: red;
  font-size: 1.2rem;
  cursor: pointer;
}

.add-item-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.add-item-form .save-item-button {
  align-self: flex-end;
}

@media (max-width: 768px) {
  .content-box,
  .app-banner {
    width: 100%;
    max-width: 100%;
  }

  .social-links {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: fixed;
  }

  .sidebar-toggle {
    top: 0.5rem;
    left: 0.5rem;
    padding: 1rem;
    font-size: 1.5rem;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open main {
    filter: blur(2px);
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }

  .content-box,
  .app-banner {
    padding: 0.5rem;
  }

  .social-links a {
    font-size: 1.5rem;
  }
}

