/* ==========================================================================
   Easy Decision Maker - Premium 3D Dice Roller Stylesheet
   ========================================================================== */

/* Glassmorphism Panel styles */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

/* Custom Swatches & Styling */
.btn-pink {
    background: linear-gradient(135deg, #ec0088 0%, #ff4b91 100%);
    color: #ffffff !important;
    border: none;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(236, 0, 136, 0.3);
}

.btn-pink:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(236, 0, 136, 0.45);
}

.btn-pink:active {
    transform: translateY(1px);
}

.btn-outline-pink {
    border: 2px solid #ec0088;
    color: #ec0088 !important;
    background: transparent;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-outline-pink:hover {
    background-color: #ec0088;
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(236, 0, 136, 0.25);
}

/* Swatch Buttons */
.swatch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.swatch-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(236, 0, 136, 0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.swatch-btn.active {
    border-color: #ec0088;
    background-color: rgba(236, 0, 136, 0.05);
    color: #ec0088;
    box-shadow: 0 4px 12px rgba(236, 0, 136, 0.12);
}

.swatch-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Modifier inputs & range sliders styling */
.form-range::-webkit-slider-thumb {
    background: #ec0088;
}

.form-range::-moz-range-thumb {
    background: #ec0088;
}

.form-range::-ms-thumb {
    background: #ec0088;
}

/* Rotate Animation for icon on roll */
.rotate-icon {
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-pink:hover .rotate-icon {
    transform: rotate(360deg);
}

/* 3D Dice Arena and Cube CSS System */
#dice-rolling-space {
    perspective: 1000px;
    overflow: hidden;
}

/* 3D Dice Box Wrapper */
.dice-wrapper {
    position: absolute;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: top 1.5s cubic-bezier(0.1, 0.8, 0.25, 1), left 1.5s cubic-bezier(0.1, 0.8, 0.25, 1);
    z-index: 10;
}

/* 3D Cube withpreserve-3d */
.dice-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.6s cubic-bezier(0.1, 0.82, 0.22, 1.05);
}

/* Standard D6 Face properties */
.dice-face {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 7px;
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    user-select: none;
}

/* Custom 3x3 pips layout styling */
.pip {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    align-self: center;
    justify-self: center;
    background-color: #ffffff;
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.3);
}

/* Face Rotations on 3D axes (30px translated on Z) */
.face-1 { transform: rotateY(0deg) translateZ(30px); }
.face-2 { transform: rotateY(180deg) translateZ(30px); }
.face-3 { transform: rotateY(90deg) translateZ(30px); }
.face-4 { transform: rotateY(-90deg) translateZ(30px); }
.face-5 { transform: rotateX(90deg) translateZ(30px); }
.face-6 { transform: rotateX(-90deg) translateZ(30px); }

/* Pip positions on 3x3 grid system */
.pip-tl { grid-column: 1; grid-row: 1; }
.pip-tc { grid-column: 2; grid-row: 1; }
.pip-tr { grid-column: 3; grid-row: 1; }
.pip-ml { grid-column: 1; grid-row: 2; }
.pip-mc { grid-column: 2; grid-row: 2; }
.pip-mr { grid-column: 3; grid-row: 2; }
.pip-bl { grid-column: 1; grid-row: 3; }
.pip-bc { grid-column: 2; grid-row: 3; }
.pip-br { grid-column: 3; grid-row: 3; }

/* ==========================================================================
   Dice Theme Colors Swatches
   ========================================================================== */

/* Theme 1: Neon Pink (Brand Theme) */
.theme-pink .dice-face {
    background: linear-gradient(145deg, #ec0088, #b80064);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), inset 0 -2px 4px rgba(0,0,0,0.3), 0 5px 15px rgba(236, 0, 136, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}
.theme-pink .pip {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Theme 2: Glowing Cyan (Aesthetic Teal) */
.theme-cyan .dice-face {
    background: linear-gradient(145deg, #00d2ff, #009abc);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), inset 0 -2px 4px rgba(0,0,0,0.3), 0 5px 15px rgba(0, 210, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}
.theme-cyan .pip {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Theme 3: Midnight Dark (Sleek Obsidian) */
.theme-dark .dice-face {
    background: linear-gradient(145deg, #32353a, #15171a);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.1), inset 0 -2px 4px rgba(0,0,0,0.5), 0 5px 15px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}
.theme-dark .pip {
    background-color: #ec0088;
    box-shadow: 0 0 5px #ff4b91, 0 1px 1px rgba(0,0,0,0.5);
}

/* Theme 4: Golden Amber (Warm Honey Glow) */
.theme-amber .dice-face {
    background: linear-gradient(145deg, #ff9f43, #d37c22);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), inset 0 -2px 4px rgba(0,0,0,0.3), 0 5px 15px rgba(255, 159, 67, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}
.theme-amber .pip {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Physics Tumble Animation triggers */
.dice-wrapper.tumble {
    animation: bounce-arena 1.6s cubic-bezier(0.25, 1.4, 0.5, 0.95);
}

/* History Ledger Styling */
.history-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:hover {
    transform: translateX(3px);
    border-color: rgba(236, 0, 136, 0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

/* Custom scrollbar for containers */
#history-container::-webkit-scrollbar {
    width: 6px;
}

#history-container::-webkit-scrollbar-track {
    background: transparent;
}

#history-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

#history-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

/* High-velocity keyframes bounce */
@keyframes bounce-arena {
    0% {
        transform: scale(0.65) translateY(-50px);
    }
    15% {
        transform: scale(1.05) translateY(0);
    }
    30% {
        transform: scale(0.95) translateY(-20px);
    }
    45% {
        transform: scale(1.02) translateY(0);
    }
    60% {
        transform: scale(0.98) translateY(-6px);
    }
    75% {
        transform: scale(1) translateY(0);
    }
    100% {
        transform: scale(1);
    }
}
