#sggame-panel-dice .sggame-card {
    overflow: visible;
}
.sggame-dice-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px 0;
}
.sggame-dice-mode-select {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}
.sggame-dice-mode-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}
.sggame-dice-mode-btn:hover {
    border-color: var(--sggame-primary, #667eea);
    color: var(--sggame-primary, #667eea);
}
.sggame-dice-mode-btn.active {
    background: linear-gradient(135deg, var(--sggame-primary, #667eea), var(--sggame-secondary, #764ba2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.sggame-dice-room-panel {
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e8edf5;
}
.sggame-dice-room-panel h4 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #334155;
}
.sggame-dice-room-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 13px;
    color: #64748b;
}
.sggame-dice-room-info .badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.sggame-dice-room-info .badge-waiting { background: #fef3c7; color: #92400e; }
.sggame-dice-room-info .badge-playing { background: #d1fae5; color: #065f46; }
.sggame-dice-room-info .badge-finished { background: #e2e8f0; color: #475569; }
.sggame-dice-players {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.sggame-dice-player-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.sggame-dice-player-tag.current-turn {
    border-color: var(--sggame-primary, #667eea);
    background: rgba(102, 126, 234, 0.06);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.sggame-dice-player-tag .pos-badge {
    background: var(--sggame-primary, #667eea);
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}
.sggame-dice-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 14px;
    border: 2px solid #e8edf5;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}
.sggame-dice-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #fff;
    min-height: 56px;
    font-size: 11px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}
.sggame-dice-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.sggame-dice-cell.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
    border-color: var(--sggame-primary, #667eea);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    transform: scale(1.08);
    z-index: 2;
}
.sggame-dice-cell.cell-start {
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    border-color: #3b82f6;
}
.sggame-dice-cell.cell-finish {
    background: linear-gradient(135deg, #fce7f3, #fdf2f8);
    border-color: #ec4899;
}
.sggame-dice-cell.cell-portal {
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    border-color: #8b5cf6;
}
.sggame-dice-cell.cell-coaster {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border-color: #f59e0b;
}
.sggame-dice-cell-icon {
    font-size: 16px;
    margin-bottom: 2px;
}
.sggame-dice-cell-label {
    font-size: 10px;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sggame-dice-cell-num {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 9px;
    color: #94a3b8;
    font-weight: 600;
}
.sggame-dice-marker {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 3;
    animation: sggame-marker-bounce 1.5s ease-in-out infinite;
}
@keyframes sggame-marker-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.sggame-dice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 0;
}
.sggame-dice-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--sggame-primary, #667eea), var(--sggame-secondary, #764ba2));
    color: #fff;
    border-radius: 12px;
    font-size: 28px;
    font-weight: 800;
    min-width: 90px;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s;
}
.sggame-dice-display.rolling {
    animation: sggame-dice-shake 0.1s linear infinite;
}
@keyframes sggame-dice-shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}
.sggame-dice-event-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sggame-dice-event-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.sggame-dice-event-popup .event-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.sggame-dice-event-popup .event-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}
.sggame-dice-event-popup .event-desc {
    font-size: 14px;
    color: #64748b;
}
.sggame-dice-event-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}
.sggame-dice-event-overlay.show {
    opacity: 1;
}
.sggame-dice-log .sggame-list-item {
    font-size: 13px;
    padding: 8px 12px;
}
.sggame-dice-log .sggame-list-item .reward {
    color: #27ae60;
    font-weight: 600;
}
.sggame-dice-log .sggame-list-item .penalty {
    color: #e74c3c;
    font-weight: 600;
}
.sggame-dice-share-code {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 8px;
    margin: 10px 0;
}
.sggame-dice-share-code code {
    flex: 1;
    font-family: monospace;
    font-size: 14px;
    color: #334155;
    user-select: all;
}
@media (max-width: 768px) {
    .sggame-dice-board { grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 10px; }
    .sggame-dice-cell { min-height: 46px; padding: 6px 2px; }
    .sggame-dice-cell-icon { font-size: 14px; }
    .sggame-dice-controls { flex-direction: column; }
    .sggame-dice-mode-select { flex-direction: column; align-items: stretch; }
    .sggame-dice-event-popup { padding: 24px 20px; margin: 0 16px; }
}
@media (max-width: 480px) {
    .sggame-dice-board { grid-template-columns: repeat(4, 1fr); }
}
