html {
  scroll-behavior: smooth;
}

/* FOOTER STYLE */

.footer {
  text-align: center;
  margin-top: var(--gap-lg);
  padding-top: var(--gap-lg);
  border-top: 1px solid var(--color-bg-secondary);
  color: var(--color-text-secondary);
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  min-height: 100vh;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--gap-lg) var(--gap-md);
}

/* HEADER */

.header {
  text-align: center;
  margin-bottom: var(--gap-lg);
}

.header h1 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--gap-sm);
}

.header p {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
}

/* LOADER GRID */

.loader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fix, minmax(300px, 1fr));
  gap: var(--gap-md);
  margin-bottom: var(--gap-lg);
}

/* LOADER CARD */

.loader-card {
  background: var(--color-bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: var(--gap-md);
  text-align: center;
}

.loader-card h2 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--gap-md);
}

.loader-demo {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--gap-md);
}

.loader-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* LOADER 1 SPINNER*/

.spinner {
  width: 75px;
  height: 75px;
  border: 8px solid var(--color-spinner);
  border-top-color: var(--color-spinner-secondary);
  border-radius: 50%;

  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* LOADER 2 BOUNCING DOTS */

.dots {
  display: flex;
  gap: var(--gap-sm);
}

.dot {
  width: 16px;
  height: 16px;
  background: var(--color-accent);
  border-radius: 50%;

  animation: bounce 0.6s ease-in-out infinite;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}
.dot:nth-child(2) {
  animation-delay: 0.1s;
}
.dot:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.3);
  }
}

/* LOADER 3 PROGRESS BAR */

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-bg-primary);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);

  animation: progressGrow 3s ease-in-out infinite;
}

@keyframes progressGrow {
  to {
    width: 100%;
  }
}

/* LOADER 4 PULSE */

.pulse {
  width: 75px;
  height: 75px;
  background: var(--color-accent);
  border-radius: 50%;

  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.2;
  }
}

/* LOADER 5 SKELETON-LINE */

.skeleton {
  width: 200px;
}

.skeleton-line {
  height: 12px;
  background: var(--color-accent);
  border-radius: 4px;
  margin-bottom: 8px;
  width: 100%;

  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-line.short {
  width: 60%;
}

@keyframes skeletonPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

/* LOADER 6 RINGS */

.ring {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring div {
  position: absolute;
  border: 4px solid var(--color-accent);
  border-radius: 50%;
  border-color: var(--color-accent) transparent transparent transparent;
  animation: ring 1.2s linear infinite;
}

.ring div:nth-child(1) {
  animation-delay: 0s;
  width: 64px;
  height: 64px;
  top: 8px;
  left: 8px;
}
.ring div:nth-child(2) {
  animation-delay: -0.3s;
  width: 48px;
  height: 48px;
  top: 16px;
  left: 16px;
}
.ring div:nth-child(3) {
  animation-delay: -0.6s;
  width: 32px;
  height: 32px;
  top: 24px;
  left: 24px;
}
.ring div:nth-child(4) {
  animation-delay: -0.9s;
  width: 16px;
  height: 16px;
  top: 32px;
  left: 32px;
}

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