@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/npm/@fontsource/jetbrains-mono-nl/index.css");

:root {
  --primary: #2196f3;
  --secondary: #ff63a4;
  --background: #f5f5f5;
  --text: #212121;
  --card: #ffffff;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", sans-serif, monospace;
  background: var(--background);
  color: var(--text);
  transition: all 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.header {
  grid-column: 1/-1;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary);
}
.header span {
  color: var(--secondary);
}

.card {
  background: var(--card);
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.terminal {
  font-family: "JetBrains Mono NL", monospace;
  font-size: 14px;
  line-height: 1.5;
  background-color: #1e1e1e;
  color: #ddd;
  padding: 10px;
  border-radius: 5px;
  overflow-y: auto;
  white-space: pre-wrap;
  height: 200px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

input {
  width: 100%;
  max-width: 250px;
  padding: 10px;
  margin: 5px 0;
  border: 1px solid var(--primary);
  border-radius: 5px;
  background-color: var(--background);
  color: var(--text);
  font-size: 1rem;
}
input:focus {
  outline: none;
  border: 1px solid var(--secondary);
}

.progress-container {
  width: 100%;
  height: 10px;
  background: var(--background);
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}
.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

button {
  border: none;
  padding: 12px;
  margin-left: 10px;
  margin-right: auto;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}
.main-button {
  background: var(--primary);
  width: 100%;
  max-width: 200px;
  font-weight: 600;
  font-size: 1rem;
}
.main-button i {
  margin-right: 10px;
  font-size: 1.2rem;
}
.action-button {
  background: var(--secondary);
  width: 40px;
  height: 40px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  content: "";
  position: absolute;
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  input {
    max-width: 90%;
    padding-right: 0;
    margin-left: 0;
  }

  .main-button {
    width: 94%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
  .action-button {
    width: 46.3%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .terminal {
    height: 120px;
  }

  .controls {
    gap: 10px;
  }
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: white;
  background-image: url(https://images.unsplash.com/photo-1615800098779-1be32e60cca3?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2OTUyNDAwMTN8&ixlib=rb-4.0.3&q=85);
  background-size: cover;
  background-repeat: no-repeat;
  user-select: none;
  pointer-events: none;
  z-index: -1;
}
#background > div {
  --size: 5vw;
  --symbol: "✽";

  --pos_x: 0vw;
  --duration_move: 7s;
  --delay_move: 0s;

  --duration_rotate: 1.5s;
  --delay_rotate: 0s;
  --duration_clip: 10s;
  --delay_clip: 0s;
  --hue: 0deg;

  position: absolute;
  top: 0;
  left: 0;
  font-size: clamp(15px, var(--size), 80px);
  font-family: "Noto Sans Symbols 2", sans-serif;
  transform-origin: center top;
  animation: move var(--duration_move) var(--delay_move) linear infinite normal
    both;
}
#background span {
  display: block;
  position: relative;
  transform-origin: center;
  transform: rotate(0deg);
  animation: rotate var(--duration_rotate) var(--delay_rotate) ease-in-out
    infinite alternate both;
}
#background span:after {
  content: var(--symbol);
  -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
  position: relative;
  display: block;
  color: transparent;
  background-clip: text;
  filter: brightness(1.2) hue-rotate(var(--hue));
  background-image: url(https://images.unsplash.com/photo-1580822115965-0b2532068eff?&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2OTUxNDUzNzJ8&ixlib=rb-4.0.3&q=100&w=200&dpr=2);
  background-position: center;
  background-size: 200px auto;
  background-repeat: repeat;
  transform: translateZ(0);
  animation: bg1 var(--duration_clip) var(--delay_clip) linear infinite
    alternate both;
}
#background > div:nth-child(even) span:after {
  animation-name: bg2;
}
@keyframes bg1 {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}
@keyframes bg2 {
  0% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 100%;
  }
}
@keyframes rotate {
  0% {
    transform: rotate(115deg);
  }
  100% {
    transform: rotate(245deg);
  }
}
@keyframes move {
  0% {
    transform: translate3d(var(--pos_x), calc(0vh - var(--size)), 0);
  }
  100% {
    transform: translate3d(var(--pos_x), 100vh, 0);
  }
}

#background > div:nth-child(23n + 1) {
  --symbol: "🟄";
}
#background > div:nth-child(23n + 2) {
  --symbol: "❉";
}
#background > div:nth-child(23n + 3) {
  --symbol: "🟉";
}
#background > div:nth-child(23n + 4) {
  --symbol: "❈";
}
#background > div:nth-child(23n + 5) {
  --symbol: "✣";
}
#background > div:nth-child(23n + 6) {
  --symbol: "🞯";
}
#background > div:nth-child(23n + 7) {
  --symbol: "🟎";
}
#background > div:nth-child(23n + 8) {
  --symbol: "♦";
}
#background > div:nth-child(23n + 9) {
  --symbol: "✢";
}
#background > div:nth-child(23n + 10) {
  --symbol: "🞵";
}
#background > div:nth-child(23n + 11) {
  --symbol: "✤";
}
#background > div:nth-child(23n + 12) {
  --symbol: "✦";
}
#background > div:nth-child(23n + 13) {
  --symbol: "❇";
}
#background > div:nth-child(23n + 14) {
  --symbol: "🞻";
}
#background > div:nth-child(23n + 15) {
  --symbol: "✶";
}
#background > div:nth-child(23n + 16) {
  --symbol: "✳";
}
#background > div:nth-child(23n + 17) {
  --symbol: "❊";
}
#background > div:nth-child(23n + 18) {
  --symbol: "🟄";
}
#background > div:nth-child(23n + 19) {
  --symbol: "✻";
}
#background > div:nth-child(23n + 20) {
  --symbol: "❋";
}
#background > div:nth-child(23n + 21) {
  --symbol: "✷";
}
#background > div:nth-child(23n + 22) {
  --symbol: "✴";
}

