body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

#menu {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  z-index: 100;
}

.element {
  width: 140px;
  height: 160px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  cursor: pointer;
  position: relative;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(5px);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  overflow: hidden;
  pointer-events: auto;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.element::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 80px;
  height: 80px;
  background: radial-gradient(
    circle,
    var(--card-color, rgba(59, 130, 246, 0.8)) 0%,
    transparent 70%
  );
  border-radius: 50%;
  opacity: 0;
  transform: translate(var(--mouse-x, 0), var(--mouse-y, 0));
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
  filter: blur(20px);
}

.element:hover {
  box-shadow: 0 0 30px color-mix(in srgb, var(--card-color) 40%, transparent);
  transform: translateY(-2px) translateZ(0) scale(1.02);
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(30, 41, 59, 0.95);
  cursor: pointer;
}

.element:hover::before {
  opacity: 0.6;
}

.element:active {
  transform: translateY(0px) translateZ(0);
  box-shadow: 0 0 20px color-mix(in srgb, var(--card-color) 60%, transparent);
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.card-icon {
  width: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease;
}

.element:hover .card-icon svg {
  transform: scale(1.1);
}

.element .topic-text {
  font-size: 20px;
  font-weight: 900;
  color: #f1f5f9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  line-height: 1.2;
  text-align: center;
  word-wrap: break-word;
  hyphens: auto;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

button {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  margin: 0 8px;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  backdrop-filter: blur(5px);
  font-weight: 500;
  transition: all 0.2s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

button:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.8);
  transform: translateY(-1px) translateZ(0);
}

button:active,
button.active {
  color: #0f172a;
  background: rgba(96, 165, 250, 0.9);
  border-color: rgba(96, 165, 250, 1);
  transform: translateY(0px) translateZ(0);
}

@media (max-width: 768px) {
  .element {
    width: 90px;
    height: 110px;
    padding: 8px;
  }

  .card-icon svg {
    width: 20px;
    height: 20px;
  }

  .element .topic-text {
    font-size: 11px;
  }

  #menu {
    bottom: 10px;
  }

  button {
    padding: 6px 12px;
    font-size: 11px;
    margin: 0 4px;
  }
}

@media (max-width: 480px) {
  .element {
    width: 75px;
    height: 90px;
    padding: 6px;
  }

  .card-icon svg {
    width: 16px;
    height: 16px;
  }

  .element .topic-text {
    font-size: 9px;
    line-height: 1.1;
  }

  .card-content {
    gap: 4px;
  }

  button {
    padding: 4px 8px;
    font-size: 10px;
    margin: 0 2px;
  }
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .element,
  button,
  .card-icon svg {
    transition: none;
  }
}
