/* 기본 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f0f8ff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 95%;
    max-width: 800px;
}

h1 {
    margin-bottom: 20px;
    color: #333333;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.control-group {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.control-group label {
    margin-bottom: 5px;
    font-size: 1.1em;
    color: #555555;
}

.control-group input,
.control-group select {
    width: 80px;
    padding: 5px;
    font-size: 1em;
    text-align: center;
}

.controls button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: #4CAF50;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.controls button:hover {
    background-color: #45a049;
}

.dice-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 300px;
    position: relative;
}

#diceCanvas {
    width: 100%;
    height: 300px;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.result h2 {
    font-size: 1.5em;
    color: #333333;
    margin-bottom: 20px;
}

.history {
    text-align: left;
}

.history h2 {
    font-size: 1.3em;
    color: #333333;
    margin-bottom: 10px;
}

#historyList {
    list-style-type: decimal;
    max-height: 150px;
    overflow-y: auto;
    padding-left: 20px;
}

#historyList li {
    margin-bottom: 5px;
    color: #555555;
}

/* 반응형 디자인 */
@media (min-width: 600px) {
    .controls {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    .control-group {
        flex-direction: row;
        align-items: center;
        margin: 0 10px;
    }

    .control-group label {
        margin-bottom: 0;
        margin-right: 5px;
    }

    .control-group input,
    .control-group select {
        width: 60px;
    }

    #diceCanvas {
        height: 400px;
    }
}
