/* Dice Styles */

.die {
    width: 80px;
    height: 80px;
    background: white;
    border: 3px solid #2c3e50;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    user-select: none;
}

.die:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.die.selected {
    background: #3498db;
    border-color: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
}

.die.scoring {
    border-color: #27ae60;
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.4);
}

.die.selected.scoring {
    background: #27ae60;
    border-color: #229954;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.8);
}

.die.locked {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.die.locked:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Dice Dots */
.die-face {
    width: 100%;
    height: 100%;
    display: grid;
    padding: 8px;
    position: relative;
}

.die-dot {
    width: 12px;
    height: 12px;
    background: #2c3e50;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.die.selected .die-dot {
    background: white;
}

.die.selected.scoring .die-dot {
    background: white;
}

/* Face 1 */
.die-face.face-1 {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Face 2 */
.die-face.face-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    padding: 12px;
}

.die-face.face-2 .die-dot:first-child {
    align-self: flex-start;
}

.die-face.face-2 .die-dot:last-child {
    align-self: flex-end;
}

/* Face 3 */
.die-face.face-3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    padding: 8px;
}

.die-face.face-3 .die-dot:first-child {
    align-self: flex-start;
}

.die-face.face-3 .die-dot:nth-child(2) {
    align-self: center;
}

.die-face.face-3 .die-dot:last-child {
    align-self: flex-end;
}

/* Face 4 */
.die-face.face-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}

/* Face 5 */
.die-face.face-5 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    position: relative;
}

.die-face.face-5 .die-dot:nth-child(5) {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Face 6 */
.die-face.face-6 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 4px;
    padding: 8px;
}

/* Rolling Animation */
.die.rolling {
    animation: roll 0.6s ease-in-out;
    pointer-events: none;
}

@keyframes roll {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1.2); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Scoring Highlight Animation */
.die.scoring-highlight {
    animation: scoreGlow 1s ease-in-out;
}

@keyframes scoreGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(39, 174, 96, 0.4); }
    50% { box-shadow: 0 0 25px rgba(39, 174, 96, 0.8); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .die {
        width: 70px;
        height: 70px;
    }
    
    .die-dot {
        width: 10px;
        height: 10px;
    }
    
    .die-face.face-2,
    .die-face.face-4,
    .die-face.face-5,
    .die-face.face-6 {
        padding: 10px;
    }
    
    .die-face.face-3 {
        padding: 6px;
    }
    
    .die-face.face-5 .die-dot:nth-child(5),
    .die-face.face-6 {
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .die {
        width: 60px;
        height: 60px;
    }
    
    .die-dot {
        width: 8px;
        height: 8px;
    }
    
    .die-face.face-2,
    .die-face.face-4,
    .die-face.face-5,
    .die-face.face-6 {
        padding: 8px;
    }
    
    .die-face.face-3 {
        padding: 5px;
    }
    
    .die-face.face-6 {
        gap: 2px;
    }
}

/* Dice Container States */
.dice-container.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.dice-container.rolling {
    pointer-events: none;
}

/* Empty State */
.dice-container.empty::before {
    content: "Click 'Roll Dice' to start";
    color: #7f8c8d;
    font-size: 1.2rem;
    font-style: italic;
}

/* Farkle State - Removed overlay text, just use status message */
.dice-container.farkle {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}
