@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(88, 101, 242, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(236, 72, 153, 0.08) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.main_back {
  position: absolute;
  border-radius: 12px;
  transform: rotate(90deg);
  width: 11em;
  height: 11em;
  background: linear-gradient(
    135deg,
    rgba(88, 101, 242, 0.3) 0%,
    rgba(139, 92, 246, 0.2) 50%,
    rgba(236, 72, 153, 0.3) 100%
  );
  z-index: -2;
  box-shadow: inset 0px 0px 100px 10px rgba(255, 255, 255, 0.05),
    0 8px 32px 0 rgba(88, 101, 242, 0.2);
  transition: 0.5s ease-in-out;
}

.main {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  width: 14em;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  z-index: 1;
}

.card {
  width: 60px;
  height: 60px;
  border-top-left-radius: 10px;
  transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  background: rgba(30, 30, 46, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: 0.4s ease-in-out;
}

.card .instagram {
  opacity: 0;
  transition: 0.4s ease-in-out;
  fill: #9ca3af;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card:nth-child(2) {
  border-radius: 0px;
}

.card:nth-child(2) .twitter {
  opacity: 0;
  transition: 0.4s ease-in-out;
  fill: #9ca3af;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card:nth-child(3) {
  border-top-right-radius: 10px;
  border-top-left-radius: 0px;
}

.card:nth-child(3) .dribble {
  opacity: 0;
  transition: 0.4s ease-in-out;
  fill: #9ca3af;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card:nth-child(4) {
  border-radius: 0px;
}

.card:nth-child(4) .codepen {
  opacity: 0;
  transition: 0.4s ease-in-out;
  fill: #9ca3af;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card:nth-child(5) {
  border-radius: 0px;
}

.card:nth-child(5) .linkedin {
  opacity: 0;
  transition: 0.4s ease-in-out;
  fill: #9ca3af;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card:nth-child(6) {
  border-radius: 0px;
}

.card:nth-child(6) .discord {
  opacity: 0;
  transition: 0.4s ease-in-out;
  fill: #9ca3af;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card:nth-child(7) {
  border-bottom-left-radius: 10px;
  border-top-left-radius: 0px;
}

.card:nth-child(7) .github {
  opacity: 0;
  transition: 0.4s ease-in-out;
  fill: #9ca3af;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card:nth-child(8) {
  border-radius: 0px;
}

.card:nth-child(8) .telegram {
  opacity: 0;
  transition: 0.4s ease-in-out;
  fill: #9ca3af;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card:nth-child(9) {
  border-bottom-right-radius: 10px;
  border-top-left-radius: 0px;
}

.card:nth-child(9) .reddit {
  opacity: 0;
  transition: 0.4s ease-in-out;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.main:hover {
  width: 14em;
  cursor: pointer;
}

.main:hover .main_back {
  opacity: 0;
  transform: rotate(90deg) scale(1.2);
}

.main:hover .card {
  margin: 0.2em;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 30, 46, 0.8);
  transform: translateY(-2px);
}

.main:hover .card::before {
  opacity: 1;
}

.main:hover .card:nth-child(5) {
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.main:hover .text {
  opacity: 0;
  transform: scale(0.8);
  z-index: -3;
}

.main:hover .instagram {
  opacity: 1;
}
.main:hover .twitter {
  opacity: 1;
}
.main:hover .dribble {
  opacity: 1;
}
.main:hover .codepen {
  opacity: 1;
}
.main:hover .linkedin {
  opacity: 1;
}
.main:hover .discord {
  opacity: 1;
}
.main:hover .github {
  opacity: 1;
}
.main:hover .telegram {
  opacity: 1;
}
.main:hover .reddit {
  opacity: 1;
}

.card:nth-child(1):hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border-color: rgba(139, 92, 246, 0.5);
}
.card:nth-child(1):hover .instagram {
  fill: white;
  transform: scale(1.1);
}

.card:nth-child(2):hover {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-color: rgba(255, 255, 255, 0.2);
}
.card:nth-child(2):hover .twitter {
  fill: white;
  transform: scale(1.1);
}

.card:nth-child(3):hover {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  border-color: rgba(236, 72, 153, 0.5);
}
.card:nth-child(3):hover .dribble {
  fill: white;
  transform: scale(1.1);
}

.card:nth-child(4):hover {
  background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
  border-color: rgba(71, 85, 105, 0.5);
}
.card:nth-child(4):hover .codepen {
  fill: white;
  transform: scale(1.1);
}

.card:nth-child(5):hover {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  border-color: rgba(59, 130, 246, 0.5);
}
.card:nth-child(5):hover .linkedin {
  fill: white;
  transform: scale(1.1);
}

.card:nth-child(6):hover {
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  border-color: rgba(88, 101, 242, 0.5);
}
.card:nth-child(6):hover .discord {
  fill: white;
  transform: scale(1.1);
}

.card:nth-child(7):hover {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  border-color: rgba(55, 65, 81, 0.5);
}
.card:nth-child(7):hover .github {
  fill: white;
  transform: scale(1.1);
}

.card:nth-child(8):hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border-color: rgba(14, 165, 233, 0.5);
}
.card:nth-child(8):hover .telegram > path:nth-of-type(1) {
  fill: white;
}
.card:nth-child(8):hover .telegram > path:nth-of-type(2) {
  fill: #0ea5e9;
}
.card:nth-child(8):hover .telegram > path:nth-of-type(3) {
  fill: #0ea5e9;
}
.card:nth-child(8):hover .telegram {
  transform: scale(1.1);
}

.card:nth-child(9):hover {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-color: rgba(249, 115, 22, 0.5);
}
.card:nth-child(9) .reddit > g circle {
  fill: #9ca3af;
}
.card:nth-child(9) .reddit > g path {
  fill: #1e293b;
}
.card:nth-child(9):hover .reddit > g circle {
  fill: white;
}
.card:nth-child(9):hover .reddit > g path {
  fill: #f97316;
}
.card:nth-child(9):hover .reddit {
  transform: scale(1.1);
}

.text {
  position: absolute;
  font-size: 0.65em;
  transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  color: #e5e7eb;
  text-align: center;
  font-weight: 300;
  letter-spacing: 0.4em;
  z-index: 3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.8;
}
