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

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: #2c5530;
    color: #ffffff;
    overflow: hidden;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#gameCanvas {
    display: block;
    background-color: #4a7c59;
    cursor: crosshair;
}

#gameUI {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;
}

#playerInfo {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    pointer-events: auto;
}

#playerName {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

#playerAge, #yearCounter {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 3px;
}

#familyTree {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    pointer-events: auto;
}

#familyTree h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #fff;
}

.family-member {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
    padding: 3px;
    border-radius: 3px;
}

.family-member.alive {
    background: rgba(76, 175, 80, 0.3);
}

.family-member.dead {
    background: rgba(244, 67, 54, 0.3);
    text-decoration: line-through;
}

#gameLog {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    width: 400px;
    height: 150px;
    overflow-y: auto;
    pointer-events: auto;
}

#logMessages {
    font-size: 12px;
    color: #ccc;
}

.log-message {
    margin-bottom: 5px;
    padding: 2px 0;
}

.log-birth {
    color: #4caf50;
}

.log-death {
    color: #f44336;
}

.log-family {
    color: #2196f3;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 100;
    pointer-events: none;
    border: 1px solid #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tooltip.hidden {
    display: none;
}

.tooltip-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.tooltip-age, .tooltip-birth, .tooltip-relation {
    margin-bottom: 3px;
    color: #ccc;
}

.tooltip-relation {
    color: #ffa726;
    font-weight: bold;
}

.player-sprite {
    border-radius: 50%;
    border: 2px solid #fff;
}

.player-dead {
    opacity: 0.5;
    filter: grayscale(100%);
}