* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f0f0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.dice-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.dice {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 2px solid #333;
    background-color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease;
}

.controls {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

#rollDiceBtn, #resetStatsBtn {
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.2s, transform 0.1s;
}

#rollDiceBtn:hover, #resetStatsBtn:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

#rollDiceBtn:active, #resetStatsBtn:active {
    transform: scale(0.98);
}

#resetStatsBtn {
    background-color: #e74c3c;
}

#resetStatsBtn:hover {
    background-color: #c0392b;
}

.result-section {
    text-align: center;
    margin-bottom: 30px;
    min-height: 30px;
    font-size: 18px;
}

#resultMessage {
    font-weight: bold;
}

/* Stats Section */
.stats-section {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-section h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.color-stat {
    position: relative;
    height: 80px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.color-stat:hover {
    transform: scale(1.05);
}

.color-name {
    font-size: 16px;
    margin-bottom: 5px;
}

.color-percent {
    font-size: 22px;
}

/* Color backgrounds */
.color-stat.red { background-color: #e74c3c; }
.color-stat.green { background-color: #2ecc71; }
.color-stat.blue { background-color: #3498db; }
.color-stat.yellow { 
    background-color: #f1c40f; 
    color: #333; 
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}
.color-stat.white { 
    background-color: #ffffff; 
    color: #333; 
    text-shadow: none;
    border: 1px solid #ddd;
}
.color-stat.pink { background-color: #ff69b4; }

.total-rolls {
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
    font-size: 16px;
}

.history-section {
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.history-section h3 {
    margin-bottom: 15px;
    text-align: center;
}

#gameHistory {
    list-style-type: none;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
}

#gameHistory li {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

#gameHistory li:nth-child(odd) {
    background-color: #f9f9f9;
}

.timestamp {
    color: #777;
    font-size: 0.9em;
}

.dice-animation {
    animation: roll 0.5s ease;
}

@keyframes roll {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* Dice colors */
.dice.red { background-color: #e74c3c; }
.dice.green { background-color: #2ecc71; }
.dice.blue { background-color: #3498db; }
.dice.yellow { background-color: #f1c40f; }
.dice.white { background-color: #ffffff; border: 2px solid #ddd; }
.dice.pink { background-color: #ff69b4; } 