body {
    font-family: Arial, sans-serif;
    background: #0a0a23;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    user-select: none;
}

.teams-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.team-card {
    background: linear-gradient(145deg, rgba(106,13,173,0.2), rgba(34,34,178,0.2));
    border: 2px solid transparent;
    border-radius: 15px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.3, 0.27, 0.07, 1.64);
    transform-style: preserve-3d;
    overflow: hidden;
    backdrop-filter: blur(8px);
    padding: 15px 20px;
    min-height: 100px;
    width: 280px;
    transform: perspective(800px) translateZ(0);
}

.team-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: conic-gradient(
        #00f7ff 0deg,
        #ff00ff 120deg,
        #00f7ff 240deg
    );
    transform: translate(-50%, -50%) rotate(0deg);
    animation: rotate-border 6s linear infinite;
    z-index: -1;
}

.team-card::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(45deg, #00f7ff, #ff00ff);
    z-index: -1;
    filter: blur(10px);
    opacity: 0.6;
    transition: all 0.3s ease-out;
}

h1.neon-title {
    margin: 2rem 0;
    position: relative;
    text-align: center;
    font-size: 3.5rem;
    background: linear-gradient(45deg, #00f7ff, #ff00ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px #00f7ff,
                 0 0 40px #ff00ff;
    animation: title-glow 2s ease-in-out infinite alternate, hue-shift 3s linear infinite;
}

@keyframes neon-pulse {
    0% { text-shadow: 0 0 10px #00f7ff, 0 0 20px #ff00ff; }
    50% { text-shadow: 0 0 30px #00f7ff, 0 0 50px #ff00ff; }
    100% { text-shadow: 0 0 10px #00f7ff, 0 0 20px #ff00ff; }
}

h2 {
    position: relative;
    font-size: 2.2rem;
    background: black;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: neon-pulse 1.5s ease-in-out infinite;
    transform: translateZ(20px);
    text-shadow: 3px 3px 15px rgba(0, 247, 255, 0.5),
                -3px -3px 15px rgba(255, 0, 255, 0.5);
}
/*
h2::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #00f7ff, #ff00ff);
    z-index: -1;
    filter: blur(15px);
    opacity: 0.4;
    animation: gradient-flow 3s linear infinite;
}*/

@keyframes flip {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(180deg) scale(1.2); }
    100% { transform: rotateY(360deg); }
}

.shuffle-animation {
    animation: flip 0.8s ease-in-out infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#result {
    background: linear-gradient(45deg, #00f7ff, #ff00ff);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 100px rgba(255,255,255,0.8),
                 0 0 200px rgba(0,247,255,0.9),
                 0 0 300px rgba(255,0,255,0.8);
    animation: text-blink 0.08s infinite alternate;
    transform: translateZ(50px);
    text-shadow: 
        0 1px 0 #ccc,
        0 2px 0 #b0b,
        0 3px 0 #909,
        0 4px 20px rgba(0,0,0,0.5),
        0 0 80px #0ff,
        0 0 120px #f0f;
    filter: drop-shadow(0 0 60px rgba(255,255,255,0.8));
    animation: lottery-stage 1.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    font-size: 6rem;
    color: #ff00ff;
    text-shadow: 
        0 1px 0 #ccc,
        0 2px 0 #b0b,
        0 3px 0 #909,
        0 4px 20px rgba(0,0,0,0.5),
        0 0 80px #0ff,
        0 0 120px #f0f;
    animation: text-scale 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    transform-origin: center;
    position: relative;
}

@keyframes text-blink {
    from { opacity: 0.2; }
    to { opacity: 1; }
}

@keyframes lottery-stage {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(30deg);
        filter: hue-rotate(0deg);
    }
    30% {
        opacity: 1;
        transform: scale(1.2) rotateY(-20deg);
        filter: hue-rotate(180deg);
        text-shadow: 0 0 50px rgba(0,247,255,0.8);
    }
    60% {
        transform: scale(1) rotateY(0deg);
        filter: hue-rotate(360deg);
        text-shadow: 0 0 100px rgba(255,0,255,0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

@keyframes particle-burst {
    0% {
        opacity: 1;
        transform: translate(0,0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx),var(--ty)) scale(3) rotate(720deg);
        filter: blur(8px);
    }
    0% {
        opacity: 1;
        transform: translate(0,0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx),var(--ty)) scale(0);
    }
}

@keyframes screen-glow {
    0% {
        opacity: 0;
        box-shadow: 0 0 200px 80px rgba(0, 247, 255, 0.5);
    }
    70% {
        opacity: 0.4;
        box-shadow: 0 0 300px 120px rgba(255, 0, 255, 0.8);
    }
    100% {
        opacity: 0;
        box-shadow: 0 0 150px 60px rgba(0, 247, 255, 0.3);
    }
    0% { opacity: 0; }
    50% { opacity: 0.3; }
    100% { opacity: 0; }
}

.result-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #00f7ff 30%, #ff00ff 70%);
    border-radius: 50%;
    animation: particle-burst 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    mix-blend-mode: screen;
    pointer-events: none;
}

@keyframes sand-dissolve {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + 20px), 100vh) scale(0.2);
        filter: blur(4px);
        clip-path: polygon(50% 100%, 0 0, 100% 0);
    }
    /*
    width: 6px;
    height: 6px;
    background: linear-gradient(45deg, #00f7ff, #ff00ff);
    animation: particles 1s ease-out infinite;
    box-shadow: 0 0 15px rgba(0,247,255,0.8);
    */
}

