/* 在线骰子样式 */
.dice-container {
    max-width: 800px;
    margin: 0 auto;
}

.dice-settings {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.dice-settings h3 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 18px;
}

.settings-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.setting-group label {
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.form-select, .form-input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.dice-controls {
    text-align: center;
    margin-bottom: 32px;
}

.dice-roll-btn {
    font-size: 18px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.dice-roll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.dice-roll-btn:active {
    transform: translateY(0);
}

.dice-roll-btn.rolling {
    animation: rollAnimation 0.8s ease-in-out;
}

@keyframes rollAnimation {
    0%, 100% { 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); }
}

.dice-display {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #f1f5f9;
}

.dice-results {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.dice-placeholder {
    text-align: center;
    color: #a0aec0;
}

.dice-placeholder .dice-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.dice-placeholder p {
    margin: 0;
    font-size: 16px;
}

.dice-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    min-width: 80px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: diceAppear 0.6s ease-out;
}

@keyframes diceAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    50% {
        transform: scale(1.1) rotate(-90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.dice-value {
    font-size: 24px;
    font-weight: 700;
}

.dice-type {
    font-size: 12px;
    opacity: 0.9;
}

.results-stats {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.results-stats h3 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-label {
    font-size: 12px;
    color: #718096;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.dice-history {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.dice-history h3 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 18px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
}

.history-time {
    color: #718096;
    font-size: 12px;
}

.history-result {
    font-weight: 600;
    color: #2d3748;
}

.no-history {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    margin: 0;
    padding: 20px;
}

.quick-roll {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.quick-roll h3 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 18px;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    border-color: #3182ce;
    color: #3182ce;
    background: #ebf8ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dice-container {
        margin: 0 16px;
    }
    
    .settings-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .setting-group {
        min-width: auto;
    }
    
    .dice-display {
        padding: 20px;
    }
    
    .dice-results {
        gap: 12px;
    }
    
    .dice-item {
        min-width: 60px;
        padding: 12px;
    }
    
    .dice-value {
        font-size: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .quick-buttons {
        justify-content: center;
    }
    
    .dice-roll-btn {
        font-size: 16px;
        padding: 12px 24px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .dice-settings,
    .results-stats,
    .dice-history,
    .quick-roll {
        padding: 16px;
    }
    
    .dice-display {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}