.yahtzee-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 800px) {
    .yahtzee-layout {
        flex-direction: column;
        align-items: center;
    }
}

/* Dice Section */
.dice-section {
    background: rgba(0,0,0,0.5);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dice-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.die {
    font-size: 5rem;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s, color 0.2s, text-shadow 0.2s;
}

.die.held {
    color: #ef4444;
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
    transform: translateY(-10px);
}

.die.rolling {
    animation: shake 0.4s infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    40% { transform: translate(1px, -1px) rotate(5deg); }
    60% { transform: translate(-1px, 2px) rotate(-5deg); }
    80% { transform: translate(-3px, -1px) rotate(1deg); }
    100% { transform: translate(1px, 2px) rotate(0deg); }
}

/* Scorecard Section */
.scorecard-section {
    display: flex;
    gap: 2rem;
}
@media (max-width: 600px) {
    .scorecard-section {
        flex-direction: column;
        gap: 1rem;
    }
}

.score-column {
    background: rgba(0,0,0,0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    width: 250px;
    max-width: 100%;
}

.score-column h3 {
    margin-top: 0;
    color: #ef4444;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    transition: all 0.2s;
    user-select: none;
}

.score-row:not(.sum-row):hover {
    background: rgba(255,255,255,0.1);
    cursor: pointer;
}

.score-row:not(.sum-row).preview {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}
.score-row.preview .val {
    color: #38bdf8;
}

.score-row.filled {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    pointer-events: none; /* cannot select again */
}
.score-row.filled .val {
    color: #10b981;
    font-weight: bold;
}

.score-row.zeroed {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    pointer-events: none;
}
.score-row.zeroed .val {
    color: #ef4444;
}

.sum-row {
    background: transparent;
    color: #94a3b8;
    border-top: 1px solid var(--glass-border);
    border-radius: 0;
    margin-top: 1rem;
    padding-top: 1rem;
    font-weight: bold;
}
.sum-row .val {
    color: #fff;
}