h2 {
    text-shadow: 
        4px 4px 20px rgba(0, 247, 255, 0.8),
        -4px -4px 20px rgba(255, 0, 255, 0.8),
        0 0 40px rgba(255,255,255,0.2);
    perspective: 1000px;
}

.team-card:active {
    transform: translateY(8px) scale(0.98) perspective(800px) rotateX(8deg);
    transition: all 0.1s cubic-bezier(0.5, 0, 0.75, 0);
    filter: brightness(0.9) contrast(1.2);
}

.team-card.active ~ .team-card {
    animation: shake 0.8s cubic-bezier(0.36,0.07,0.19,0.97) both;
}

@keyframes rotate-border {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes title-glow {
    from {
        filter: hue-rotate(0deg);
        text-shadow: 0 0 20px #00f7ff,
                     0 0 40px #ff00ff;
    }
    to {
        filter: hue-rotate(360deg);
        text-shadow: 0 0 30px #00f7ff,
                     0 0 60px #ff00ff;
    }
}

@keyframes particles {
    0% { opacity: 0; transform: translateY(0) rotate(0deg); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-100px) rotate(360deg); }
}

@keyframes cascade-discard {
  0% {
    transform: translateY(-50vh) scale(0.8);
    opacity: 0;
    filter: blur(5px);
  }
  30% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
  70% {
    transform: translateX(calc(var(--shake) * 30px)) translateY(calc(var(--shake) * -15px));
    opacity: 0.8;
    filter: blur(2px);
  }
  100% {
    transform: scale(0);
    opacity: 0;
    filter: blur(10px);
  }
}

@keyframes shake {
    0% { transform: translateY(-10px) rotate(-2deg); }
    20% { transform: translateY(8px) rotate(3deg) scale(1.02); }
    40% { transform: translateY(-6px) rotate(-3deg) scale(0.98); }
    60% { transform: translateY(4px) rotate(2deg) scale(1.01); }
    80% { transform: translateY(-2px) rotate(-1deg); }
    100% { transform: translateY(0) rotate(0); }
}

@keyframes final-focus {
  0% {
    transform: scale(1) rotate(0deg);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: scale(1.8) rotate(5deg);
    filter: hue-rotate(180deg) brightness(1.5);
  }
  100% {
    transform: scale(1.5) rotate(0deg);
    filter: hue-rotate(360deg);
  }
}

.result-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #00f7ff 30%, #ff00ff 70%);
    border-radius: 50%;
    animation: particle-burst 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    mix-blend-mode: screen;
    pointer-events: none;

@keyframes sand-dissolve {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + 20px), 100vh) scale(0.2);
        filter: blur(4px);
        clip-path: polygon(50% 100%, 0 0, 100% 0);
    }
}

    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #00f7ff, #ff00ff);
    animation: particles 1.5s ease-out infinite;
}

.team-card:hover {
    transform: perspective(800px) translateZ(40px) scale(1.05);
    box-shadow: 0 0 120px rgba(0, 247, 255, 0.8),
                0 0 160px rgba(255, 0, 255, 0.6);
    filter: brightness(1.1);
    filter: brightness(1.5) contrast(130%);
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.05);

.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    width: 80vw;
    height: 80vh;
    padding: 20px;
    perspective: 1000px;
}
    box-shadow: 0 0 50px rgba(0, 247, 255, 0.8),
                0 0 80px rgba(255, 0, 255, 0.6);
    filter: brightness(1.2);
    transition: all 0.3s ease-out;
}

\n.team-card,
.neon-title {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.8) translateZ(-100px) !important;
}

.result-area {
  position: relative;
  z-index: 100;
  margin: 20px auto;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.team-card {
  z-index: 200;
  position: relative;
}