@layer base {
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
}

.logo-icon {
  animation: faviconSpin 6s infinite ease-out;
}

@keyframes faviconSpin {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#carouselContainer::-webkit-scrollbar {
  display: none;
}

#carouselContainer {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-item {
  flex: 0 0 auto;
  width: 180px;
  height: 225px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f0f0f0;
  cursor: pointer;
  transition: transform 0.2s;
}

.carousel-item:hover {
  transform: scale(1.02);
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 480px) {
  .carousel-item {
    width: 150px;
    height: 190px;
  }
}

.image-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal-overlay.active {
  opacity: 1;
}

.image-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  background-color: #ffffff;
  border-radius: 0;
  overflow: hidden;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.image-modal-overlay.active .image-modal-content {
  transform: scale(1);
}

.image-modal-header {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px;
  z-index: 10;
  pointer-events: none;
}

.image-modal-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #000000;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: background-color 0.2s;
}

.image-modal-close-btn:hover {
  background-color: #333333;
}

.image-modal-close-btn svg {
  width: 20px;
  height: 20px;
}

.image-modal-image-container {
  width: 100%;
  padding-top: 75%;
  position: relative;
  background-color: #ffffff;
}

.image-modal-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #ffffff;
}

.carousel-empty-message {
  padding: 20px;
  text-align: center;
  color: #666;
}

.camera-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.camera-modal-video-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.camera-modal-notice {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(60, 60, 60, 0.9);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.camera-modal-notice svg {
  width: 20px;
  height: 20px;
  color: white;
}

.camera-modal-notice span {
  color: white;
  font-size: 14px;
  font-weight: 500;
}

.camera-modal-video {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  width: auto;
  height: auto;
}

.camera-modal-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 40px;
  z-index: 10;
}

.camera-modal-btn {
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}

.camera-modal-btn:hover {
  transform: scale(1.1);
}

.camera-modal-close-btn {
  width: 56px;
  height: 56px;
  background: white;
  color: #333;
}

.camera-modal-close-btn svg {
  width: 24px;
  height: 24px;
}

.camera-modal-capture-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  border: none;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease;
}

.camera-modal-capture-btn::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid #000;
}

.camera-modal-capture-btn:active {
  transform: scale(0.96);
}

.camera-modal-capture-btn:active::before {
  inset: 12px;
}

.camera-modal-switch-btn {
  width: 56px;
  height: 56px;
  background: white;
  color: #333;
}

.camera-modal-switch-btn img {
  width: 24px;
  height: 24px;
}

.photo-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.photo-preview-wrapper {
  position: relative;
  display: inline-block;
  max-width: 280px;
  width: 100%;
}

.photo-preview-image {
  max-width: 100%;
  max-height: 280px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  object-fit: contain;
  display: block;
  width: 100%;
}

.photo-preview-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.7);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.2s;
  z-index: 10;
}

.photo-preview-remove-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.photo-preview-remove-btn svg {
  width: 18px;
  height: 18px;
}

.try-on-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.try-on-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

.try-on-btn:hover img {
  filter: brightness(0);
}

.try-on-btn img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  transition: filter 0.2s;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
}

.loading-text {
  margin-bottom: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1976d2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.result-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 20px;
}

.result-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.result-modal-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
}

.result-modal-close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  background: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

@media (max-width: 480px) {
  .image-modal-content {
    width: 95%;
  }

  .image-modal-header {
    padding: 16px;
  }
}
