* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE4D6 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #5D4E37;
}

.game-container {
    max-width: 600px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #5D4E37;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.label {
    font-size: 0.9em;
    color: #9FA9A3;
    margin-right: 8px;
}

.value {
    font-size: 1.3em;
    font-weight: bold;
    color: #D4A5A5;
}

#canvas-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    background: #D4A5A5;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.btn:hover {
    background: #C89595;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #9FA9A3;
}

.btn-secondary:hover {
    background: #8F9993;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal h2 {
    margin-bottom: 20px;
    color: #5D4E37;
}

.win-stats {
    font-size: 1.2em;
    margin: 20px 0;
}

#high-score-message {
    color: #D4A5A5;
    font-weight: bold;
    margin: 15px 0;
    font-size: 1.1em;
}

#scores-list {
    text-align: left;
    margin: 20px 0;
}

.score-item {
    background: #FFF5E6;
    padding: 12px;
    margin: 8px 0;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-item.highlight {
    background: #FFE4D6;
    border: 2px solid #D4A5A5;
}

.score-rank {
    font-weight: bold;
    color: #D4A5A5;
    margin-right: 10px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }
    
    .stats {
        gap: 15px;
    }
    
    .stat {
        padding: 8px 15px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    
    body {
        padding: 10px;
    }
    
    .modal-content {
        padding: 20px;
    }
}
