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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    overflow: hidden;
}

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

.controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.controls-title {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.controls label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.controls select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.controls select:focus {
    outline: none;
    border-color: #4CAF50;
}

.leaf-map {
    width: 100%;
    height: 100%;
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: crosshair;
}

.leaf {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 10;
    transition: transform 0.2s ease;
}

.leaf:hover {
    transform: scale(1.1);
}

.leaf img {
    width: 100%;
    height: 100%;
}

.instructions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    max-width: 300px;
}

.control-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 16px;
    border: 2px solid;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.clear-btn {
    border-color: #000000;
    color: #000000;
}

.clear-btn:hover {
    background: #000000;
    color: white;
}

.undo-btn {
    border-color: #000000;
    color: #000000;
}

.undo-btn:hover {
    background: #000000;
    color: white;
}

.undo-btn:disabled {
    border-color: #a4b0be;
    color: #a4b0be;
    cursor: not-allowed;
    transform: none;
}

.undo-btn:disabled:hover {
    background: transparent;
    color: #a4b0be;
}

.toggle-map-btn {
    border-color: #000000;
    color: #000000;
}

.toggle-map-btn:hover {
    background: #000000;
    color: white;
}

.stats-panel {
    position: absolute;
    right: 20px;
    top: 80px;
    width: 200px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stats-panel h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-name {
    font-size: 13px;
    color: #333;
    min-width: 60px;
}

.stat-bar-container {
    flex: 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 3px;
    margin: 0 0 0 10px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    background: #000;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.stat-count {
    font-size: 12px;
    font-weight: bold;
    color: #000;
    min-width: 30px;
    text-align: right;
}

@media (max-width: 768px) {
    .controls {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
    }
    
    .controls select {
        min-width: 100%;
    }
    
    .instructions {
        bottom: 10px;
        left: 10px;
        right: 10px;
        font-size: 11px;
    }
    
    .stats-panel {
        right: 10px;
        width: 150px;
        top: 60%;
    }
}