#background > div:nth-child(21n + 1) {
  --pos_x: 5vw;
}
#background > div:nth-child(21n + 2) {
  --pos_x: 10vw;
}
#background > div:nth-child(21n + 3) {
  --pos_x: 15vw;
}
#background > div:nth-child(21n + 4) {
  --pos_x: 20vw;
}
#background > div:nth-child(21n + 5) {
  --pos_x: 25vw;
}
#background > div:nth-child(21n + 6) {
  --pos_x: 30vw;
}
#background > div:nth-child(21n + 7) {
  --pos_x: 35vw;
}
#background > div:nth-child(21n + 8) {
  --pos_x: 40vw;
}
#background > div:nth-child(21n + 9) {
  --pos_x: 45vw;
}
#background > div:nth-child(21n + 10) {
  --pos_x: 50vw;
}
#background > div:nth-child(21n + 11) {
  --pos_x: 55vw;
}
#background > div:nth-child(21n + 12) {
  --pos_x: 60vw;
}
#background > div:nth-child(21n + 13) {
  --pos_x: 65vw;
}
#background > div:nth-child(21n + 14) {
  --pos_x: 70vw;
}
#background > div:nth-child(21n + 15) {
  --pos_x: 75vw;
}
#background > div:nth-child(21n + 16) {
  --pos_x: 80vw;
}
#background > div:nth-child(21n + 17) {
  --pos_x: 85vw;
}
#background > div:nth-child(21n + 18) {
  --pos_x: 90vw;
}
#background > div:nth-child(21n + 19) {
  --pos_x: 95vw;
}
#background > div:nth-child(21n + 20) {
  --pos_x: 100vw;
}

#background > div:nth-child(12n + 1) {
  --hue: 30deg;
}
#background > div:nth-child(12n + 2) {
  --hue: 270deg;
}
#background > div:nth-child(12n + 3) {
  --hue: 90deg;
}
#background > div:nth-child(12n + 4) {
  --hue: 150deg;
}
#background > div:nth-child(12n + 5) {
  --hue: 330deg;
}
#background > div:nth-child(12n + 6) {
  --hue: 180deg;
}
#background > div:nth-child(12n + 7) {
  --hue: 60deg;
}
#background > div:nth-child(12n + 8) {
  --hue: 210deg;
}
#background > div:nth-child(12n + 9) {
  --hue: 120deg;
}
#background > div:nth-child(12n + 10) {
  --hue: 240deg;
}
#background > div:nth-child(12n + 11) {
  --hue: 300deg;
}

#background > div:nth-child(8n + 1) {
  --delay_move: -4s;
}
#background > div:nth-child(8n + 2) {
  --delay_move: -5s;
}
#background > div:nth-child(8n + 3) {
  --delay_move: -6s;
}
#background > div:nth-child(8n + 4) {
  --delay_move: -1s;
}
#background > div:nth-child(8n + 5) {
  --delay_move: -2s;
}
#background > div:nth-child(8n + 6) {
  --delay_move: -3s;
}
#background > div:nth-child(8n + 7) {
  --delay_move: -7s;
}

#background > div:nth-child(9n + 1) {
  --duration_move: 7.5s;
}
#background > div:nth-child(9n + 2) {
  --duration_move: 8s;
}
#background > div:nth-child(9n + 3) {
  --duration_move: 8.5s;
}
#background > div:nth-child(9n + 4) {
  --duration_move: 9s;
}
#background > div:nth-child(9n + 5) {
  --duration_move: 5.5s;
}
#background > div:nth-child(9n + 6) {
  --duration_move: 6s;
}
#background > div:nth-child(9n + 7) {
  --duration_move: 6.5s;
}
#background > div:nth-child(9n + 8) {
  --duration_move: 7.8s;
}

#background > div:nth-child(7n + 1) {
  --delay_rotate: 0.3s;
}
#background > div:nth-child(7n + 2) {
  --delay_rotate: 0.6s;
}
#background > div:nth-child(7n + 3) {
  --delay_rotate: 0.9s;
}
#background > div:nth-child(7n + 4) {
  --delay_rotate: -0.3s;
}
#background > div:nth-child(7n + 5) {
  --delay_rotate: -0.6s;
}
#background > div:nth-child(7n + 6) {
  --delay_rotate: -0.9s;
}

#background > div:nth-child(6n + 1) {
  --duration_rotate: 1s;
}
#background > div:nth-child(6n + 2) {
  --duration_rotate: 1.6s;
}
#background > div:nth-child(6n + 3) {
  --duration_rotate: 1.1s;
}
#background > div:nth-child(6n + 4) {
  --duration_rotate: 1.2s;
}
#background > div:nth-child(6n + 5) {
  --duration_rotate: 1.3s;
}

#background > div:nth-child(5n + 1) {
  --size: 3vw;
}
#background > div:nth-child(5n + 2) {
  --size: 4vw;
}
#background > div:nth-child(5n + 3) {
  --size: 6vw;
}
#background > div:nth-child(5n + 4) {
  --size: 7vw;
}
