@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lato:wght@300;400;700&display=swap');

body {
    font-family: 'Lato', sans-serif;
    background-color: #0f0c29;
    background-image: linear-gradient(315deg, #0f0c29 0%, #302b63 74%, #24243e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 3D Dice Styles */
.dice-container {
    perspective: 1000px;
    width: 100px;
    height: 100px;
    margin: 20px auto;
    display: inline-block;
}

.dice {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s ease-out;
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #ffffff 100%);
    border-radius: 10px;
    border: 2px solid #ccc;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0; /* Hide text if any */
}

.dot {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #2D1B69;
    position: absolute;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

/* Face positions */
.front  { transform: translateZ(50px); }
.back   { transform: rotateY(180deg) translateZ(50px); }
.right  { transform: rotateY(90deg) translateZ(50px); }
.left   { transform: rotateY(-90deg) translateZ(50px); }
.top    { transform: rotateX(90deg) translateZ(50px); }
.bottom { transform: rotateX(-90deg) translateZ(50px); }

/* Dot positioning for each face (simplified for 1-6) */
/* Face 1 */
.front .dot:nth-child(1) { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Face 2 */
.back .dot:nth-child(1) { top: 20%; left: 20%; }
.back .dot:nth-child(2) { bottom: 20%; right: 20%; }

/* Face 3 */
.right .dot:nth-child(1) { top: 20%; left: 20%; }
.right .dot:nth-child(2) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.right .dot:nth-child(3) { bottom: 20%; right: 20%; }

/* Face 4 */
.left .dot:nth-child(1) { top: 20%; left: 20%; }
.left .dot:nth-child(2) { top: 20%; right: 20%; }
.left .dot:nth-child(3) { bottom: 20%; left: 20%; }
.left .dot:nth-child(4) { bottom: 20%; right: 20%; }

/* Face 5 */
.top .dot:nth-child(1) { top: 20%; left: 20%; }
.top .dot:nth-child(2) { top: 20%; right: 20%; }
.top .dot:nth-child(3) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.top .dot:nth-child(4) { bottom: 20%; left: 20%; }
.top .dot:nth-child(5) { bottom: 20%; right: 20%; }

/* Face 6 */
.bottom .dot:nth-child(1) { top: 20%; left: 20%; }
.bottom .dot:nth-child(2) { top: 20%; right: 20%; }
.bottom .dot:nth-child(3) { top: 50%; left: 20%; transform: translateY(-50%); }
.bottom .dot:nth-child(4) { top: 50%; right: 20%; transform: translateY(-50%); }
.bottom .dot:nth-child(5) { bottom: 20%; left: 20%; }
.bottom .dot:nth-child(6) { bottom: 20%; right: 20%; }

@keyframes spin {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(720deg) rotateY(720deg); }
}

.rolling {
    animation: spin 1s linear infinite;
}

/* Tooltip and mystic effects */
.mystic-glow {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.btn-mystic {
    background: linear-gradient(45deg, #2D1B69, #4a3b89);
    border: 1px solid #ffd700;
    color: #ffd700;
    transition: all 0.3s ease;
}

.btn-mystic:hover {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}
