/* For screens over 1600 pixels */
@media (max-width: 1600px) {
  html {
    margin: 0;
  }

  body {
    padding: 0;
  }
}

@media screen and (max-width: 700px) {
  html {
    font-size: 16px;
  }
}

html {
  all: unset;
  margin: 0;
  padding: 0;
  display: block;
}

body {
  all: unset;
  background: var(--background);
  font-family: var(--font-main), sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  /* max-width: 100dvw;
  min-width: 100dvw; */
  height: 100dvh;
  min-height: 100dvh;
  display: block;
  padding: 0;
}

div.root#root {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  padding: 0;
  margin: 0;
}

.toast-container {
  visibility: hidden;
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s;
}

[data-theme="dark"] .toast-container {
  background: rgba(18, 18, 18, 0.85);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

.toast-container.show {
  visibility: visible;
  transform: translateX(0);
  opacity: 1;
}

.toast-container.hide {
  visibility: visible;
  transform: translateX(120%) scale(0.95);
  opacity: 0;
}

/* Success status styles */
.toast-container.success {
  border: 1px solid rgba(16, 185, 129, 0.2);
}
[data-theme="dark"] .toast-container.success {
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.toast-container.success .toast-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}
[data-theme="dark"] .toast-container.success .toast-icon {
  background: rgba(16, 185, 129, 0.2);
}

/* Error status styles */
.toast-container.error {
  border: 1px solid rgba(236, 75, 25, 0.2);
}
[data-theme="dark"] .toast-container.error {
  border: 1px solid rgba(236, 75, 25, 0.35);
}
.toast-container.error .toast-icon {
  background: rgba(236, 75, 25, 0.1);
  color: var(--error-color);
}
[data-theme="dark"] .toast-container.error .toast-icon {
  background: rgba(236, 75, 25, 0.2);
}

/* Toast Inner Content Layout */
.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  position: relative;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.toast-container:hover .toast-icon {
  transform: scale(1.05);
}

.toast-message {
  display: flex;
  flex-flow: column;
  gap: 4px;
  flex-grow: 1;
  padding-right: 24px;
  text-align: left;
}

.toast-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--title-color);
  line-height: 1.4;
}

.toast-text {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-color);
  line-height: 1.5;
  word-break: break-word;
}

.toast-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--gray-color);
  opacity: 0.5;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
  color: var(--title-color);
}

[data-theme="dark"] .toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.toast-close svg {
  display: block;
}

/* Progress bar indicators */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
}

.success .toast-progress {
  background: var(--success-color);
}

.error .toast-progress {
  background: var(--error-color);
}

.toast-container.show .toast-progress {
  animation: toast-progress-shrink 4s linear forwards;
}

.toast-container:hover .toast-progress {
  animation-play-state: paused;
}

@keyframes toast-progress-shrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    transform: translateY(-40px);
    opacity: 0;
  }
  
  .toast-container.show {
    transform: translateY(0);
  }
  
  .toast-container.hide {
    transform: translateY(-40px) scale(0.95);
  }
}
