@font-face {
  font-family: "PP Supply Mono";
  src: url("https://assets.codepen.io/7558/PPSupplyMono-Variable.woff2")
    format("woff2");
  font-weight: 100 900;
  font-style: normal;
}

:root {
  /* Dark theme (default) */
  --color-primary: #ffffff;
  --color-secondary: rgba(255, 255, 255, 0.6);
  --color-tertiary: rgba(255, 255, 255, 0.3);
  --color-accent: #ff0000;
  --color-background: #000000;
  --color-surface: #000000;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-corner: rgba(255, 255, 255, 0.08);
  --gradient-overlay: radial-gradient(
    ellipse 400px 300px at center,
    transparent 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.3) 60%,
    rgba(0, 0, 0, 0.7) 80%,
    rgba(0, 0, 0, 0.9) 90%,
    var(--color-background) 100%
  );

  /* Typography */
  --font-primary: "PP Supply Mono", monospace;
  --font-size-small: 10px;
  --font-size-base: 12px;
  --font-size-large: 14px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-medium: 0.3s ease;
}

[data-theme="light"] {
  --color-primary: #2a2a2a;
  --color-secondary: rgba(42, 42, 42, 0.6);
  --color-tertiary: rgba(42, 42, 42, 0.3);
  --color-accent: #000000;
  --color-background: #e8e8e8;
  --color-surface: #e8e8e8;
  --color-border: rgba(42, 42, 42, 0.1);
  --color-corner: rgba(42, 42, 42, 0.08);
  --gradient-overlay: radial-gradient(
    ellipse 400px 300px at center,
    transparent 0%,
    transparent 40%,
    rgba(232, 232, 232, 0.3) 60%,
    rgba(232, 232, 232, 0.7) 80%,
    rgba(232, 232, 232, 0.9) 90%,
    var(--color-background) 100%
  );
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--color-background);
  color: var(--color-primary);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100vh;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
}

.background-preloader {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  opacity: 0.5;
}

.preloader-digit-column {
  position: relative;
  width: 180px;
  height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.preloader-digit-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.preloader-digit {
  width: 100%;
  height: 280px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preloader-digit span {
  font-size: 280px;
  font-weight: 900;
  color: var(--color-primary);
  opacity: 0.1;
  font-family: var(--font-primary);
  letter-spacing: -0.05em;
  text-align: center;
  line-height: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-content {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 100;
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

.header-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 8px 0;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.header-description {
  font-size: 11px;
  color: var(--color-secondary);
  margin: 0;
  line-height: 1.5;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 16px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: var(--color-primary);
}

.theme-toggle:hover svg {
  fill: var(--color-accent);
}

.carousel-nav {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  gap: 0;
}

.nav-arrow {
  background: transparent;
  border: none;
  padding: 15px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  transition: var(--transition-fast);
}

.nav-arrow:hover {
  opacity: 0.7;
}

.nav-arrow svg {
  fill: var(--color-primary);
}

.wrapper {
  height: 300px;
  max-height: 50vh;
  width: 70%;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin: 0 20px;
}

.wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-overlay);
  pointer-events: none;
  z-index: 5;
}

.show-overflow {
  overflow: visible;
}

.show-overflow::before {
  display: none;
}

.box {
  padding: 0.5rem;
  flex-shrink: 0;
  height: 200px;
  width: 200px;
}

.box.active {
  transform: scale(1.1);
}

.box__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.animation-container {
  position: relative;
  width: 180px;
  height: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.animation-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 180px;
}

.initializing-section {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.initializing-text-container {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12px;
}

.initializing-text {
  font-size: 12px;
  letter-spacing: 3px;
  position: relative;
  z-index: 2;
  mix-blend-mode: difference;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 2px 0 0 2px;
}

.bottom-info {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.toggle-link {
  text-align: center;
  position: relative;
}

.toggle-link span {
  color: var(--color-secondary);
  font-size: var(--font-size-small);
  letter-spacing: 2px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  display: inline-block;
}

.toggle-link span::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--transition-fast);
}

.toggle-link span:hover {
  color: var(--color-accent);
}

.toggle-link span:hover::after {
  width: 100%;
}

.initializing-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--color-accent);
  z-index: 1;
  -webkit-animation: progressLoop 3s ease-in-out infinite;
          animation: progressLoop 3s ease-in-out infinite;
}

@-webkit-keyframes progressLoop {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

@keyframes progressLoop {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

.preloader-info {
  text-align: center;
  font-size: var(--font-size-small);
  letter-spacing: 2px;
  color: var(--color-secondary);
  line-height: 1.6;
}

.preloader-info p {
  margin: 8px 0;
}

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  color: var(--color-corner);
}

.corner.top-left {
  top: -8px;
  left: -8px;
}

.corner.top-right {
  top: -8px;
  right: -8px;
  transform: rotate(90deg);
}

.corner.bottom-left {
  bottom: -8px;
  left: -8px;
  transform: rotate(-90deg);
}

.corner.bottom-right {
  bottom: -8px;
  right: -8px;
  transform: rotate(180deg);
}