* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0f;
    font-family: 'Arial Black', sans-serif;
    overflow: hidden;
}

.container {
    text-align: center;
    padding: 20px;
}

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: neonGlow 2s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 0, 255, 0.5),
                 0 0 60px rgba(0, 255, 255, 0.5);
}

.subtitle {
    color: #88ccff;
    font-size: 1.2rem;
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
}

.dice-wrapper {
    display: flex;
    gap: 60px;
    justify-content: center;
    margin-bottom: 40px;
    perspective: 1000px;
}

.dice {
    position: relative;
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: transform 0.1s;
    transform-style: preserve-3d;
}

.dice:hover {
    transform: scale(1.05);
}

.dice.rolling {
    animation: roll 0.6s ease-out;
}

.face {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #ff00ff;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: #00ffff;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6),
                0 0 40px rgba(255, 0, 255, 0.3),
                inset 0 0 20px rgba(0, 255, 255, 0.1);
    backface-visibility: hidden;
}

.face::before,
.face::after {
    content: '';
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
}

/* Face 1: center dot */
.face[data-value="1"]::before {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

/* Face 2: top-left and bottom-right */
.face[data-value="2"]::before {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    top: 25px;
    left: 25px;
}

.face[data-value="2"]::after {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    bottom: 25px;
    right: 25px;
}

/* Face 3: diagonal */
.face[data-value="3"]::before {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    top: 25px;
    left: 25px;
}

.face[data-value="3"]::after {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 6px 6px;
}

.face[data-value="3"] .dot3 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    bottom: 25px;
    right: 25px;
}

/* Face 4: four corners */
.face[data-value="4"]::before {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    top: 20px;
    left: 20px;
    background: transparent;
    box-shadow: 8px 8px 0 #ff00ff, 8px 8px 0 10px #ff00ff;
}

.face[data-value="4"]::after {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    bottom: 20px;
    right: 20px;
    background: transparent;
    box-shadow: -8px -8px 0 #ff00ff, -8px -8px 0 10px #ff00ff;
}

.face[data-value="4"] .dot1 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    top: 25px;
    left: 25px;
}

.face[data-value="4"] .dot2 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    top: 25px;
    right: 25px;
}

.face[data-value="4"] .dot3 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    bottom: 25px;
    left: 25px;
}

.face[data-value="4"] .dot4 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    bottom: 25px;
    right: 25px;
}

/* Face 5: four corners + center */
.face[data-value="5"]::before {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    top: 25px;
    left: 25px;
}

.face[data-value="5"]::after {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    top: 25px;
    right: 25px;
}

.face[data-value="5"] .dot1 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.face[data-value="5"] .dot2 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    bottom: 25px;
    left: 25px;
}

.face[data-value="5"] .dot3 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    bottom: 25px;
    right: 25px;
}

/* Face 6: two columns */
.face[data-value="6"]::before {
    width: 12px;
    height: 36px;
    border-radius: 6px;
    top: 20px;
    left: 30px;
    background: transparent;
    box-shadow: 0 12px 0 #ff00ff, 0 24px 0 #ff00ff, 0 12px 0 10px #ff00ff, 0 24px 0 10px #ff00ff;
}

.face[data-value="6"]::after {
    width: 12px;
    height: 36px;
    border-radius: 6px;
    top: 20px;
    right: 30px;
    background: transparent;
}

.face[data-value="6"] .dot1 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    top: 25px;
    left: 30px;
}

.face[data-value="6"] .dot2 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    top: 50px;
    left: 30px;
}

.face[data-value="6"] .dot3 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    bottom: 25px;
    left: 30px;
}

.face[data-value="6"] .dot4 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    top: 25px;
    right: 30px;
}

.face[data-value="6"] .dot5 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    top: 50px;
    right: 30px;
}

.face[data-value="6"] .dot6 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    bottom: 25px;
    right: 30px;
}

.dice[data-value="1"] .face[data-value="1"],
.dice[data-value="2"] .face[data-value="2"],
.dice[data-value="3"] .face[data-value="3"],
.dice[data-value="4"] .face[data-value="4"],
.dice[data-value="5"] .face[data-value="5"],
.dice[data-value="6"] .face[data-value="6"] {
    transform: rotateY(0deg);
    opacity: 1;
    z-index: 10;
}

.dice[data-value="1"] .face:not([data-value="1"]),
.dice[data-value="2"] .face:not([data-value="2"]),
.dice[data-value="3"] .face:not([data-value="3"]),
.dice[data-value="4"] .face:not([data-value="4"]),
.dice[data-value="5"] .face:not([data-value="5"]),
.dice[data-value="6"] .face:not([data-value="6"]) {
    opacity: 0;
    z-index: 0;
}

.result {
    font-size: 2rem;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8),
                 0 0 20px rgba(0, 255, 255, 0.5);
    padding: 15px;
}

@keyframes roll {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(90deg);
    }
    50% {
        transform: rotateX(180deg) rotateY(180deg);
    }
    75% {
        transform: rotateX(270deg) rotateY(270deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@keyframes neonGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@media (max-width: 600px) {
    .dice-wrapper {
        gap: 30px;
        flex-direction: column;
        align-items: center;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}