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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #e8f5e8, #d4f1d4);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #2d5a2d;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.controls {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tool-group {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tool-group h3 {
    margin-bottom: 10px;
    color: #2d5a2d;
}

.tool-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.tool-btn:hover {
    background: #45a049;
}

.tool-btn.active {
    background: #2d5a2d;
}

.clear-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.clear-btn:hover {
    background: #da190b;
}

.undo-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.undo-btn:hover {
    background: #e68900;
}

.settings {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
}

.settings h3 {
    margin-bottom: 10px;
    color: #2d5a2d;
}

.settings label {
    display: block;
    margin-bottom: 10px;
    color: #333;
}

.settings input, .settings select {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-top: 5px;
}

.hidden {
    display: none;
}

.tree-summary {
    position: absolute;
    top: 100px;
    right: 10px;
    width: 150px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tree-summary h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    text-align: center;
}

.tree-summary div {
    margin: 2px 0;
}

.compass {
    position: absolute;
    top: 10px;
    right: 60px;
    z-index: 100;
}

.compass-circle {
    width: 80px;
    height: 80px;
    border: 2px solid #333;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.compass-arrow {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 20px solid #ff0000;
}

.compass-label {
    position: absolute;
    font-weight: bold;
    font-size: 14px;
    color: #000;
}

.compass-label.north { top: 5px; left: 50%; transform: translateX(-50%); }
.compass-label.south { bottom: 5px; left: 50%; transform: translateX(-50%); }
.compass-label.east { right: 10px; top: 50%; transform: translateY(-50%); }
.compass-label.west { left: 10px; top: 50%; transform: translateY(-50%); }

.farm-area {
    position: relative;
}
    text-align: center;
}

#farmCanvas {
    border: 3px solid #8B4513;
    border-radius: 10px;
    background: #90EE90;
    cursor: crosshair;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.farm-info {
    margin-top: 10px;
    color: #2d5a2d;
    font-size: 14px;
}

.farm-info p {
    margin: 5px 0;
}

.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;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #2d5a2d;
}

.modal-buttons {
    margin-top: 15px;
    text-align: right;
}

.modal-buttons button {
    margin-left: 10px;
}

.distributor-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.distributor-row label {
    flex: 1;
    margin-bottom: 0;
}

.distributor-row input {
    width: 100%;
    margin-top: 5px;
}

.distributors-section {
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.distributors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.distributors-header span {
    font-weight: bold;
    color: #2d5a2d;
}

.add-btn {
    background: #4CAF50;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: #45a049;
}

.distributor-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: end;
}

.distributor-entry label {
    flex: 1;
    margin-bottom: 0;
}

.distributor-entry input {
    width: 100%;
    margin-top: 5px;
}

.remove-btn {
    background: #f44336;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #da190b;
}