@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

body {
  margin: 0;
  padding: 0;
  background: #f0eeea;
  overflow: hidden;
  font-family: 'Nunito', sans-serif;
}

.closet {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  margin: 0;
  perspective: 1000px;
  position: relative;
}

.door {
  width: 50vw;
  height: 100vh;
  position: relative;
  margin: 0;
  box-sizing: border-box;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.7s ease;
  transform-origin: center;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.door-left {
  border-right: solid 5px #525252;
  transform: translateX(0);
}

.door-left img {
  transform: scaleX(-1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.door-right {
  transform: translateX(0);
  box-shadow: 
    -25px 0 25px rgba(0, 0, 0, 0.5);
}

.door-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doors-open .door-left {
  transform: translateX(-45vw);
  box-shadow: 
    20px 0 20px rgba(66, 66, 66, 0.5);
}

.doors-open .door-right {
  border-left: solid 5px #525252;
  transform: translateX(45vw);
  box-shadow: 
    -20px 0 20px rgba(66, 66, 66, 0.5);
}

.shelves {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  z-index: 500;
  padding: 0 8vw;
  gap: 0;
  box-sizing: border-box;
}

.doors-open .shelves {
  opacity: 1;
  visibility: visible;
}

.shelf {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  margin: -1.6rem 0;
}

.shelf-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  position: relative;
  padding: 1rem 2rem;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #525252;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  min-width: 50px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  z-index: 600;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.left-btn {
  margin-right: 1rem;
}

.right-btn {
  margin-left: 1rem;
}

.nav-btn:hover {
  background: rgba(82, 82, 82, 0.95);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-btn:active {
  transform: scale(0.95);
}

.shelf h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Horizontal Scrolling Shelf */
.media-scroller {
  display: grid;
  gap: 2.5rem;
  grid-auto-flow: column;
  grid-auto-columns: 17.5%;
  padding: 0 1rem 1rem;
  overflow: visible; 
  overscroll-behavior-inline: contain;
  touch-action: none; 
  width: 100%;
  flex: 1;
  scroll-behavior: smooth;
  justify-items: center; 
  align-items: center;
}
.snaps-inline {
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc(50% - 9%);
}

.snaps-inline > * {
  scroll-snap-align: center;
  scroll-snap-stop: normal;
}

.clothing-item {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: transform 0.3s ease;
  min-width: 150px;
  position: relative;
  transform: scale(0.6); 
}

.clothing-item:hover {
  transform: scale(0.65);
}

.clothing-item.is-center {
  transform: scale(1.2);
  z-index: 1;
}

.media-scroller.slide-left {
  animation: slide-left 0.25s ease;
}

.media-scroller.slide-right {
  animation: slide-right 0.25s ease;
}

@keyframes slide-left {
  from { transform: translateX(8%); }
  to { transform: translateX(0); }
}

@keyframes slide-right {
  from { transform: translateX(-8%); }
  to { transform: translateX(0); }
}

.clothing-item img {
  width: 100%;
  height: 185px;
  object-fit: contain;
}

.save-outfit-btn {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff69b4;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px 25px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
  transition: all 0.3s ease;
  z-index: 600;
}

.save-outfit-btn:hover {
  background: #ff1493;
  box-shadow: 0 6px 16px rgba(255, 105, 180, 0.6);
}

.outfit-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.outfit-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.outfit-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  animation: slideUp 0.3s ease;
}

.outfit-modal-content h2 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 1.5rem;
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #333;
}

.outfit-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 25px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

.outfit-preview-item {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.outfit-preview-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 8px;
}

.outfit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.outfit-form label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.outfit-form input[type="date"] {
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.outfit-form input[type="date"]:focus {
  outline: none;
  border-color: #ff69b4;
}

.confirm-save-btn {
  background: #ff69b4;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.confirm-save-btn:hover {
  background: #ff1493;
  transform: scale(1.02);
}

.confirm-save-btn:active {
  transform: scale(0.98);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-outfits-btn {
  position: fixed;
  top: 20px;
  right: 150px;
  background: #ff69b4;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
  transition: all 0.3s ease;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-outfits-btn:hover {
  background: #ff1493;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(255, 105, 180, 0.6);
}

.view-outfits-btn:active {
  transform: scale(0.95);
}